Question

Question 2 Consider the following six relations for an order-processing database applicationin a company: CUSTOMER (Cust#,...

Question 2

Consider the following six relations for an order-processing database applicationin a company:

CUSTOMER (Cust#, Cname, City)

ORDER (Order#, Odate, Cust#, Ord_Amt)

ORDER_ITEM (Order#, Item#, Qty)

ITEM (Item#, Unit_price)

SHIPMENT (Order#, Warehouse#, Ship_date)

WAREHOUSE (Warehouse#, City)

Specify the foreign keys for this schema, stating any assumptions you make.

Homework Answers

Answer #1

Foreign Keys: Those attributes in a relation are known as foreign Keys that are the primary keys of another table.

1.

FOREIGN KEY ORDER(Cust#) REFERENCES CUSTOMER(Cust#)

i.e., Cust# attribute in table 'ORDER' is a foreign key that references table 'CUSTOMER'

2.

FOREIGN KEY ORDER_ITEM(Order#) REFERENCES ORDER(Order#)

3.

FOREIGN KEY ORDER_ITEM(Item#) REFERENCES ITEM(Item#)

4.

FOREIGN KEY SHIPMENT(Order#) REFERENCES ORDER(Order#)

5.

FOREIGN KEY SHIPMENT(Warehouse#) REFERENCES WAREHOUSE (Warehouse#)

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
1. Consider the following tables in a relational database. Provide the appropriate "SELECT" SQL statement necessary...
1. Consider the following tables in a relational database. Provide the appropriate "SELECT" SQL statement necessary to answer the queries that follow. Primary keys are underlined and foreign key fields have an asterisk at the end of the field. CUSTOMERS (CUST-NO, C-NAME, C-ADDRESS, BALANCE) SALESPERSONS (SP-NO, S-NAME, DATE-EMPLOYED, SALARY) SALES (INVOICE-NO, DATE, CUST-NO*, SP-NO*) a) List the salesperson name and salary for all sales to customers whose balance outstanding is greater than 20000. b) List the names and addresses of...
Consider the following information to design a database for a catalogue of an online video service...
Consider the following information to design a database for a catalogue of an online video service that offers access to popular TV series. The following is the description of the application: Each series has a name and a description. Each series has many episodes. Each episode of a series has an episode number, the date it was first aired, and the length of the episode in minutes. The episode number uniquely identifies an episode with respect to the series, but...
Requirements: Based on the following information, draw an E-R diagram and a set of relations in...
Requirements: Based on the following information, draw an E-R diagram and a set of relations in 3rd normal form. Please indicate any assumptions that you have made. Wally Los Gatos, owner of Wally’s Wonderful World of Wallcoverings, has hired you as a consultant to design a database management system for his chain of three stores that sell wallpaper and accessories. He would like to track sales, customers, and employees. After an initial meeting with Wally, you have developed a list...
Complete and correct answer is required to give full credit,thank you Consider the following set of...
Complete and correct answer is required to give full credit,thank you Consider the following set of requirements for an airline database that is used to keep track of flights, passengers, employees etc. for an airline. You will be graded not only on the correctness and completeness of the design but also on its quality. 1)     It is important to keep track of each passenger's name, address, phone number and meal preference (values could be vegetarian, sea-food, italian, anything). At times, it...
Consider a packaging/warehousing process with the following steps: 1. The product is filled and sealed. 2....
Consider a packaging/warehousing process with the following steps: 1. The product is filled and sealed. 2. Sealed units are placed into boxes and stickers are placed on the boxes. 3. Boxes are transported to the warehouse to fulfill customer demand. These steps can be combined into a single processing time, as depicted in the system schematic. The system is subject to the following assumptions: 1. There is always sufficient raw material for the process never to starve. 2. Processing is...
Question 2: Breaking a Mortgage (8 marks) Consider entering into the following mortgage: • Size of...
Question 2: Breaking a Mortgage Consider entering into the following mortgage: • Size of initial loan = $450,000 (ignore any possible insurance) • 3-year term. • Closed, fixed rate of interest equal to 4.5% APR. • 20-year amortization period. • Monthly payments. Part A: Please compute the monthly payments and determine how much principal is left after one year of payments (assuming no change in interest rates). Part B: Assume that, after one year of payments, interest rates drop to...
ASSIGNMENT Customer Lifetime Value STEP 1: CONSIDER RELEVANT NUMBERS Netflix obtains paying subscribers through unique deals...
ASSIGNMENT Customer Lifetime Value STEP 1: CONSIDER RELEVANT NUMBERS Netflix obtains paying subscribers through unique deals like bundles and discount. Here are numbers to use in order to calculate metrics for this assignment: ● Customers pay $12.99/month for a subscription ● The average subscription length is 25 months. Customer lifetime revenue = ($12.99 X 25 = $324.75) ● Cost to acquire and maintain each subscriber = $99 ● Annual Retention rate = 60 percent ● Annual Discount rate = 10...
You are a database consultant with Ace Software, Inc., and have been assigned to develop a...
You are a database consultant with Ace Software, Inc., and have been assigned to develop a database for the Mom and Pop Johnson video store in town. Mom and Pop have been keeping their records of videos and DVDs purchased from distributors and rented to customers in stacks of invoices and piles of rental forms for years. They have finally decided to automate their record keeping with a relational database. You sit down with Mom and Pop to discuss their...
Question 1: Group by and Aggregates: Write SQL statements to answer the following questions using Assignment...
Question 1: Group by and Aggregates: Write SQL statements to answer the following questions using Assignment 4’s schema (Customer-Invoice-Line-Product-Vendor). Make sure that your SQL script runs without any errors. Submit your answers in a .SQL file. 1 (2 Points) - Find the count of distinctvendors thatsupplied products that are priced lowerthan 185? 2 (2 Points) - For each vendor, find their product that has the lowest product quantity. Your output should include vendor code, vendor name, product description and product...
QUESTION 1 Which of the following best exemplifies offshoring? A. A U.S. company employs foreign nationals...
QUESTION 1 Which of the following best exemplifies offshoring? A. A U.S. company employs foreign nationals at its U.S. based headquarters. B. A U.S. company translates novels originally written in foreign languages into English for distribution in the U.S. market. C. A U.S. company starts a chain of fusion restaurants to cater to the American public’s evolving palates. D. A U.S. company purchases footwear made in Europe to distribute to retailers in the United States. E. A U.S. company that...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT