Question

In: Computer Science

Identify every possible primary key, candidate key, and foreign key for the following relations. Separate each...

Identify every possible primary key, candidate key, and foreign key for the following relations. Separate each key using a semicolon to avoid confusion.

Assumptions: MIScompany has branches located in several states within the United States. A customer can be an individual or organization. driverId is the driving license number, ssno is the social security number and upc is the universal product code. Any equipment is rented and returned at the same branch. A customer can be a manufacturer and vice versa. (Minus 1 point for each wrong answer)

            MIScompany (name, address, phone, email, FedTaxId, StaTaxId)

           

Primary key:

Candidate key:

Foreign key: none

branch (branchId, name, address, phone, email, FedTaxId, StaTaxId)

Primary key:

Candidate key:

Foreign key:

employee (empId, driverId, ssno, name, branchId)

Primary key:

Candidate key:

Foreign key:

customer (custId, name, address, driverId, ssno, FedTaxId, StaTaxId)

Primary key:   

Candidate key:

Foreign key:

equipment (equipId, type, upc, purchaseDate, year, manufacturId, cost, rentFee, branchId)

Primary key:

Candidate key:

Foreign key:

manufacturer (manufacturId, name, FedTaxId, StaTaxId, phone, email)

Primary key:

Candidate key:

Foreign key:

rental (rentalId, equipId, custId, rentDate&time, returnDate&time, empId, branchId)

Primary key:

Candidate key:

Foreign key: equipId;

Solutions

Expert Solution

MIScompany (name, address, phone, email, FedTaxId, StaTaxId)

Primary key:Email

Candidate key:Name and address,email

Foreign key: none

branch (branchId, name, address, phone, email, FedTaxId, StaTaxId)

Primary key:branchid

Candidate key:name and phone

Foreign key:FedTaxId, StaTaxId

employee (empId, driverId, ssno, name, branchId)

Primary key:empid

Candidate key:driverid,empid

Foreign key:ssno,branchid

customer (custId, name, address, driverId, ssno, FedTaxId, StaTaxId)

Primary key: custid

Candidate key:driverid,StaTaxid

Foreign key:FedTaxId, StaTaxId

equipment (equipId, type, upc, purchaseDate, year, manufacturId, cost, rentFee, branchId)

Primary key: Equipid

Candidate key:Equipid,manufacturid

Foreign key:type,branchid

manufacturer (manufacturId, name, FedTaxId, StaTaxId, phone, email)

Primary key:manufactuId

Candidate key:email,phone,StaTaxId

Foreign key:FedTaxId,StaTaxId

rental (rentalId, equipId, custId, rentDate&time, returnDate&time, empId, branchId)

Primary key:empId

Candidate key:rentalId, equipId, custId,empId

Foreign key: equipId;


Related Solutions

what is super key,  candidate key, and primary key, and foreign key in terms of database? and...
what is super key,  candidate key, and primary key, and foreign key in terms of database? and plz provide some examples, thanks.
Normalize the following relations. Show possible candidate/primary keys and the functional dependencies. Explain the normal form...
Normalize the following relations. Show possible candidate/primary keys and the functional dependencies. Explain the normal form in which the relation is currently in (based on the sample data) and how do you break the relations to get 3rd Normal Form. Show the new relations obtained after normalization and underline the candidate/primary key in each new relation and italic the foreign key. Relation 1: COLLEGE PARKING TICKET (STID, LName, FName, PhoneNo, StateLic, LicNo, Ticket#, Date, Code, Fine) (Illustrated with sample data)...
1a) i) Explain the candidate key, primary key and foreign key with suitable examples [6] ii)...
1a) i) Explain the candidate key, primary key and foreign key with suitable examples [6] ii) Draw a suitable ER diagram to show the “IS-A” relationship between subtype and supertype [5] iii) Briefly explain the recursive relationship with a suitable example. [2]
Database Problem description:1. What is the difference between a candidate key and the primary key for...
Database Problem description:1. What is the difference between a candidate key and the primary key for a given relation? What is a superkey? 2. What is a foreign key constraint? Why are such constraints important? What is referential integrity? 3. Answer teach of the following questions. The questions are based on the following relational schema:Emp(eid: integer, ename: string, age: integer, salary: real)Works(eid: integer, did: integer, pct_time: integer)Dept(did: integer, dname: string, budget: real, managerid: integer) (1) Write the SQL statements required...
what does a primary key and foreign key relates to? Which drive does a magnet damage...
what does a primary key and foreign key relates to? Which drive does a magnet damage the most what the Raid differences ? what a NIC does what is NAS and what's it used for and how it can be used in a network setting which device has a built in antenna what RF is used for (Radio Frequency )
Identify one primary strength and one primary weakness for each of the following methods of investment...
Identify one primary strength and one primary weakness for each of the following methods of investment analysis: A. Net present value B. Internal rate of return C. Payback
For each of the following separate government policies, discuss a possible unintended consequence resulted from the...
For each of the following separate government policies, discuss a possible unintended consequence resulted from the policy. (a) People who are unemployed can receive money from the government. (b) Homeless people in Seattle can receive free food from the government. (c) People can receive money from the government if they give up and turn in their guns to the government.
Assuming Database is not providing Referential Integrity Constraints support i-e Primary key, foreign key and Unique...
Assuming Database is not providing Referential Integrity Constraints support i-e Primary key, foreign key and Unique key, your task is to design a database engine with your own built in Referential integrity rules implementation and you need that only one database connection is maintained which an application should access. Recommend proper design pattern used for the stated problem. Give reasons for selecting that pattern, create complete class diagram for the solution. The class diagram should also show the methods of...
Investment analysis Identify one primary strength and one primary weakness for each of the following methods...
Investment analysis Identify one primary strength and one primary weakness for each of the following methods of investment analysis: A. Net present value B. Internal rate of return C. Payback Please explain in depth.
Question 16 Question 16) for each of the following separate cases, identify if the case is...
Question 16 Question 16) for each of the following separate cases, identify if the case is error or change in accounting estimate and identify the correct accounting treatment. A) In 2019, after the entity’s 2018 financial statements were approved for issue, the entity discovered that, as a result of a computational error, depreciation expense for 2018 was understated by AED 1,000. B) the CFO in Company WXY had decided to change the recognition method of investment properties from cost model...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT