GoConqr has a new look! Let us know what you think.

Flashcards

Dependencies - relational model

Emma Tysk Databas English 9 cards

Cards in this deck (9)

  1. 1What are the requirements for 1NF?each attribute must hold a single, atomic value (no multivalued attributes)
  2. 2Second normal form (2NF)A table is said to be in 2NF if both the following conditions hold:
    -Table is in 1NF (First normal form)
    -No non-prime attribute is dependent on a part of the candidate key of table. (i.e not dependent on the whole key)
  3. 3Third normal form (3NF)A relation, R, is in 3NF iff for every nontrivial FD (X->A) satisfied by R at least ONE of the following conditions is true:
    (a) X is a superkey for R, or
    (b) Every element of A-X, the set difference between A and X, is a prime attribute (i.e., each attribute in A-X is contained in some candidate key)
  4. 4Functional dependencyThe attributes of a table is said to be dependent on each other when an attribute of a table uniquely identifies another attribute of the same table.
    For example: Suppose we have a student table with attributes: Stu_Id, Stu_Name, Stu_Age. Here Stu_Id attribute uniquely identifies the Stu_Name attribute of student table because if we know the student id we can tell the student name associated with it. This is known as functional dependency and can be written as Stu_Id->Stu_Name or in words we can say Stu_Name is functionally dependent on Stu_Id.
  5. 5Fully functional dependencyA functional dependency P → Q is full functional dependency if removal of any attribute A from P means that the dependency does not hold any more
  6. 6BCNFA relation, R, is in BCNF iff for every nontrivial FD (X->A) satisfied by R the following condition is true:
    (a) X is a superkey for R
  7. 72NF vs 3NFIn 2NF, as long as all non-prime attributes depend on the whole CK, you can have other dependencies! For example department_id (np) -> department_name (np)
    This is NOT allowed in 3NF. Every NP must fully depend on CK and NOTHING else
  8. 8What is the primary key?One table might have several candidate keys. The database designer chooses one of the candidate keys to be the primary key (PK). We will denote PK by underlining.
  9. 9Short rules for 2nf-bcnf2NF - All np must depend on the whole CK
    3NF - No np dependencies (Np to Np)
    BCNF - all prime attributes must depend on at least a superkey

Information

Description
Databas Flashcards on Dependencies - relational model, created by Emma Tysk on 04/12/2017.
Created by
Emma Tysk
Views
0
Rating

Feedback

What is it about?

What do you think of the new look?

How do you like it?