Showing posts with label Normal Forms. Show all posts
Showing posts with label Normal Forms. Show all posts

Sunday, May 25, 2014

1NF and 2NF Comparison


Difference between 1NF and 2NF / Comparison of 1NF and 2NF / Compare 1NF and 2NF / 1NF and 2NF Comparison / 1NF and 2NF difference




Properties to be satisfied for 1NF and 2NF (recall)

1NF – All attribute values are atomic values, i.e, no repeating group or no composite attributes present.
2NF – Table should be in 1NF and no partial functional dependency presents.






Properties
1NF
2NF
Attribute Domain
Should be Atomic
Should be Atomic
Functional Dependencies Identification
Not necessary
Must
Handling of Update Anomalies
Does not handle. It deals with the basic structure of a relation.
Handle update anomalies.
Composite Key as Primary Key
Primary Key can be Composite key
Primary Key cannot be Composite key always. It may violate 2NF if partial key dependency exists. That is, no partial functional dependency is permitted
Goal
Eliminate Redundant Data
Ensure Data Dependencies


*********

Related Links




Compare first normal form 1nf with second normal form 2nf in dbms


Friday, April 18, 2014

Database Normal Forms - Quiz 1

Normalization and Normal Forms in Database Design - Quiz 1


1. For a relation R, we are given that the domains of all attributes of R are indivisible. With this information, we can say the relation R is in
    1 NF
    2 NF
    3 NF
    BCNF

2. In a table with the schema STU(STUNO, STUNAME, ADDRESS, COURSENO, COURSENAME) and with the functional dependencies, STUNO --> STUNAME ADDRESS, COURSENO --> COURSENAME, STUNO COURSENO --> STUNAME ADDRESS COURSENAME, which of the following anomalies would present?
    Insetion Anomaly
    Deletion Anomaly
    Update Anomaly
    All of the above

3. A relation which has only atomic attributes and every non-key attribute fully functionally dependent on candidate keys is said to be in
    1 NF
    2 NF
    3 NF
    BCNF

4. Consider the schema given in question 2. Is the relation STU in 2 NF?
    YES
    NO

5. What does Atomic attribute mean?
    It is one type of attribute used in DBMS
    An attribute whose values can be divided into meaningful subparts
    An attribute whose values cannot be divided into meaningful subparts
    None of the above

6. If you have removed repeated groups of values from a relation and also removed the partial key dependencies, then we would say that the given relation is in
    1 NF
    2 NF
    3 NF
    BCNF

7. Assume a table with the schema STU(STUNO, STUNAME, ADDRESS, PINCODE) and with the functional dependencies, STUNO --> STUNAME ADDRESS PINCODE, PINCODE --> ADDRESS. Is this relation is in 2 NF?
    YES
    NO

8. A relation is said to be in 3 NF if which of the following is/are true?
    No partial key dependencies
    All attributes are atomic
    No presence of transitive dependencies
    All of the above

9. Assume a table with the schema STU(STUNO, STUNAME, ADDRESS, PINCODE) and with the functional dependencies, STUNO --> STUNAME ADDRESS PINCODE, PINCODE --> ADDRESS. Is this relation is in 3 NF?
    YES
    NO

10. Assume a table with the schema STU(STUNO, STUNAME, ADDRESS, COURSENO, COURSENAME) and with the functional dependencies, STUNO --> STUNAME ADDRESS, COURSENO --> COURSENAME, STUNO COURSENO --> STUNAME ADDRESS COURSENAME with no transitive dependency. The relation STU is in _______ NF?
    1 NF
    2 NF
    3 NF
    BCNF

Score =

Correct answers:

* You can also try other DBMS quizzes here

Featured Content

Multiple choice questions in Natural Language Processing Home

MCQ in Natural Language Processing, Quiz questions with answers in NLP, Top interview questions in NLP with answers Multiple Choice Que...

All time most popular contents