Question

In: Computer Science

Task 6 Using the following table structure, identify all functional dependences and then decompose this table...

Task 6

Using the following table structure, identify all functional dependences and then decompose this table into a set of 3NF relations. Your answer should:

  • List the functional dependences
  • Contain the relational schema for the relations in 3NF.

CharId

CharName

ActorName

FigId

OwnerId

Pseudonym

Vader

Darth Vader

David Prowse

f14

Bill

Jabba the Hoot

Vader

Darth Vader

David Prowse

f22

Amy

Don’t Blame Me

Yoda

Yoda

Frank Oz

f16

Lucy

Xena Warrior

Leia

Princess Leia

Carrie Fisher

f45

Bill

Jabba the Hoot

Leia

Princess Leia

Carrie Fisher

f99

Amy

Don’t Blame Me

Solutions

Expert Solution

Given Schema:

Let the given table be CharacterFigure:

CharacterFigure: (CharId, CharName, ActorName, FigId, OwnerId, Pseudonym)

where primary key is a composite key of CharId and OwnerId

The following functional dependencies exist:

(CharId,OwnerId) ( CharName, ActorName, FigId, Pseudonym)

CharId CharName, ActorName

OwnerId Pseudonym

First Normal Form(1NF) - 1NF disallows multi-valued attributes , composite attributes and their combinations. The domain of attributes must include only atomic values hence it disallows sets of values, tuple of values or a combination of both as an attribute value for a single tuple.

Since the above schema, doesn't contain any attribute with sets of values or tuple of values or any combination of both, the schema is in 1NF.

After 1NF:

CharacterFigure: (CharId, CharName, ActorName, FigId, OwnerId, Pseudonym)

where primary key is a composite key of CharId and OwnerId

The following functional dependencies exist:

(CharId,OwnerId) ( CharName, ActorName, FigId, Pseudonym)

CharId ( CharName, ActorName)

OwnerId Pseudonym

Second Normal Form (2NF) - A Relational Schema, R, is in 2NF if every non-prime attribute , A in R is fully functionally dependent on the primary key of R.

  • A prime attribute is a part of a key whereas non-prime attribute is not part of any key of R.
  • A functional dependency XY, is a full functional dependency if removal of any attribute A from X means that the dependency doesn't hold anymore.
  • A functional dependency, XY is a partial dependency is some attribute A X can be removed and the functional dependency still holds.

In the above Schema, CharName and ActorName are partially dependent on CharId and Pseudonym is partially dependent on OwnerId. In order to convert the Schema to 2NF , we remove CharId, CharName and ActorName from the table CharacterFigure and create a new table, say Character with CharId, CharName and ActorName where CharId is the primary key of Character which in CharacterFigure forms the foreign key of Character table.

Similarly, we remove OwnerId and Pseudonym from CharacterFigure and create another table say, Owner with fields OwnerId and Pseudonym where OwnerId is the primary key of Owner table and forms foreign key of Owner table in CharacterFigure table.

After 2NF:

Character : (CharId, CharName, ActorName)

where CharId is the primary key

The following functional dependencies exist:

CharId (CharName, ActorName)

Owner : (OwnerId, Pseudonym)

where OwnerId is the primary key

The following functional dependencies exist:

OwnerId Pseudonym

CharacterFigure: (CharId, FigId, OwnerId)

where CharId is the foreign key of Character table

OwnerId is the foreign key of Owner table

composite key of (CharId, OwnerId) is the primary key of CharacterFigure table

The following functional dependencies exist:

(CharId,OwnerId) FigId

Third Normal Form(3NF) : A Relational Schema, R, is in 3NF if it is in 2NF and no non-prime attribute of R is transitively dependent on the primary key. A Relational Schema, R, is in 3NF if whenever a functional dependency XA holds in R either:

  • X is the super key of R, or
  • A is a prime attribute of R

A functional dependency XY in a Relational schema R, is a transitive dependency if there is a set of attributes Z that is not a subset of any key of R and both XZ and ZY holds.

In the above schema, no tables contains any transitive dependency.

After 3NF:

Character : (CharId, CharName, ActorName)

where CharId is the primary key

The following functional dependencies exist:

CharId (CharName, ActorName)

Owner : (OwnerId, Pseudonym)

where OwnerId is the primary key

The following functional dependencies exist:

OwnerId Pseudonym

CharacterFigure: (CharId, FigId, OwnerId)

where CharId is the foreign key of Character table

OwnerId is the foreign key of Owner table

composite key of (CharId, OwnerId) is the primary key of CharacterFigure table

The following functional dependencies exist:

(CharId,OwnerId) FigId


