Database Systems: Design, Implementation, & Management
Database Systems: Design, Implementation, & Management
12th Edition
ISBN: 9781305627482
Author: Carlos Coronel, Steven Morris
Publisher: Cengage Learning
bartleby

Concept explainers

Question
Book Icon
Chapter 6, Problem 3P

a.

Program Plan Intro

Normalization:

The process used to minimize data redundancy and dependency in a relational database is known as normalization. The database table is divided into two or more tables and defines the relationship between those tables.

Second normal form (2NF):

  • The value of all non-primary key attributes should be dependent on the primary key attribute.
    • If any attribute is depending on the partial primary key then it should determine the other attributes for an instance of the entity.
  • The partial dependencies should be removed from the data model.

Third normal form (3NF):

  • The value of any non-primary key attributes will not depend on any other non-primary key attributes.
    • If any non-primary key attributes depend on any other non-primary key attribute then it should be moved or deleted.
    • It is termed as transitive dependency.

Partial dependency:

A partial dependency exists at that time of an attributes depends only a part of primary key. This dependency is related with 1st normal form.

Transitive dependency:

A transitive dependency exists at that time of an attributes depends on another attribute which is not part of primary key.

Functional dependency:

An association between two attributes or two set of attributes in a same relational database table, which is having some constraints is known as functional dependency.

  • In a table one attribute is functionally dependent on another attribute to take one value.

a.

Expert Solution
Check Mark

Explanation of Solution

Construct the dependency diagram with all partial and transitive dependencies:

The relational schema for given INVOICE table is given below:

Invoice(INV_NUM, PROD_NUM, SALE_DATE, PROD_LABEL, VEND_CODE, VEND_NAME, QUANT_SOLD, PROD_PRICE)

  • Here, “INV_NUM” and “PROD_NUM” indicates the primary key.

The representation of dependency diagram with all partial and transitive dependencies is shown below:

Database Systems: Design, Implementation, & Management, Chapter 6, Problem 3P , additional homework tip  1

Explanation:

In the above dependency diagram,

  • The partial dependencies are,

    INV_NUM -> (SALE_DATE)

    PROD_NUM -> (PROD_LABEL, VEND_CODE, VEND_NAME, PROD_PRICE)

  • The transitive dependency is,

    VEND_CODE -> (VEND_NAME)

b.

Program Plan Intro

Normalization:

The process used to minimize data redundancy and dependency in a relational database is known as normalization. The database table is divided into two or more tables and defines the relationship between those tables.

Second normal form (2NF):

  • The value of all non-primary key attributes should be dependent on the primary key attribute.
    • If any attribute is depending on the partial primary key then it should determine the other attributes for an instance of the entity.
  • The partial dependencies should be removed from the data model.

Third normal form (3NF):

  • The value of any non-primary key attributes will not depend on any other non-primary key attributes.
    • If any non-primary key attributes depend on any other non-primary key attribute then it should be moved or deleted.
    • It is termed as transitive dependency.

Partial dependency:

A partial dependency exists at that time of an attributes depends only a part of primary key. This dependency is related with 1st normal form.

Transitive dependency:

A transitive dependency exists at that time of an attributes depends on another attribute which is not part of primary key.

Functional dependency:

An association between two attributes or two set of attributes in a same relational database table, which is having some constraints is known as functional dependency.

  • In a table one attribute is functionally dependent on another attribute to take one value.

b.

Expert Solution
Check Mark

Explanation of Solution

Construct the dependency diagram by removing all partial dependencies:

The new dependency diagram is represented by removing all partial dependencies in INVOICE table.

First table:

The relational schema for first table is given below:

 3NF(INV_NUM, PROD_NUM, SALE_DATE, QUANT_SOLD)

  • Here, “INV_NUM” and “PROD_NUM” indicates the primary keys.
  • The relation is in third normal form (3NF), since there is no transitive dependency and no repeated attributes.

The representation of dependency diagram removes all partial dependencies in first table are shown below:

