Professional Documents
Culture Documents
DD 6 2
DD 6 2
6-2
Normalization and First Normal Form
DDS6L2 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 3
Normalization and First Normal Form
Purpose
DDS6L2 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 4
Normalization and First Normal Form
Purpose
DDS6L2 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 5
Normalization and First Normal Form
Purpose
DDS6L2 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 6
Normalization and First Normal Form
First Normal Form (1NF)
SCHOOL BUILDING 1NF
• First Normal Form requires SCHOOL BUILDING The classroom attribute
that no multi-valued # code will have multiple
attributes exist. * name values.
* address This entity is not in First
• To check for 1NF, validate o classroom Normal Form.
DDS6L2 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 7
Normalization and First Normal Form
First Normal Form (1NF)
SCHOOL BUILDING 1NF
• Since many classrooms exist SCHOOL BUILDING The classroom attribute
in a school building, # code will have multiple
classroom is multi-valued * name values.
* address This entity is not in First
and violates 1NF. o classroom Normal Form.
• If an attribute is multi-
valued, create an additional
entity and relate it to the SCHOOL BUILDING the location CLASSROOM
original entity with a 1:M # code of # number
relationship. * name located
in
* floor
* address * size
DDS6L2 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 8
Normalization and First Normal Form
1NF Violations
1) STUDENT
# number
• Examine the entities. * first name
* last name
• Are there any multi-valued * subject
attributes?
2) SHOPPING
MALL
# id
* name
* address
* store name
* store floor
3) TEAM LEAGUE
# id belong to # number
* name * name
made up of
* player
1NF Violations
DDS6L2 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 9
Normalization and First Normal Form
1NF Solutions 1) SUBJECT STUDENT
taken by
# id # number
* name takes * first name
* last name
• When all the * subject
attributes in an entity
are single-valued, that 2) STORE
# name
located in SHOPPING
MALL
entity is said to be in * floor
house
# id
* name
First Normal Form. * address
3) TEAM * store name
# id * store floor
* name
belong to
* player
made up of LEAGUE
# number
have belong to * name
PLAYER
# number
* name 1NF Solutions
o position
DDS6L2 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 10
Normalization and First Normal Form
Terminology
DDS6L2 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 11
Normalization and First Normal Form
Summary
DDS6L2 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 12
Normalization and First Normal Form