Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Orders( orderId , customerId, dateOrdered, dateRequired, status) Customer( customerId , customerLastName, customerStreet, customerCity, customerState, customerZip) OrderDetails( orderId,productId , quantity, lineNumber, amount) Products( productId , name,

Orders(orderId, customerId, dateOrdered, dateRequired, status)

Customer(customerId, customerLastName, customerStreet, customerCity, customerState, customerZip)

OrderDetails(orderId,productId, quantity, lineNumber, amount)

Products(productId, name, description, quantity, unitPrice )

Account(accountNumber, customerId, dateOpened, creditCard, mailingStreet, mailingCity, mailingState, mailingZip)

2.1 (2 Points) List all possible foreign keys. For each foreign key list both the referencing and referenced relations.

2.2 (2 Points) Devise a reasonable database instance by filling the tables with data of your choice. Make sure to have at least 3 tuples in each table. Make sure that all tables exhibits entity integrity and referential integrity constraints. Make sure to use good table layout in your answer.

2.3 (3 Points) For each of the following queries, write a relational algebra expression to answer the query:

a) Find the names of all customers who live in Hopkins, on St. Ann Street.

b) Find the names and cities of residence of all customers who have accounts.

c) Find the names, street address, and cities of residence for all customers who have ordered product number 320894.

2.4 (2 point) For each of the following relational algebra expressions, explain the output of the expression in words:

credit_card(mailingCity=St. Paul( account)

accountNumber(customerCity=chicago( customer image text in transcribed account)

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

Put Your Data To Work 52 Tips And Techniques For Effectively Managing Your Database

Authors: Wes Trochlil

1st Edition

0880343079, 978-0880343077

More Books

Students also viewed these Databases questions

Question

Were the decisions based on appropriate facts?

Answered: 1 week ago

Question

305 mg of C6H12O6 in 55.2 mL of solution whats the molarity

Answered: 1 week ago

Question

What are the Five Phases of SDLC? Explain each briefly.

Answered: 1 week ago

Question

How can Change Control Procedures manage Project Creep?

Answered: 1 week ago