Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

Step by Step Solution

3.50 Rating (157 Votes )

There are 3 Steps involved in it

Step: 1

The following SQL statements have been executed in MySQL 55 Solutions for the first Questi... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems Introduction to Databases and Data Warehouses

Authors: Nenad Jukic, Susan Vrbsky, Svetlozar Nestorov

1st edition

978-1943153190, 1943153191, 978-0132575676

More Books

Students also viewed these Computer Engineering questions

Question

Which conditions must hold in order for a table to be a relation?

Answered: 1 week ago