Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hi this is sql coding languaged from database management system question. Please provide me with the answer in 30 minutes. The deadline is soon 2.

Hi this is sql coding languaged from database management system question. Please provide me with the answer in 30 minutes. The deadline is soonimage text in transcribed

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. PET PK OWNER PK OWNER ID OWNER NAME OWNER GENDER OWNER PET PK ID FK1 OWNER ID FK2 PET_ID PET ID PET NAME PET TYPE Fig 3 1. II. TIL Assume any data for the three tables and answer the below Write SQL syntax for creating the three (3) tables giving necessary constraints owner_id is auto_increment) 6 marks 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. 1 mark Write an SQL statement to alter the table Pet and Add a column 'pet_gender Change the type of the column 'pet_gender' from varchar(10) to Char(1) Remove the column 'pet_gender" 3 marks V. Write an SQL statement Add auto increment constraint to pet_id in the 'pet table 1 mark VI. Write an SQL statement to remove any record from the pet table 1 mark Write an SQL to rename the column 'iD' to 'Owner_pet_id' in the owner_pet IV. . VIL table 1 mark (14 Marks)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

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

Flash XML Applications Use AS2 And AS3 To Create Photo Galleries Menus And Databases

Authors: Joachim Schnier

1st Edition

0240809173, 978-0240809175

More Books

Students also viewed these Databases questions