Database Systems: Design, Implementation, & Management, Chapter 6, Problem 3P , additional homework tip  2

Second table:

The relational schema for second table is given below:

3NF(INV_NUM, SALE_DATE)

  • Here, “INV_NUM” indicates the primary key.
  • The relation is in third normal form (3NF), since there is no transitive dependency and no repeated attributes.

The representation of dependency diagram removes all partial dependencies in second table are shown below:

Database Systems: Design, Implementation, & Management, Chapter 6, Problem 3P , additional homework tip  3

Third table:

The relational schema for third table is given below:

2NF(PROD_NUM, PROD_LABEL, VEND_CODE, VEND_NAME, PROD_PRICE)

  • Here, “PROD_NUM” indicates the primary key.
  • The relation is in third normal form (2NF), since there is transitive dependency in table.

The representation of dependency diagram removes all partial dependencies in third table are shown below:

Database Systems: Design, Implementation, & Management, Chapter 6, Problem 3P , additional homework tip  4

c.

Program Plan Intro

Normalization:

The process used to minimize data redundancy and dependency in a relational database is known as normalization. The database table is divided into two or more tables and defines the relationship between those tables.

Second normal form (2NF):

  • The value of all non-primary key attributes should be dependent on the primary key attribute.
    • If any attribute is depending on the partial primary key then it should determine the other attributes for an instance of the entity.
  • The partial dependencies should be removed from the data model.

Third normal form (3NF):

  • The value of any non-primary key attributes will not depend on any other non-primary key attributes.
    • If any non-primary key attributes depend on any other non-primary key attribute then it should be moved or deleted.
    • It is termed as transitive dependency.

Partial dependency:

A partial dependency exists at that time of an attributes depends only a part of primary key. This dependency is related with 1st normal form.

Transitive dependency:

A transitive dependency exists at that time of an attributes depends on another attribute which is not part of primary key.

Functional dependency:

An association between two attributes or two set of attributes in a same relational database table, which is having some constraints is known as functional dependency.

  • In a table one attribute is functionally dependent on another attribute to take one value.

c.

Expert Solution
Check Mark

Explanation of Solution

Construct the dependency diagram by removing all transitive dependencies:

The new dependency diagram is represented by removing all transitive dependencies in INVOICE table.

First table:

The relational schema for first table is given below:

 3NF(INV_NUM, PROD_NUM, QUANT_SOLD)

  • Here, “INV_NUM” and “PROD_NUM” indicates the primary keys.
  • The relation is in third normal form (3NF), since there is no transitive dependency and no repeated attributes.

The representation of dependency diagram removes all partial dependencies in first table are shown below:

Database Systems: Design, Implementation, & Management, Chapter 6, Problem 3P , additional homework tip  5

Second table:

The relational schema for second table is given below:

3NF(INV_NUM, SALE_DATE)

  • Here, “INV_NUM” indicates the primary key.
  • The relation is in third normal form (3NF), since there is no transitive dependency and no repeated attributes.

The representation of dependency diagram removes all transitive dependencies in second table are shown below:

Database Systems: Design, Implementation, & Management, Chapter 6, Problem 3P , additional homework tip  6

Third table:

The relational schema for third table is given below:

3NF(VEND_CODE, VEND_NAME)

  • Here, “VEND_CODE” indicates the primary key.
  • The relation is in third normal form (3NF), since there is no transitive dependency and no repeated attributes.

The representation of dependency diagram removes all transitive dependencies in third table are shown below:

Database Systems: Design, Implementation, & Management, Chapter 6, Problem 3P , additional homework tip  7

Fourth table:

The relational schema for final table is given below:

2NF(PROD_NUM, PROD_LABEL, VEND_CODE, PROD_PRICE)

  • Here, “PROD_NUM” indicates the primary key.
  • The relation is in third normal form (3NF), since there is no transitive dependency and no repeated attributes.

The representation of dependency diagram removes all transitive dependencies are shown below:

