Good Example Of Essay On Constraints And Indexes
\s
Referential integrity is a concept that ensures relationships between tables are consistent. In certain cases in relational database management system, inconsistency issues may arise when relationship is built between two tables. For example, if in a case, table 2 has a foreign key that points to the table 1. Referential integrity prevents the user from adding a record to table 2 that cannot be connected to table 1. Referential integrity rules are also applied in the case, when records from one table are deleted that is linked to the other. For example, if in table 1, records are deleted, then they will also be deleted from table 2.
Similarly, in case of E-Trading Post database, there are two foreign keys, i.e. Payment Method ID, and Category ID. Payment Method ID is a foreign key in the seller’s entity table and category ID is the foreign key in Item Auction table. If any user changes the payment method ID, then it will also be changed in the payment table or vice versa.
In case of category ID, if any product category is changed in the item auction table, then it will be updated in the category table as well. However, if the user try to change or delete the category, then the database would prevent it as other records are linked to the same.
The primary keys in any database provides direction to the tables. According to the validation and indexes rules, the primary key must be unique and cannot be NULL. Therefore, in case of E-Trading Post Database, all the primary keys in the tables are set to NOT NULL. Moreover, the rules also specify that there could be no more than one primary key in any table.
- APA
- MLA
- Harvard
- Vancouver
- Chicago
- ASA
- IEEE
- AMA