Questions tagged [3nf]

Third normal form (3NF) is a database design principle originally defined by E.F. Codd in 1971. It is built on the First normal form (1NF) and Second normal form(2NF). A relation R is in third normal form if it is in second normal form and every non-prime attribute of R is non-transitively dependent on each candidate key of R.

3NF is a normal form used in database normalization originally defined by E.F. Codd in 1971. It is built on top of First normal form (1NF) and Second normal form (2NF). A table is in 3NF if and only if for each of its functional dependencies X → Y, at least one of the following conditions holds:

  • X contains Y (that is, X → Y is trivial functional dependency), or
  • X is a superkey, or
  • every attribute in Y-X, the set difference between Y and X is a prime attribute is contained within a candidate key.

In other words it states that all non-key attributes should be determined by the candidate keys and not by any non-key attributes.

Normalization beyond 3NF

Most 3NF tables are free of update, insertion of deletion anomalies. Certain types of 3NF are affected by such anomalies. Some tables fail short of Boyce-Codd normal form (BCNF) or higher normal forms like 4NF, 5NF or 6NF.

Links

201 questions
1
vote
2 answers

Tag system for Django

I am building a Quiz app where a user (Content Creator or Author) can create quizzes (choice based questions and their solutions) from a specific domain. These quiz can be attempted by other users (Consumers - not yet implemented). To allow quiz…
solyarist
  • 424
  • 3
  • 17
1
vote
1 answer

Normalization/ERD for Flight Schedule

A user who schedules planes for flights determines the type of plane to be used each day for each flight, and can change the type of plane if necessary. Normalize to 3NF and come up with a relational model. You should look at the data carefully and…
C1116
  • 173
  • 2
  • 5
  • 16
1
vote
1 answer

example of 2NF and 3NF normalization

I understand the normalization concept, especially the first normal form (1NF), but not 2NF and 3NF. How does one convert the sample table below to 2NF and 3NF? Prod_id prod_name prod_type prod_price 1 HP Laptop 200 2 Adidas…
Afam
  • 29
  • 1
  • 8
1
vote
1 answer

Normal forms - 2nd vs 3rd - is the difference just composite keys? non trivial dependency?

I've viewed this answer at Difference between 2nd normalization phase / normal form and 3rd normalization phase / normal form but I don't understand the terms used (non-trivial functional dependency, superkey). Maybe 2nd normal form to relates to…
1
vote
0 answers

How to prove 3NF?

I am trying really hard to spin my brain around how to prove 3NF. I actually have the answer, but if someone know this well enough to make me understand it, I would be very grateful. Ok, here it goes: If R is in 3NF according to Definition 2, R…
Gaute
  • 107
  • 1
  • 1
  • 12
1
vote
1 answer

Is this SQL schema fit for storing sports data and statistics?

I am planning on using this SQL schema to store/generate statistics and player data for various sports. I wanted to keep it as agnostic as possible, but given that each sport has different metrics for scoring and gameplay, I had to break it up at…
Sam Levin
  • 3,326
  • 7
  • 30
  • 44
1
vote
1 answer

Converting 3NF to BCNF when there is a circular dependency

If we have a relational schema R(A, B, C, D), with the set of dependencies: ABC -> D D -> A How is it possible to decompose R into BCNF relations? The only plausible way seems to be to discard one of the FDs, no matter how I think about it. Is…
peteykun
  • 716
  • 9
  • 21
1
vote
1 answer

Drawback of 3rd Normal Form Databases

I was asked this question in an interview. What is the drawback of using 3rd Normal form in databases? I know its main advantages which are 1. Duplication is reduced 2. Data integrity Is there any Drawback of using 3rd Normal form?
farhangdon
  • 2,003
  • 2
  • 21
  • 30
1
vote
1 answer

Combine contents of multiple rows in 3NF mysql tables

Having dutifully normalised all my data, I'm having a problem combining 3NF rows into a single row for output. Up until now I've been doing this with server-side coding, but for various reasons I now need to select all rows related to another row,…
Gary Stanton
  • 1,435
  • 12
  • 28
1
vote
2 answers

Deciding whether a relation is 3NF or 2NF

From the Database Management Systems book: given the relation SNLRWH (each letter denotes an attribute) and the following functional dependencies: S->SNLRWH (S is the PK) R->W My attempt: First, it is not 3NF: for the second FD, neither R…
ToniAz
  • 430
  • 1
  • 6
  • 24
1
vote
0 answers

Synthesis algorithm, identify whether BCNF and find candidate keys

I have some problems regarding synthesis algorithms and finding candidate keys as I feel that the slides provided on my course merely gives examples of how they are inferred, with no explanation. So, if we have a relational schema with the single…
Cenderze
  • 1,202
  • 5
  • 33
  • 56
1
vote
1 answer

What is a recursive DTD? Example if possible

I am trying to find a recursive DTD and an XML data file that is valid with that. Are the existing validators able to validate a recursive DTD? I want to be able to execute XQueries after to that XML file.
Mike B
  • 1,522
  • 1
  • 14
  • 24
1
vote
1 answer

Identifying the Boyce Codd Normal Form

I'm trying to get my head around the differences between 3NF and BCNF and I think I'm getting there but it would be great if anyone can help out. The following is a series of relations in the 3rd normal form (helpfully stolen from Identifying…
1
vote
2 answers

Confusion regarding setting up functional dependencies

Given this following table definition: TRUCK (TruckNum, TruckType, TypeDesc, TruckMiles, DatePurchased, TruckSerialNum, BaseCity, BaseState, BaseNum, BaseManagerName, ManagerPhone, BasePhone) I need to set up a list of functional dependencies. So…
1
vote
1 answer

Database relation in 3NF?

I have following relation. A company has several employees. Each employee is defined by its employee number ENr and he is living on an address EAddress with a ZipCode ZZipCode. The City with the ZipCode is an own table because otherwise there is…
Razer
  • 7,843
  • 16
  • 55
  • 103