First Normal Form (1NF)
Definition
A table is in First Normal Form (1NF) if each table cell contains a single value, eliminating repeating groups or arrays.
Rules
- Atomic Values: Each table cell must contain atomic values, meaning a single value that cannot be broken down further.
- No Repeating Groups: There should be no repeating groups or arrays in a table.
- Unique Column Names: Each column in a table must have a unique name.
Benefits
- Improved Data Integrity: 1NF helps ensure data integrity by eliminating repeating groups and ensuring atomic values.
- Simplified Querying: 1NF makes querying and manipulating data easier and more efficient.
- Reduced Data Redundancy: 1NF helps reduce data redundancy by eliminating repeating groups.
Example
Consider a table that stores customer information with repeating groups:
Customer ID | Name | Phone Numbers |
---|---|---|
1 | John Doe | 123-456-7890, 987-654-3210 |
To convert this table to 1NF, we would create a separate table for phone numbers:
Customer ID | Name |
---|---|
1 | John Doe |
Customer ID | Phone Number |
---|---|
1 | 123-456-7890 |
1 | 987-654-3210 |
No comments:
Post a Comment