Relational Databases Chapter 14
45 Questions
0 Views

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

Which of the following are considered problems caused by redundant information in a relational database?

  • Insertion anomalies
  • Deletion anomalies
  • Modification anomalies
  • All of the above (correct)
  • The EMP_DEPT relation exhibits redundancy because it stores department information for each employee.

    True (A)

    What is the main goal of schema design in relational databases?

    To minimize storage space used by base relations.

    Anomalies that occur when attempting to insert new data into a relation are called _______ anomalies.

    <p>insertion</p> Signup and view all the answers

    Match the following terms with their definitions in relation to database anomalies caused by redundancy:

    <p>Insertion Anomaly = Deleting a tuple may unintentionally remove information about an entity Deletion Anomaly = Adding a new tuple requires entering unnecessary or redundant information Modification Anomaly = Updating information requires modifying multiple tuples to maintain consistency</p> Signup and view all the answers

    What is the main purpose of normalization in relational database design?

    <p>To eliminate data redundancy and improve data integrity (B)</p> Signup and view all the answers

    In practical database design, it is always necessary to normalize relations to the highest possible normal form.

    <p>False (B)</p> Signup and view all the answers

    What is the primary difference between 2NF and 3NF?

    <p>2NF addresses partial dependencies, while 3NF addresses transitive dependencies. In other words, 2NF ensures that non-key attributes are fully dependent on the entire primary key, while 3NF eliminates dependencies between non-key attributes.</p> Signup and view all the answers

    The process of storing the join of higher normal form relations as a base relation is known as ______.

    <p>denormalization</p> Signup and view all the answers

    Match the normal forms with their primary focus:

    <p>2NF = Eliminates partial dependencies 3NF = Eliminates transitive dependencies 4NF = Addresses multi-valued dependencies 5NF = Addresses join dependencies</p> Signup and view all the answers

    Which of these is NOT a desirable property for a relational database design?

    <p>Data redundancy (D)</p> Signup and view all the answers

    A superkey is a set of attributes that uniquely identifies all tuples in a relation.

    <p>True (A)</p> Signup and view all the answers

    What is a candidate key?

    <p>A candidate key is a minimal superkey, meaning that removing any attribute from the key would make it no longer a superkey.</p> Signup and view all the answers

    What is a primary goal of the informal design guidelines for relation schemas?

    <p>To ensure clarity of attribute semantics (B)</p> Signup and view all the answers

    Attributes of different entities should be mixed in the same relation.

    <p>False (B)</p> Signup and view all the answers

    What should be kept apart according to the informal design guidelines?

    <p>Entity and relationship attributes</p> Signup and view all the answers

    Each tuple in a relation should represent one _____ or relationship instance.

    <p>entity</p> Signup and view all the answers

    Match the following informal design guidelines with their descriptions:

    <p>Clarity of attribute semantics = Ensures ease of interpretation Reduction of redundant information = Eliminates unnecessary duplication Minimizing NULL values = Reduces incomplete data representation Disallowing false tuples = Prevents erroneous data entries</p> Signup and view all the answers

    Which of the following best describes the impact of NULL values in tuples?

    <p>NULL values should be minimized. (C)</p> Signup and view all the answers

    Foreign keys should be used to directly mix attributes of different entities.

    <p>False (B)</p> Signup and view all the answers

    What is one consequence of violating Guideline 1?

    <p>Mixing attributes of different entities</p> Signup and view all the answers

    What does the Employee SSN functional dependency imply?

    <p>An employee's name can be derived from their SSN. (A)</p> Signup and view all the answers

    If two tuples have the same Project Number, they must have different Project Names.

    <p>False (B)</p> Signup and view all the answers

    What does a composite dependency signify?

    <p>A combination of key attributes determines another value.</p> Signup and view all the answers

    A functional dependency implies that if two tuples share the same value for ______, they must also share the same value for ______.

    <p>X; Y</p> Signup and view all the answers

    Match the following functional dependencies with their descriptions:

    <p>SSN → ENAME = Determines the employee's name PNUMBER → {PNAME, PLOCATION} = Determines both the project name and location {SSN, PNUMBER} → HOURS = Determines hours worked for a specific project Teacher → Course = Relates teachers to the courses they teach</p> Signup and view all the answers

    Which option can be ruled out as a functional dependency based on the state of the TEACH relation?

    <p>Teacher → Text (A), Teacher → Course (C), Course → Text (D)</p> Signup and view all the answers

    Identifying functional dependencies relies solely on the database schema without considering actual data.

    <p>False (B)</p> Signup and view all the answers

    What happens if a proposed functional dependency is not valid?

    <p>It means there are cases where the expected pattern does not occur.</p> Signup and view all the answers

    Which kind of anomaly occurs if an employee tuple representing the last employee in a department is deleted?

    <p>Deletion anomaly (D)</p> Signup and view all the answers

    It is easy to insert a new project into the EMP_PROJ relation that has no employees yet.

    <p>False (B)</p> Signup and view all the answers

    What must be updated in the EMP_PROJ relation if one of the project attributes is changed?

    <p>The tuples of all employees working in that project</p> Signup and view all the answers

    A functional dependency is expressed as 𝑋→_______.

    <p>𝑌</p> Signup and view all the answers

    Match the anomalies with their descriptions.

    <p>Deletion anomaly = Losing department information when the last employee is deleted Modification anomaly = Failing to update related employee tuples when a project attribute changes Insertion anomaly = Difficulty adding a project without employees to the database</p> Signup and view all the answers

    Which of the following is a characteristic of functional dependencies?

    <p>They represent constraints between two attribute sets (A)</p> Signup and view all the answers

    Functional dependency can exist only if one attribute does not determine another.

    <p>False (B)</p> Signup and view all the answers

    What does normalization of relations help to achieve in a database?

    <p>Reduce redundancy and eliminate anomalies</p> Signup and view all the answers

    What is the purpose of reducing data redundancy in databases?

    <p>To ensure all data attributes rely only on the primary key (A)</p> Signup and view all the answers

    A full functional dependency means that if any attribute is removed from the determinant, the dependency still holds.

    <p>False (B)</p> Signup and view all the answers

    What is a prime attribute?

    <p>An attribute that is a member of the primary key.</p> Signup and view all the answers

    A ______ functional dependency is a dependency that cannot be derived from other functional dependencies.

    <p>full</p> Signup and view all the answers

    Which of the following describes a transitive functional dependency?

    <p>Dependency that can be derived from multiple functional dependencies (A)</p> Signup and view all the answers

    To be in Third Normal Form (3NF), a table must be in 2NF and have no columns that are transitively dependent on the primary key.

    <p>True (A)</p> Signup and view all the answers

    What does 2NF stand for in database normalization?

    <p>Second Normal Form</p> Signup and view all the answers

    Match the following terms with their definitions:

    <p>Prime attribute = An attribute that is a member of the primary key Full functional dependency = Dependency where removal of any attribute means the FD does not hold Transitive functional dependency = A dependency that can be derived from other dependencies Third Normal Form (3NF) = A table must be in 2NF and have no transitive dependencies</p> Signup and view all the answers

    Study Notes

    Chapter 14: Basics of Functional Dependencies and Normalization for Relational Databases

    • Relational database design guidelines focus on grouping attributes to create "good" relation schemas.
    • Informal guidelines for relation schemas involve ensuring attribute semantics are clear, reducing redundant information in tuples, reducing null values, and preventing spurious tuples.
    • Semantics of relational attributes must be clear to represent one entity or relationship instance, and attributes of different entities should not be mixed in the same relation.
    • Relational attributes should reflect entity and relationship attributes separately to enhance understandability.
    • Redundant information in tuples and update anomalies are schema design challenges.
    • Minimizing storage space and addressing unexpected issues during updates, insertions, and deletions are important schema design goals.
    • Insertion, deletion, and modification anomalies are update anomalies in relations.
    • They are caused by redundant information stored in a relation, potentially leading to errors or data inconsistencies.
    • Avoiding the generation of spurious tuples is crucial for a good database design. A relation should satisfy the lossless join property, preventing the creation of results that don't make sense.
    • Functional dependency (FD) exists when one attribute (or a group of attributes) uniquely determines another attribute.
    • An FD is a constraint between two sets of attributes in a database.
    • If two tuples have the same attribute value for X, they should have the same value for Y.
    • Normal forms (1NF, 2NF, 3NF) help organize attributes and address redundancy.
    • 1NF: Eliminates duplicate records and ensures each column contains values of a single type.
    • 2NF: Nonkey attributes must be fully functionally dependent on the entire primary key, eliminating partial dependencies.
    • 3NF: Nonkey attributes depend only on the primary key, no transitive dependencies.
    • Normalization involves decomposing relations to remove redundancy and update anomalies.
    • Attributes participating in keys (superkeys, keys, candidate keys, primary keys, prime attributes, nonprime attributes) determine the role attributes play in relational schema design.
    • Normal forms, such as 1NF, 2NF, and 3NF, progressively enforce stronger constraints aimed at reducing redundancy.

    Studying That Suits You

    Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

    Quiz Team

    Related Documents

    Description

    This quiz covers the fundamentals of functional dependencies and normalization in relational database design. Learn how to create effective relation schemas by minimizing redundancy and ensuring clarity in attributes. Understand how to handle update anomalies and improve schema design through careful consideration of entity and relationship attributes.

    More Like This

    Lentelės schema
    3 questions

    Lentelės schema

    EyeCatchingCourage avatar
    EyeCatchingCourage
    Relational Database Design Quiz
    5 questions
    Relational Database Design Overview
    10 questions
    Use Quizgecko on...
    Browser
    Browser