What is the difference between covering and overlapping constraints use in DBMS?

What is the difference between defining keys and constraints in database theory?

  • i mean the major difference between the defining the primary, foreign keys and constraints...

  • Answer:

    A constraint is a predetermined limitation on a column in a table. Example: you can add a constraint on a bit/bool field to default to 0 if it's null. A primary key is a constraint on a column or across multiple columns which require that each row be unique for that column(s). Null's are not allowed for primary key columns. Primary keys are indexed, making data retrieval faster when searching or joining by that column(s). Foreign key's are a bit more complex. Usually they are used to require that the foreign key value corresponds with an existing primary key value in another table.

yashwanth k at Yahoo! Answers Visit the source

Was this solution helpful to you?

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.