Question

In: Computer Science

Given the following six relations for an order-processing database application in a company: CUSTOMER (Cust#, Cname,...

Given the following six relations for an order-processing database application in 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)

Here, Ord_Amt refers to total dollar amount of an order; Odate is the date the order was placed; Ship_date is the date an order (or part of an order) is shipped from the warehouse. Assume that an order can be shipped from several warehouses.
Hint: Remember, the relations (tables) describing entities carry the primary keys that are referenced by the relations (tables) describing relationships between entities.

  1. Specify all the foreign keys for this schem State each foreign key using the following format “foreign key is the attribute ---------- of relation --------- that references relation
    -------------“.
  2. State two queries involving more than one table that can be posed on this database indicating the tables to visit to answer the queries each time.

Solutions

Expert Solution

a)

There are five foreign keys in this schema they are as follows

a. The attribute Cust# of relation ORDER that references relation CUSTOMER.
b. The attribute Order# of relation ORDER_ITEM that references relation ORDER.
c. The attribute Item# of relation ORDER_ITEM that references relation ITEM.
d. The attribute Order# of relation SHIPMENT that references relation ORDER.
e. The attribute Warehouse# of relation SHIPMENT that references relation WAREHOUSE.


b)State two queries involving more than one table that can be posed on this database indicating the tables to visit to answer the queries each time.

1)List the Cust#,Order# for a particular item# (ex: oil)
2)List the Order# and Ship_date for all orders shipped form a particular Warehouse# (ex:warehouse 3)
3)List the Cust#,Item# and it's Unit_price
4)List the Order# for orders that were shipped from all warehouses Of a particular city (ex:Vegas).


Related Solutions

For the given database schema. Answer the following questions. Company Database customer(cust_id, name, address) product(product_id, product_name,...
For the given database schema. Answer the following questions. Company Database customer(cust_id, name, address) product(product_id, product_name, price, quantity) transaction(trans_id, cust_id, time_date) product_trans(product_id, trans_id) Identify the primary keys and foreign keys for the relations and specify at least two different types of integrity constraints that would be applicable for different relations given.
A finance company has a database of customer documentation, including application forms containing a substantial amount...
A finance company has a database of customer documentation, including application forms containing a substantial amount of personally identifiable information (PII). The database contains the records of over 10,000 customers. The database is only accessible from inside the network of the company – it is not directly exposed to the Internet. (15 marks total) Suggest a suitable data classification for this information held by this database and explain why this classification is appropriate. Suggest one threat actor, and why they...
A finance company has a database of customer documentation, including application forms containing a substantial amount...
A finance company has a database of customer documentation, including application forms containing a substantial amount of personally identifiable information (PII). The database contains the records of over 10,000 customers. The database is only accessible from inside the network of the company – it is not directly exposed to the Internet. i. Suggest a suitable data classification for this information held by this database and explain why this classification is appropriate.   ii. Suggest one threat actor, and why they might...
Given a relational database that consists of the following relations: Performer (pid: integer, pname: string, years_of_experience:...
Given a relational database that consists of the following relations: Performer (pid: integer, pname: string, years_of_experience: integer, age: integer) Movie (mname: string, genre: string, minutes: integer, release_year: integer, did: integer) Acted (pid: integer, mname: string) Director (did: integer, dname: string, earnings: real) Do the following using your Azure SQL database: a) Use SQL statements to create the relations. b) Populate the relations using SQL statements with the given data posted on Canvas. c) Implement the SQL queries for the following:...
Task 1. Consider the following scenarios An order processing application for a pet supplies store. The...
Task 1. Consider the following scenarios An order processing application for a pet supplies store. The customers should be able to place orders online and for every order they must receive an order confirmation vie e-mail and upon shipping they must receive a shipping notice via e-mail. A publicly traded retailer with retail outlets and online shopping and shipping options A small, private law firm having a small website with forms for potential clients to complete; including name, address, contact...
Sales Order Processing System The customer sales order is received via phone or through the mail....
Sales Order Processing System The customer sales order is received via phone or through the mail. Gus Grinwich, the sales clerk, receives the sales order and checks the customer’s credit record. Once Grinwich checks the customer’s credit record, he prepares the sales order. From this sales order, Grinwich prepares a customer copy, stock release, shipping notice, two copies of the invoice, ledger copy, packing slip, and the file copy. One of the invoice copies, the ledger copy, and the file...
Suppose your company has built a database application that runs on a centralized database, but even...
Suppose your company has built a database application that runs on a centralized database, but even with a high-end computer and appropriate indices created on the data, the system is not able to handle the transaction load, leading to slow processing of queries. What would be some of your options to allow the application to handle the transaction load?
Given the following specification for a Web-based order processing system for a computer store. “A new...
Given the following specification for a Web-based order processing system for a computer store. “A new user can connect to the company’s web page and create a new customer profile by providing personal information. This information will be validated and saved in a customer information file at the company’ s server. The user is then provided with a user id and password via an email sent by the system. Using the provided password, the user can then logon to the...
Customer A's order arrived 8 days ago. Processing time is estimated to be 25 days. The...
Customer A's order arrived 8 days ago. Processing time is estimated to be 25 days. The promised due date is 40 days from now. What is customer A's flow time in the system?
A company creates a database for its customers in which each customer is identified by their...
A company creates a database for its customers in which each customer is identified by their phone number. In this discussion, explore whether or not this is a function with your classmates. In your first post, address the following: Assign one variable as the input and the other variable as the output for this scenario. Is this relation a function? Justify your answer using the definition of a function, and explain your reasoning carefully. Do you think this is a...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT