Question

7. A relation schema is given as SalesRecord(sID, sName, cID, CID, PNo, pName, quantity). The functional dependencies are fd1

0 0
Add a comment Improve this question Transcribed image text
Answer #1

SalesRecord(sID,sName,cID,pNo,pName,quantity)

sID,cID--->pNo,pName,quantity

sID--->sName

cID--->cName

pNo--->pName   candidate key=sID,cID

for 1NF:   sID,cID--->pNo

sID,cID--->pName

sID,cID--->quantity

sID--->sName

cID--->cName

pNo--->pName Therefore 1NF satisfied.

for 2NF: candidate key=sID,cID prime attributes: {sID,cID}

non-prime attributes: {sName,cID,pNo,pName,quantuty,cName}

sID,cID--->pNo : total dependency

sID,cID--->pName : total dependency

sID,cID--->quantity : total dependency

sID--->sName : partial dependency

cID--->cName : partial dependency

pNo--->pName : total dependency

R:[sID,cID,,pNo,pName,quantity] R1:[sID,sName,cID,cName]

sID,cID--->pNo sID--->sName   

sID,cID--->pName   cID--->cName

sID,cID--->quantity

pNo--->pName Therefore, 2NF satisfied.

for 3NF: sID,cID--->pNo :it is in 3NF

sID,cID--->pName :it is in 3NF

sID,cID--->quantity :it is in 3NF

pNo--->pName :it is not in 3NF, because there is transitive dependency.

R:[sID,cID,,pNo,pName,quantity] R1:[sID,sName,cID,cName] R2:[pNo,pName]

sID,cID--->pNo sID--->sName pNo--->pName

sID,cID--->pName   cID--->cName

sID,cID--->quantity

Now, 3NF is satisfied.

  

