Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Consider the Schema of two relations the Dancers and their hiring Companies: Companies (name:string, address:string) Dancers (name:string, dob:date, stage_name:string, company:string, salary: number) The according business
Consider the Schema of two relations the Dancers and their hiring Companies: Companies (name:string, address:string) Dancers (name:string, dob:date, stage_name:string, company:string, salary: number) The according business rules are as below: No two companies have same company name. No two dancers have the same (combination of) stage name and the hiring company. A dancer's name and date of birth (DOB) have to be specified .A dancer's hiring company must be registered in the Companies table. Tips: 1. things that "have to be specified" means they could not be empty; 2. not empty doesn't necessarily mean to have different values, 3. values of primary key can not be empty and must be different. (2a) (15 points) Implement these two relations in SQL (DDL) statement. Tips: Careful about order of your creations. (2b) (10 points) Write four(4) SQL statements in total, to populate two(2) tuples/rows into each table. (Make up the data whose values satisfy all the constraints) (2c) (5 points) Write SQL statements to drop these two(2) tables. Tips: Be careful about dropping order
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started