Tuesday, July 23, 2019

Introduction to Databases Assignment Example | Topics and Well Written Essays - 250 words - 4

Introduction to Databases - Assignment Example This means the DROP operation will be performed not only on the primary key but also on all referencing foreign keys. Secondly, to avoid having null values as primary keys, always specify the primary key to auto increment whenever the database is populated. One foreign key from a table can only refer to a single primary key on another table. Moreover, it is unacceptable for the same foreign key to refer to multiple primary keys. For instance, department_id on the employee table refers to the primary key department_id on the department table and not the department_id on the job_history table. The data type and values of foreign key that are used in the database schema must match with the data types and values of primary key or unique columns for that matter. The data values of country_id on countries table, say 11, should be the same as that of country_id on the locations table. Similarly, the data type should also be same. If region_id in the regions table is an integer, then region_id on the countries table must also be an integer and not a double or

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.