Related Solutions

Task 1. For each table on the list, identify the functional dependencies. List the functional dependencies....
Task 1. For each table on the list, identify the functional dependencies. List the functional dependencies. Normalize the relations to BCNF. Then decide whether the resulting tables should be implemented in that form. If not, explain why. For each table, write the table name and write out the names, data types, and sizes of all the data items, Identify any constraints, using the conventions of the DBMS you will use for implementation. Write and execute SQL statements to create all...
Task # 3:          Identify Functional and Non-Functional Requirements for the given system description: The proposed...
Task # 3:          Identify Functional and Non-Functional Requirements for the given system description: The proposed software product is the Hospital Patient Info Management System (HPIMS). The system will be used to get the information from the patients and then storing that data for future usage. The current system in use is a paper-based system. It is too slow and cannot provide updated lists of patients within a reasonable timeframe. The intentions of the system are to reduce over-time pay...
What are the advantages and disadvantages of using a functional structure? Could a matrix structure be...
What are the advantages and disadvantages of using a functional structure? Could a matrix structure be used across a large corporate organization? Why or why not? What factors could determine the appropriate span of a manger's control? What are the corporate office's key concerns in creating and implementing strategy? Why?
define all these Organizational structure - Simple organizational structure - Functional organizational structure - Multidivisional organizational...
define all these Organizational structure - Simple organizational structure - Functional organizational structure - Multidivisional organizational structure - Matrix organizational structure - International organizational structure - Network structure - Boundaryless organizational designs - Barrier free organizations - Modular organizations - Virtual organizations - Centralized decision making - Decentralized decision making - Informal organizational structure - Building an organization for execution Staffing the organization - Managing resources and capabilities- Structuring the organization - Three approaches to building resources and capabilities Developing...
Problem 1. Using the INVOICE table structure shown in table below do the following: INVOICE Attribute...
Problem 1. Using the INVOICE table structure shown in table below do the following: INVOICE Attribute Name Sample Value Sample Value Sample Value Sample Value Sample Value INV_NUM 211347 211347 211347 211348 211349 PROD_NUM AA-E3422QW QD-300932X RU-995748G AA-E3422QW GH-778345P SALE_DATE 15-Jan-2016 15-Jan-2016 15-Jan-2016 15-Jan-2016 16-Jan-2016 PROD_LABEL Rotary sander 0.25-in. drill bit Band saw Rotary sander Power drill VEND_CODE 211 211 309 211 157 VEND_NAME NeverFail, Inc. NeverFail, Inc. BeGood, Inc. NeverFail, Inc. ToughGo, Inc. QUANT_SOLD 1 8 1 2 1...
Determine the Functional Dependencies that exist in the following Orders table. This table lists customer and...
Determine the Functional Dependencies that exist in the following Orders table. This table lists customer and order data. Orders (SupplierNum, SupplierName, Supp_Phone, ProductNum, Description, Product_type, QuotedPrice) . Normalize the above relation to 3 rd normal form, ensuring that the resulting relations are dependency-preserving and specify the primary keys in the normalized relations by underlining them.
Identify major classes of biomolecules and characteristic functional groups Draw the structure of water molecules including...
Identify major classes of biomolecules and characteristic functional groups Draw the structure of water molecules including atoms, orbital hybridization, bonds, lone pairs, partial charges, and dipole moments
For the sample Data given create a frequency table using 6 classes. Find all relative and...
For the sample Data given create a frequency table using 6 classes. Find all relative and cumulative frequencies Data:94.7, 106.1, 117.5, 128.9, 135.5, 139.2, 142.3, 143.1, 144.5, 152.5, 156.4, 158.5, 159.6, 165.7, 166.5, 173.2, 175.5, 188.0, 199.0, 216.1 Use the frequencies found in the table above to sketch the histogram for the distribution. Use the class boundaries for the horizontal axis.
Write all application functional specification for the following application, just the functional specification thanks. Develop a...
Write all application functional specification for the following application, just the functional specification thanks. Develop a shopping cart application (think of a simplified version of amazon.com). When the application begins, it shows a login window. Depending who logs in, a customer or the seller, the application performs different functions. Minimal Functional Specification: Here is a draft version of a minimal functional specification. Students have to adapt it, extend it, and make it their own: A customer logs in with a...
Identify all the actors who will be using the system.
SCENARIOTextbooks R Us is a small business that was set up 20 years ago to facilitate the physical sale of second-hand textbooks for University students. They would now like to change their business model to an e-business model where they only sell their books online. Its business will run entirely on the Internet and students will be able to sell and purchase books via their website. This will allow the business to increase their market as they will not be...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT