0 like 0 dislike
110 views
in Computer Science by (1.0m points)
When is a relation in first normal form? Explain with example?

1 Answer

0 like 0 dislike
by (1.0m points)
First normal form (1NF) is a property of a relation in a relational database. A relation is in first normal form if and only if the domain of each attribute contains only atomic (indivisible) values, and the value of each attribute contains only a single value from that domain.[1] The first definition of the term, in a 1971 conference paper by Edgar Codd, defined a relation to be in first normal form when none of its domains have any sets as elements.[2]

First normal form is an essential property of a relation in a relational database. Database normalization is the process of representing a database in terms of relations in standard normal forms, where first normal is a minimal requirement.

First normal form enforces these criteria:[citation needed]

Eliminate repeating groups[clarification needed] in individual tables

Create a separate table for each set of related data[definition needed]

Identify each set of related data with a primary key

Examples

The following scenarios first illustrate how a database design might violate first normal form, followed by examples that comply.[3][4]

Designs that violate 1NF

Below is a table that stores the names and telephone numbers of customers. One requirement though is to retain multiple telephone numbers for some customers. The simplest way of satisfying this requirement is to allow the "Telephone Number" column in any given row to contain more than one value:

Note that the telephone number column simply contains text: numbers of different formats, and more importantly, more than one number for two of the customers. We are duplicating related information in the same column. If we would be satisfied with such arbitrary text, we would be fine. But it's not arbitrary text at all: we obviously intended this column to contain telephone number(s). Seen as telephone numbers, the text is not atomic: it can be subdivided. As well, when seen as telephone numbers, the text contains more than one number in two of our rows. This representation of telephone numbers is not in first normal form: our columns contain non-atomic values, and they contain more than one of them.

An apparent solution is to introduce more columns

Related questions

0 like 0 dislike
1 answer 44 views
0 like 0 dislike
1 answer 21 views
asked Feb 11, 2019 in Computer Science by danish (1.0m points)
0 like 0 dislike
1 answer 174 views
0 like 0 dislike
1 answer 462 views
0 like 0 dislike
1 answer 19 views
0 like 0 dislike
1 answer 25 views
asked Feb 11, 2019 in Computer Science by danish (1.0m points)
0 like 0 dislike
1 answer 64 views
asked Feb 11, 2019 in Computer Science by danish (1.0m points)
0 like 0 dislike
1 answer 28 views
0 like 0 dislike
1 answer 26 views
0 like 0 dislike
1 answer 36 views
Welcome to Free Homework Help, where you can ask questions and receive answers from other members of the community. Anybody can ask a question. Anybody can answer. The best answers are voted up and rise to the top. Join them; it only takes a minute: School, College, University, Academy Free Homework Help

19.4k questions

18.3k answers

8.7k comments

3.3k users

Free Hit Counters
...