2. Consider a 'Owner-Pet' database with three tables - Owner, Pet and Owner-Pet shown as a...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
2. Consider a 'Owner-Pet' database with three tables - Owner, Pet and Owner-Pet shown as a below in Fig 3. Pk and FK Constraints are also shown. OWNER_PET PK ID FK1| OWNER_ID FK2 PET ID OWNER PET PK OWNER PK PET ID OWNER NAME PET NAME OWNER GENDER PET TYPE Fig 3 Assume any data for the three tables and answer the below 1. Write SQL syntax for creating the three [3] tables giving necessary constraints [owner_id is auto_increment] 6 marks I. Write SQL syntax to alter the 'Owner' table whereby the owner_id starts with 1000 1 mark Write an SQL statement to insert any one record in table - 'owner' table with your details. II. 1 mark 2. Consider a 'Owner-Pet' database with three tables - Owner, Pet and Owner-Pet shown as a below in Fig 3. Pk and FK Constraints are also shown. OWNER_PET PK ID FK1| OWNER_ID FK2 PET ID OWNER PET PK OWNER PK PET ID OWNER NAME PET NAME OWNER GENDER PET TYPE Fig 3 Assume any data for the three tables and answer the below 1. Write SQL syntax for creating the three [3] tables giving necessary constraints [owner_id is auto_increment] 6 marks I. Write SQL syntax to alter the 'Owner' table whereby the owner_id starts with 1000 1 mark Write an SQL statement to insert any one record in table - 'owner' table with your details. II. 1 mark
Expert Answer:
Answer rating: 100% (QA)
The following SQL statements have been executed in MySQL 55 Solutions for the first Questi... View the full answer
Related Book For
Database Systems Introduction to Databases and Data Warehouses
ISBN: 978-0132575676
1st edition
Authors: Nenad Jukic, Susan Vrbsky , Svetlozar Nestorov
Posted Date:
Students also viewed these computer engineering questions
-
A Hot-Wheels track. must include a starter, loop, jump and dosed turn. The starter should contain a spring and you should use Hooke's law when designing what the starter looks like. The loop should...
-
Write an alternate SQL statement that modifies your answer to Review Question 7.7 to make the relationship between EMPLOYEE and ASSIGNMENT a 1:1 relationship. Review Question 7.7; Write a CREATE...
-
Write and run an SQL INSERT statement to insert the following record into the SALE_02 table: What was the result of running this statement? Why did this result occur? DateOf Sale SalelD CustomerlD...
-
Assume that the marginal product of capital is given by the following expression: MPK = 60/K^0.7 (K is measured in trillions). a) Graph the demand curve for capital and find the equilibrium real...
-
When the average product of labor is the same as the marginal product of labor, how will marginal cost compare with average variable cost?
-
Like the hole in a bagel, any hole in Finagle A Bagels information and accounting systems means less dough for the company. Copresidents Alan Litchman and Laura Trust and their management team could...
-
What does it look like when a board engages in groupthink? What are the pitfalls of such behavior? What are some techniques for overcoming groupthink?
-
Multiple Choice Questions 1. Halifax Corporation has a December 31 fiscal year-end. As of December 31, Year 1, the company has a debt covenant violation that results in a 10-year note payable to Nova...
-
As the new accountant for Cohen & Companyyou have been asked to provide a succinct analysis of financial performance for the year just endedYou obtain the following information that pertains to the...
-
Lewis Company reports the following fixed budget and actual results for May. Prepare a flexible budget performance report showing variances between budgeted and actual results. (Indicate the effect...
-
Using the expanded accounting equation, calculate and enter the answers for each question. You will need to use the answers you calculate for beginning and ending equity to answer the rest of the...
-
Use the pain tolerance ratings (PainTolerance) after the activity to estimate the difference in mean pain tolerance between those who just completed a synchronized activity and those who did a...
-
If there are 9 cars in a race, in how many different ways can they place first, second, and third?
-
A shipment of 120 burglar alarms contains 5 that are defective. If 3 of these alarms are randomly selected and shipped to a customer, find the probability that the customer will get one bad unit by...
-
Among the 13 countries that an international trade federation is considering for their next 4 annual conferences, 6 are in Asia. To avoid arguments, the selection is left to chance. If none of the...
-
Use the closeness ratings given after the activity (CloseAfter) to estimate the difference in mean rating of closeness between those who have just done a synchronized activity and those who do a...
-
A plaintiff who knows there is a substantial danger associated with certain conduct and goes ahead with the dangerous activity anyway gives the tortfeasor the defense of A. superseding cause. B. Res...
-
What are the six activities involved in the physical supply/distribution system?
-
Which conditions must hold in order for a table to be a relation?
-
Create requirements and the ER diagram for a scenario with two entities (both with several attributes), one of which is a weak entity and the other its owner entity, involved in an identifying...
-
Create requirements and the ER diagram for a scenario with two entities (both with several attributes) involved in two separate relationships.
-
Show that \((4 / 3,10 / 3,0,0)\) is a basic feasible solution of the system: 2x1 + x2 + X3 6 x1 + 2x2 X20 + X4 = 8 for all i
-
Prove that if a feasible solution to a maximum problem in equality form is locally optimal, then it is optimal. (A solution is locally optimal if its objective value exceeds those of all feasible...
-
Let \(\mathscr{G}\) be an RKHS with reproducing kernel \(\kappa\). Show that \(\kappa\) is a positive semidefinite function.
Study smarter with the SolutionInn App