Database Systems: Design, Implementation, & Management, Chapter 6, Problem 3P , additional homework tip  8

d.

Explanation of Solution

The representation of Crow’s Foot Entity Relational Diagram (ERD) is shown below:

The following data model shows the solution for the given question.

Database Systems: Design, Implementation, & Management, Chapter 6, Problem 3P , additional homework tip  9

Explanation:

  • In the above data model, one invoice can contains many invoice line.
    • The “INVOICE” entity contains the “INV_NUM” and “SALE_DATE” attributes.
      • The primary key of “INVOICE” entity is “INV_NUM”.
    • The “INV_LINE” entity contains the “INV_NUM”, “PROD_NUM” and “QUANT_SOLD” attributes.
      • The primary and foreign key of this entity is “INV_NUM”.
      • The foreign key of this entity is “PROD_NUM”.
  • The product is written in more than one invoice line.
    • The “PRODUCT” entity contains the “PROD_NUM”, “VEND_CODE”, “PROD_LABEL”, and “PROD_PRICE” attributes.
      • The primary key of “PROD_NUM” for this entity.
      • The foreign key of this entity is “VEND_CODE”.
  • The vendor supplies more than one product.
    • The “VENDOR” entity contains the “VEND_CODE” and “VEND_NAME” attributes.
      • The primary key of “VEND_CODE” entity.

Want to see more full solutions like this?

Subscribe now to access step-by-step solutions to millions of textbook problems written by subject matter experts!
Students have asked these similar questions
Change the following code so that there is always at least one way to get from the left corner to the top right, but the labyrinth is still randomized. The player starts at the bottom left corner of the labyrinth. He has to get to the top right corner of the labyrinth as fast he can, avoiding a meeting with the evil dragon. Take care that the player and the dragon cannot start off on walls. Also the dragon starts off from a randomly chosen position   public class Labyrinth {    private final int size;    private final Cell[][] grid;     public Labyrinth(int size) {        this.size = size;        this.grid = new Cell[size][size];        generateLabyrinth();    }     private void generateLabyrinth() {        Random rand = new Random();        for (int i = 0; i < size; i++) {            for (int j = 0; j < size; j++) {                // Randomly create walls and paths                grid[i][j] = new Cell(rand.nextBoolean());            }        }        // Ensure start and end are…
Change the following code so that it checks the following 3 conditions: 1. there is no space between each cells (imgs) 2. even if it is resized, the components wouldn't disappear 3. The GameGUI JPanel takes all the JFrame space, so that there shouldn't be extra space appearing in the frame other than the game.   Main():         Labyrinth labyrinth = new Labyrinth(10);         Player player = new Player(9, 0);        Dragon dragon = new Dragon(9, 9);         JFrame frame = new JFrame("Labyrinth Game");        GameGUI gui = new GameGUI(labyrinth, player, dragon);         frame.add(gui);        frame.setSize(600, 600);        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);        frame.setVisible(true);   public class GameGUI extends JPanel {    private final Labyrinth labyrinth;    private final Player player;    private final Dragon dragon; //labyrinth, player, dragon are just public classes     private final ImageIcon playerIcon = new ImageIcon("data/images/player.png");…
Make the following game user friendly with GUI, with some simple graphics. The GUI should be in another seperate class, with some ImageIcon, and Game class should be added into the pane. The following code works as this: The objective of the player is to escape from this labyrinth. The player starts at the bottom left corner of the labyrinth. He has to get to the top right corner of the labyrinth as fast he can, avoiding a meeting with the evil dragon. The player can move only in four directions: left, right, up or down. There are several escape paths in all labyrinths. The player’s character should be able to moved with the well known WASD keyboard buttons. If the dragon gets to a neighboring field of the player, then the player dies. Because it is dark in the labyrinth, the player can see only the neighboring fields at a distance of 3 units.  Cell Class: public class Cell { private boolean isWall; public Cell(boolean isWall) { this.isWall = isWall; } public boolean isWall() { return…
Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Text book image
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Text book image
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
Text book image
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education