From the course: Database Foundations: Data Structures

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Validate data with constraints

Validate data with constraints

From the course: Database Foundations: Data Structures

Start my 1-month free trial

Validate data with constraints

- [Instructor] Constraints place restrictions on the values that will be allowed in a column. This helps you specify the rules that each value must meet before it will be stored in the database. You can think of constraints as a form of data validation. When you establish the boundaries that values must fall within, you can have the database engine automatically reject any values that fall outside. Doing so make sure that the values that actually make it past the constraint verification process will meet your expectations for data quality and completeness. The addition of constraints to your table designs should be approached with care. The more you can precisely define the kinds of values that will be acceptable and which kinds will not be acceptable for every column, we'll help you determine the kinds of constraints to place on the table. Look for patterns that are guaranteed to be true for every valid piece of data.…

Contents