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]
Write an algorithm to find the primary key and foreign key(s)? (Every programming language is accepted.)
Write an algorithm to find the primary key and foreign key(s)? (Every programming language is accepted.)
What is the difference between a superkey, candidate key, and a primary key in a normalized...
What is the difference between a superkey, candidate key, and a primary key in a normalized database?
Q3. Convert the conceptual database into a relational database schema. Identify the primary key and foreign...
Q3. Convert the conceptual database into a relational database schema. Identify the primary key and foreign key constraints. Q4. Show all the functional dependencies that should hold among the attributes. Q5. Design relation schemas for the database that are each in 3NF. Specify the primary and foreign key attributes of each relation. Hi expert! Can you help me with the above questions? I'm not asking you to solve my questions but want to find what each questions actually requires me...
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...
create table candidate ( cand_id   varchar(12) primary key,   -- cand_id name       varchar(40)           --...
create table candidate ( cand_id   varchar(12) primary key,   -- cand_id name       varchar(40)           -- cand_nm ); create table contributor ( contbr_id   integer primary key, name       varchar(40),           -- contbr_nm city     varchar(40),           -- contbr_city state       varchar(40),           -- contbr_st zip       varchar(20),           -- contbr_zip employer   varchar(60),           -- contbr_employer occupation   varchar(40)           -- contbr_occupation ); create table contribution ( contb_id   integer primary key, cand_id   varchar(12),           --...
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
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT