Ambigai Systems Interview Question

What is database constraints? How do you optimize code?