Fundamentals of Databases
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

What is the correct interpretation of the functional dependency notation X → Y?

  • Each X value must be associated with exactly one Y value. (correct)
  • X value can have multiple Y values.
  • Y is independent of X.
  • X and Y must be the same attribute.
  • Which of the following statements about trivial functional dependencies is true?

  • A trivial FD must have different attributes on both sides.
  • Trivial FD includes all possible combinations of attributes.
  • A trivial FD is one where Y is not a subset of X.
  • A trivial FD occurs when Y is a subset of X. (correct)
  • If the functional dependency A → BC is true, which of the following is also true?

  • A does not determine B.
  • BC does not depend on A.
  • A → B is false.
  • A → B and A → C are both true. (correct)
  • In the relation Drinkers(name, addr, beersLiked, manf, favBeer), which functional dependency is correctly derived?

    <p>name → beersLiked</p> Signup and view all the answers

    What does it mean for a functional dependency to hold in a relation R?

    <p>There exists at least one tuple with the same X value leading to the same Y value.</p> Signup and view all the answers

    Which property does NOT apply to functional dependencies?

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

    In the FD (title, year) → (length, genre, studioName), what can be inferred?

    <p>title and year alone determine all attributes on the right side.</p> Signup and view all the answers

    Which of the following is a correct example of a functional dependency?

    <p>A → B, B → C implies A → C</p> Signup and view all the answers

    What does the Subset Property (Axiom of Reflexivity) state?

    <p>If Y is a subset of X, then X → Y.</p> Signup and view all the answers

    Which axiom states that if X functionally determines Y, then a combination of X and Z will functionally determine Y and Z?

    <p>Axiom of Augmentation</p> Signup and view all the answers

    Which of the following correctly defines a key in a relation R?

    <p>A set of attributes that uniquely determines all other attributes of R.</p> Signup and view all the answers

    What is a super-key?

    <p>A set of attributes that contains a key and can uniquely identify records.</p> Signup and view all the answers

    What does the closure of a set of attributes X under a set of functional dependencies S signify?

    <p>All the attributes that can be determined from X using S.</p> Signup and view all the answers

    If X → Y, Z → W is true, which statement incorrectly combines these functional dependencies?

    <p>Z → XW is a valid relation.</p> Signup and view all the answers

    Which derived rule allows for separating attributes from a combined functional dependency?

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

    In relation to the closure of attributes, what is a naïve approach to find a closure set?

    <p>Always including the original set Y in its closure.</p> Signup and view all the answers

    What is the first step in the closure set finding algorithm?

    <p>Split all FDs in F such that each FD has a single attribute on the right</p> Signup and view all the answers

    Which of the following statements is correct regarding the closure of a set of attributes?

    <p>Closure can expand to include additional attributes based on FDs</p> Signup and view all the answers

    Given the functional dependencies S = {A→B, B→C, C→D, D→A}, what is a key of the relation R(A, B, C, D)?

    <p>{B}</p> Signup and view all the answers

    What is the result of computing {AB}+ with the given functional dependencies S = {AB → C, BC → AD, D → E, CF → B}?

    <p>{ABCDE}</p> Signup and view all the answers

    Which of the following super-keys can be identified for R(A, B, C, D) with the functional dependencies S = {A→B, A→C, C→D}?

    <p>{A}</p> Signup and view all the answers

    What will happen if you reach a fixpoint when calculating the closure?

    <p>No more attributes can be added to the closure</p> Signup and view all the answers

    Which of the following represents a misconception about super-keys?

    <p>Super-keys are the same as keys</p> Signup and view all the answers

    For the relation R (A, B, C, D) with S = {AD→B, AB→C, BC→D, CD→A}, which of the following is a key?

    <p>{AD}</p> Signup and view all the answers

    What is the main characteristic of a relation in First Normal Form (1NF)?

    <p>Attributes must be single-valued and atomic.</p> Signup and view all the answers

    Which of the following indicates that a relation is not in 2NF?

    <p>One non-primary key attribute depends on only part of the primary key.</p> Signup and view all the answers

    In which scenario would a relation be in Third Normal Form (3NF)?

    <p>There are no transitive dependencies among non-key attributes.</p> Signup and view all the answers

    How can we recognize that a design is not in 1NF?

    <p>There are repeating groups or arrays of values.</p> Signup and view all the answers

    Which operation can lead to the loss of information when reconstructing a relation from its decomposed parts?

    <p>Applying a Cartesian product operation between two relations.</p> Signup and view all the answers

    What is true about a primary key in a relation that is in 2NF?

    <p>It must ensure that all non-key attributes are fully dependent on it.</p> Signup and view all the answers

    In a relation with attributes A, B, C, and D, if A leads to B, and B leads to C, what can be concluded?

    <p>There is a transitive dependency present.</p> Signup and view all the answers

    What is a potential outcome if primary key attributes are not unique in a relation?

    <p>Data redundancy is likely to occur.</p> Signup and view all the answers

    What is one of the principal kinds of anomalies encountered in relational databases?

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

    What type of anomaly occurs when the same information is updated in one tuple but left unchanged in others?

    <p>Update Anomaly</p> Signup and view all the answers

    Which of the following best describes decomposition of relations?

    <p>Splitting attributes of a relation into new relations</p> Signup and view all the answers

    What happens if we delete certain tuples with a specific studio name in a database?

    <p>The entire movie information may be lost</p> Signup and view all the answers

    What can be a consequence of properly decomposing a relation?

    <p>Loss of original information</p> Signup and view all the answers

    What is one sign that a relation is not properly designed and may lead to anomalies?

    <p>Data about the same entities appears in multiple rows</p> Signup and view all the answers

    In the context of database anomalies, what does an update anomaly involve?

    <p>Update of one occurrence but not all</p> Signup and view all the answers

    Which statement regarding decomposition is true?

    <p>It can eliminate some anomalies while risking loss of data</p> Signup and view all the answers

    What is meant by the phrase 'deletion anomaly'?

    <p>Loss of valuable data when a certain entry is deleted</p> Signup and view all the answers

    What issue may arise during the reconstruction of a decomposed relation?

    <p>Functional dependencies may not hold</p> Signup and view all the answers

    Which term refers specifically to unnecessary repetition of data in multiple tuples?

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

    What is the impact of a well-designed relational database schema?

    <p>It reduces anomalies and preserves data integrity</p> Signup and view all the answers

    How can you describe a consequence of having too much data in a single relation?

    <p>Higher likelihood of redundancy and anomalies</p> Signup and view all the answers

    Study Notes

    Fundamentals of Databases

    • The presentation covers functional dependencies and normal forms in database design.
    • Functional dependencies (FDs) in database design establish constraints between sets of attributes in a relation.
      • An FD (X → Y) means that if two tuples in a relation share the same X value, they will also share the same Y value.
      • If Y is a subset of X (X → Y), then the dependency is considered trivial.
    • Several properties of functional dependencies are derived from Armstrong's axioms, which are important in database normalization.
      • Subset Property: If Y is a subset of X, then X → Y.
      • Augmentation: If X → Y, then XZ → YZ.
      • Transitivity: If X → Y and Y → Z, then X → Z.
      • Secondary rules derived from these include Union, Decomposition, Pseudo transitivity, Accumulation, and Extension.
    • Keys and Superkeys in databases are important to uniquely identify entities in a relation.
      • A key is a set of attributes that uniquely determines all other attributes of the relation.
      • A superkey is a set of attributes that contains a key.
      • Keys must be minimal, meaning no proper subset of the attributes can also serve as a key.
    • Closure sets are used to determine all attributes that can be derived from a given set of attributes using functional dependencies established in the dataset (relation).
      • The closure of X under S, written X+, represents all attributes determinable from X by applying all the functional dependencies in S.

    Normal Forms

    • Normal forms (1NF, 2NF, 3NF) are used to organize data in a relational database to minimize redundancy and anomalies.

    • Anomalies are problems that can occur when data is not normalized correctly, such as redundancy in storing and retrieving data from the database.

    • First Normal Form (1NF): Ensure attributes are single-valued and atomic.

    • Correct: Each attribute contains only a single value; no attributes are multi-valued (e.g., contain comma-separated values.)

    • Incorrect : Example: a 'colors' attribute containing multiple colors for a single item, violates 1NF.

    • Second Normal Form (2NF): A relation is in 2NF if it is in 1NF and every non-prime attribute is fully functionally dependent on the primary key.

    • Non-primary key attributes must depend on the whole primary key, not just part of it.

    • Third Normal Form (3NF): A relation is in 3NF if it is in 2NF and no non-prime attribute depends on another non-prime attribute that is not part of the primary key.

    • Attributes should not be determined by non-key attributes, only by the primary key.

    • Decomposition: The accepted method to eliminate anomalies in database design involves splitting relations into smaller relations to reduce redundancy and avoid anomalies in databases

    • The presentation includes case studies and exercises to demonstrate how to identify functional dependencies, keys, superkeys, closure sets, different normal forms, and decompositions.

    Studying That Suits You

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

    Quiz Team

    Related Documents

    Lecture 5 FD NFs PDF

    Description

    This quiz covers essential concepts related to functional dependencies and normal forms in database design. It includes the properties derived from Armstrong's axioms and the importance of keys and superkeys in uniquely identifying entities within relations. Test your knowledge on these foundational topics critical to database normalization.

    More Like This

    Use Quizgecko on...
    Browser
    Browser