Lab – Exploring BA342 Company Database

Enter your First and Last Name here: 1
Enter your NetID (email id) here:

Examine the tablesin the BA342 database and record the primary keys, foreign keys (if any), and the total number of records for each table in the grid below.
Table Primary Key Foreign Key(s) Number of Records
Categories Category ID 31
Customers Customer ID 770
Employees Employee ID 9
OrderLines Order ID/Product ID Product ID, Order ID 4646
Orders Order ID Customer ID, employee ID 1881
Products Product ID Supplier ID, categories ID 289
SaleLines Sales Invoice ID/Product ID Sales invoice ID and Product ID 4474
Sales Sales Invoice ID Customer ID ,order ID, employee ID, shipper ID 1818
Shippers Shipper ID 3
Suppliers Supplier ID 29

Find table(s) in the database that have date attributesand for each data attribute you find, fill in the grid below with the table name, the attribute name, and the date range. (Note, the number of rows provided in the grid may not be the numberyou will need.)
Table Name Date Attribute Name Oldest date Newest date

Tablesmay havebinary attributes which means the data is a true/false or yes/nooption. Find tables(s) in the database with binary attribute(s) and in the grid below,list the table name, the name of the attribute, and describe the meaningof yes versus no (i.e., what does yes mean vs. no). (Note, the number of rows provided in the grid may not be the number you will need.)
Table Name Attribute Name Attribute Description
Products Disc Yes continues and no a longer available (if checked)
Answer the following questions:
1. In the Employee table, what is the first and last name of the employee who is identified by the primary key 3, and what is the attribute name of the primary key for that table?
Janet Leverling EmployeeID

READ ALSO :   PUBLIC POLICY IMPACTS ON A CALIFORNIA CORPORATION

2. In the Supplier table, what is the company name of the supplier identified by the primary key 6and what is the attribute name of the primary key for that table?
Mayumi’s Supplier ID

3. In the Customer table, what is the first and last name of the customer identified by the primary key 37and what is the attribute name of the primary key for that table?
Aya Rebecca Customers ID

4. Whatwas the required date requested by the customer for Order #20100, and in which table is that information found?
11/22/2012 orders

5. What is the Order ID # of the order that is related to Sales Invoice #10009, and in which table is that information found?
20019 Sales

6. What are theProduct ID #s of the products that were ordered on Order ID #20015, and in which table is that information found?
31,39,49 Orderlines

7. Whatare the Product names of the products that were sold on Sales Invoice ID #10012, and which table(s) must be reviewed to find that information?
Sir Rodney’s scones & Gravad lax (product IDs 21&37)

8. What is the name of the shipper that shipped Sales Invoice ID #10012, and in which table is that information found?
Federal shipping (shipper ID 3) Shipper (start with sales first to get shipping ID)

9. What is the purpose of foreign keys in a database, such as those found in the Sales table?
TAKE ADVANTAGE OF OUR PROMOTIONAL DISCOUNT DISPLAYED ON THE WEBSITE AND GET A DISCOUNT FOR YOUR PAPER NOW!