Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using the schema, tables, and data you created in Exercise 1 (The picture below): Examine the candidate keys in each table. Write ALTER TABLE statements

Using the schema, tables, and data you created in Exercise 1 (The picture below):

Examine the candidate keys in each table.

Write ALTER TABLE statements for each table to create Primary Keys and Foreign Keys where applicable.

Test the statements in your schema to make sure they work.

image text in transcribed

Tables Customer ?len columns ? CUSCODE ? CUS-LNAME - CUS FNAME ? CUS-INITIAL ? CUS-AREACODE ? CUS-PHONE ? CUS-BALANCE Indexes Foreign Keys Triggers ?| | invoice ?len columns ? INVNUMBER ? CUSCODE ? INVDATE ? INVSUBTOTAL - - - - INV TAX ? INV TOTAL Indexes Foreign Keys Triggers ?- | line Columns ? INVNUMBER ? LINENUMBER ? PCODE ? LINEUNITS ? LINEPRICE ? LINE TOTAL Indexes Foreign Keys Triggers - - - - - ? product ?len columns ? PCODE ? PDESCRIPT ? P. INDATE ? P.Q0H ? PMIN ? PPRICE ? PDISCOUNT ? V-CODE Indexes Foreign Keys Triggers - - - - - vendo ? Columns ? VCODE ? V-NAME ? VCONTACT ? VAREACODE ? V PHONE - - - V STATE ? VORDER Indexes Foreign Keys Triggers

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

Data Management Databases And Organizations

Authors: Watson Watson

5th Edition

0471715360, 978-0471715368

More Books

Students also viewed these Databases questions

Question

What is Accounting?

Answered: 1 week ago

Question

Define organisation chart

Answered: 1 week ago

Question

What are the advantages of planning ?

Answered: 1 week ago

Question

Explain the factors that determine the degree of decentralisation

Answered: 1 week ago