This page enforces some constraints on the tables and advises some best practices
The database of the store contains many tables. Some columns like the 'customer_ID', 'order_ID', 'product_ID', etc. are present in more than one table. These columns are related to each other. Without defining the relationship between such columns, data integrity cannot be maintained.
Create the tables in 3NF and apply the appropriate constraints as applicable:
For ex. the 'order_ID column of the 'order_master' table is chosen as the primary key as it uniquely identifies a record in the table. This 'order_ID' referenced in the 'order_details' table is declared as a foreign key to the primary key in the 'order_master' table in order to ensure that no value is added to the table that is not present in the 'order_master' table.
For ex. The 'order_ID' column in the 'order_master' table is declared NOT NULL as any order must always contain an ID for reference.
The tables with appropriate constraints are created.