Add a comment
Know the answer?
Add Answer to:
7. A relation schema is given as SalesRecord(sID, sName, cID, CID, PNo, pName, quantity). The functional...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • 2. Consider an 1NF- relation StudentDB2 (sID, sFName, sLName, cID, cName, cCr, sectID, iID, iTitle, iLName,...

    2. Consider an 1NF- relation StudentDB2 (sID, sFName, sLName, cID, cName, cCr, sectID, iID, iTitle, iLName, grade) that satisfies the following five functional dependencies:  FD1 {sID}->{sFName, sLName}  FD2 {cID}->{cName, cCr}  FD3 {cID, sectID}->{iID}  FD4 {iID}->{iTitle, iLName}  FD5 {sID, cID, sectID}->{grade} a. What is/are candidate key(s) for relation StudentDB2? b. Normalize the relation StudentDB2 into a collection of 2NF-relations. c. Normalize the relation StudentDB2 into a collection of 3NF-relations. d. Normalize the relation StudentDB2 into a...

  • Consider the following relation R, where {A, B} is its PK. Assume that R is in...

    Consider the following relation R, where {A, B} is its PK. Assume that R is in the first normal form (INF). R (A, B, C, D, E, F) Functional dependencies: FD1: BàC FD2: AàDE FD3: ABàF Why is this table not in 2NF? Specify which FDs make R violate 2NF. Normalize the data shown in this table to second normal form (2NF). Specify the primary and foreign key (if any) in each table of your 3NF relations. Normalize the data...

  • 1) Consider the relation R, with key and functional dependencies shown below. What Normal form is...

    1) Consider the relation R, with key and functional dependencies shown below. What Normal form is R in right now? Why is this the case? What actions would you take to normalize R to the next higher normal form? (Describe the steps) Follow the steps you described in the prior question to normalize R to the next higher form. Be sure to show all of the steps. Once you have normalized R, what normal forms are each the two new...

  • Normalize EVERY relation to 3NF step by step Q1: Given the following table, identify the functional...

    Normalize EVERY relation to 3NF step by step Q1: Given the following table, identify the functional dependencies VisitID InvoiceDate Invoice Amt Invoiceltem 1002 11/09/2016 $65.00 Updated shots 1002 11/09/2016 $45.00 Flea & tick medications 1006 11/14/2016 $35.00 Heartworm medication 1006 11/14/2016 $65.00 Updated shots 1006 11/14/2016 $75.00 Lab work 1009 11/16/2016 $50.00 Grooming 1009 11/16/2016 $15.00 Nail trim 1012 11/21/2016 $65.00 Updated shots 1012 11/21/2016 $75.00 Lab work 1013 11/21/2016 $65.00 Updated shots 1013 11/21/2016 $75.00 Lab work 1014 11/21/2016...

  • EXERCISE 1 (SQL Queries) Consider the following schema: SUPPLIERS (SID : integer, SNAME : string, CITY...

    EXERCISE 1 (SQL Queries) Consider the following schema: SUPPLIERS (SID : integer, SNAME : string, CITY : string) PARTS (PID : integer, PNAME : string, COLOR : string) CATALOG (SID : integer, PID : integer, COST : real) The key fields are underlined, and the domain of each field is listed after the field name. Thus, SID is the key for SUPPLIERS, PID is the key for PARTS, and SID and PID together form the key for CATALOG. The CATALOG...

  • Exercise 4 Determine whether or not the following Σ11 and Σ12 are equivalent. Show and explain...

    Exercise 4 Determine whether or not the following Σ11 and Σ12 are equivalent. Show and explain your answer R1= {A, B, C}, Σ11 = {A->B, A->C, C->A} and Σ12 = {A->B, AB->C, A->C, C->A} on R1, respectively. Exercise 5 Decompose the following into BCNF R = (A, B, C) F = {A → B, B → C} Exercise 6 George withdraws $100 from his account (T1) while Mary deposits$500 into George’s account (T2) in the following transaction process. Draw up...

  • Consider the following schema: SUPPLIERS (SID: integer, SNAME: string, STREET: string, CITY: string, ZIP: string) PARTS...

    Consider the following schema: SUPPLIERS (SID: integer, SNAME: string, STREET: string, CITY: string, ZIP: string) PARTS (PID: integer, PNAME: string, COLOR: string) CATALOG (SID: integer, PID: integer, COST: real) The primary key attributes are underlined, and the domain of each attribute is listed after the attribute name. Thus, SID is the primary key for SUPPLIERS, PID is the primary key for PARTS, and SID and PID together form the primary key for CATALOG. Attribute SID in CATALOG is a foreign...

  • Help ASAP! 1. (10 pts) Given a relation schema R = (A, B, C, D, G,...

    Help ASAP! 1. (10 pts) Given a relation schema R = (A, B, C, D, G, H) and a set of functional dependencies F = {D -> G, CD -> G, D -> C, H -> G} Find FC, a canonical cover of F. Please show all the steps to get your answer.    2. (30 pts) A Hollywood movie studio uses a relation called Movie to keep track of information about movie stars, what fee a star charges for...

  • Given the following relational schema, write queries in SQL to answer the English questions. The Access...

    Given the following relational schema, write queries in SQL to answer the English questions. The Access Database for the schema is available, as is a DDL file. It is also available on the MySQL server. You must only submit the SQL for your answers. You can get your answers without using a DBMS or by using Access or MySQL. Customer(cid: integer, cname: string, address: string, city: string, state: string) Product(pid: integer, pname: string, price: currency, inventory: integer) Shipment(sid: integer, cid:...

  • This is extra information about the shopping database given to answer this question: For many query...

    This is extra information about the shopping database given to answer this question: For many query questions we refer to the following database schema for a website that keeps track of what people like to buy or actually buy in different on-line supermarkets. (Think of something like a cross-store loyalty card system.) customer(cID, cName, street, city) Customers with unique cID and other attributes store(sID, sName, street, city) Stores with a unique ID and other attributes. Stores with the same name...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT