Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

4. (Use Sallys Pet Store)Sally has a very fickle customer that would like to see if the store has ever carried certain types of animals.

4. (Use Sallys Pet Store)Sally has a very fickle customer that would like to see if the store has ever carried certain types of animals. Write one query to answer this question: List the parrots or parakeets or lovebirds that have blue or red but not gold as part of their color, and also list the female registered cats with a price from 130 to 300 born in June, July or August of the year 2004, but not black cats. Return all columns in the animal table, and sort the result set by listprice with the largest value first.

5. Write the code to create 3 tables: SALESAGENT, AGENTAUTO, and AUTOMOBILE. The SaleAgent table should have a surrogate key named SID with automatic sequential numbering, and these fields (SFN variable text max of 30 and required, SLN with an appropriate data type, SPhone with an appropriate data type). AUTOMOBILE should have field named VIN which is a unique number that comes on every car and should be used as the primary key. The table AGENTAUTO table should have the fields startdate and enddate with appropriate data types, a primary key of your choosing, and the necessary two foreign keys with referential integrity constraints enforced.

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

Database Systems Design Implementation And Management

Authors: Peter Robb,Carlos Coronel

5th Edition

061906269X, 9780619062699

More Books

Students also viewed these Databases questions

Question

How to reverse a Armstrong number by using double linked list ?

Answered: 1 week ago