Question: Create a database eith one - to - many relationship between two entity classes. Using entities > ( Musician:performance ) Each entity class in your
Create a database eith onetomany relationship between two entity classes. Using entitiesMusician:performance
Each entity class in your database schema should have a single theme. Choose at least four logical and useful attributed for each entity class. Use natural language names for the table and columns, and avoid codes or abbreviations for the names and data. It is expected that the schema will include each of the major attribute types: integer, character or variablelength character, a date type, and decimal with fraction. Specify data types and lengths compatible with the data collected. Also, use case consistently for the character data loaded.
Define primary key contraints for both tables to ensure entity integrity. Define foreign key in the child table or the many end of the relationship to enforce referential integrity.
For the entity classes chosen collect authentic data for all known instances or a meaningful subset. At minimum one relationship between the one and the many tables should illustrate a participation constraint of :Mone parent row, many children another : and :
Invoke the following SQL commands to demonstrate and test your design:
query each of the tables. Project all columns with rows ordered by primary key;
verify entity integrity by attempting to insert a row with an invalid primary key value into the "one" table, and another into the "many" table;
verify referential integrity by attempting to insert a row into your "many" child table with foreign key that has no corresponding parent row;
issue a query with subquery nested query to show the existance of a :M participation between a parent row and related child rows ie list child rows related to a single row from the parent table
join the "one" and "many" tables and project columns corresponding to the primary key and a single nonkey column, and the foreign key from the child table with results ordered by the primary key of the "one" major sort key and the primary key of the "many" table minor sort key
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
