database-normalization

Understanding 3NF: plain English please

与世无争的帅哥 提交于 2019-12-20 14:19:14
问题 I am working through an example problem in which we are trying to identify which of the following relations is in Third Normal Form (3NF). Here are the relations we are given: R1(ABCD) ACD -> B   AC -> D   D -> C   AC -> B R2(ABCD) AB -> C   ABD -> C   ABC -> D   AC -> D R3(ABCD) C -> B   A -> B   CD -> A   BCD -> A R4(ABCD) C -> B   B -> A   AC -> D   AC -> B I know the answer is R1 is in 3NF, but I'm having a hard time understanding the steps to go about determining what violates 3NF. Can

MySQL best approach for db normalising, relationships and foreign keys

痴心易碎 提交于 2019-12-20 06:24:49
问题 There is an username/password verification step first then the database has following structure ^ is primary key * uses foreign key 1.StudentDetails table =========================================================================== ID^| Username | Password | Email | Address * | Website |Comments ====+============+==========+=============+===========+=========+========== 1 | xxxxxxxxxx | xxxxxxx | xx@xxx.xxx | 1 | http:// | text 2.Submissions table ==============================================

Converting 3NF to BCNF when there is a circular dependency

会有一股神秘感。 提交于 2019-12-20 04:13:48
问题 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 there any other way? 回答1: That's right, one can always losslessly decompose to 3NF while preserving FDs but BCNF might not preserve them. Nevertheless it's a lossless decomposition: the components, if holding projections of the original, will join to

Which highest normal form is this table in?

可紊 提交于 2019-12-20 03:28:30
问题 Ticket Vname Nname 1 Oli Seitz 1 Andi Hofmann 2 Oli Seitz 2 Oli Schmidt 2 Tim Schmidt 3 Tim Hofmann This table represents a mapping of persons ( Vname, Nname ) and tickets ( Ticket ). Vname and Nname together identify a person, but every Person ( Vname, Nname ) can have multiple tickets ( Ticket ), and a ticket can be assigned to multiple people. The PK in this table are all three columns together. So this table should be 1NF because there is no multi dimensional data in one column. But then

Is this normalization correct? (two many-to-manys connected by a many-to-one)

岁酱吖の 提交于 2019-12-19 11:44:12
问题 I have a schema for a scorekeeping database with Game , Team , Player tables. One team has many players, each player has only one team. Each team plays many games, each game has many teams. In each game, players score a certain number points individually and as a team - this maps to a player_score and a team_score . A team's total score for a game is the sum of all of its players player_score for that game and the team's team_score for that game. This is my plan - GameTeam table includes the

when a 1NF table has no composite candidate keys is it in 2NF?

白昼怎懂夜的黑 提交于 2019-12-19 09:05:44
问题 Is it safe to say, when a 1NF table has no composite candidate keys (primary keys consisting of more than one column), the table is automatically in 2NF? Can a table voilate 2NF, when it has only one column in its primary key? 回答1: A relvar R, is in 2NF as long as there is no non-trivial FD, A->B, satisfied by R where B is nonprime and where A is a proper subset of some candidate key of R. You first have to consider all the candidate keys. If it is the case that all the candidate keys happen

How to understand the 5th Normal Form?

自作多情 提交于 2019-12-18 10:14:00
问题 I'm using two online sources for gaining an understanding of the 5NF, without any rigor of Math and proofs. A Simple Guide to Five Normal Forms in Relational Database Theory (by Kent. This one seems to have been reviewed and endorsed in one of his writings by none other than CJ Date himself) Fifth Normal Form (Wikipedia article) However, I'm unable to understand either of these references! Let's first examine Reference #1 (Kent's). It says: "But suppose that a certain rule was in effect: if

Violation of 3NF if we use an auto-incremented identity column along with a PK

巧了我就是萌 提交于 2019-12-18 07:16:15
问题 As it is said in the book of Database Solutions Second Edition written by Thomas Connolly and Carolyn Begg page 180: Third normal form (3NF) A table that is already in 1NF and 2NF, and in which the values in all non-primary-key columns can be worked out from only the primary key column(s) and no other columns. I have seen many scenarios where people use an identity column though they already have a primary key column in their table. A record can also be worked out from the identity column, so

Star schema, normalized dimensions, denormalized hierarchy level keys

我只是一个虾纸丫 提交于 2019-12-17 23:43:41
问题 Given the following star schema tables. fact, two dimensions, two measures. # geog_abb time_date amount value #1: AL 2013-03-26 55.57 9113.3898 #2: CO 2011-06-28 19.25 9846.6468 #3: MI 2012-05-15 94.87 4762.5398 #4: SC 2013-01-22 29.84 649.7681 #5: ND 2014-12-03 37.05 6419.0224 geography dimension, single hierarchy, 3 levels in hierarchy. # geog_abb geog_name geog_division_name geog_region_name #1: AK Alaska Pacific West #2: AL Alabama East South Central South #3: AR Arkansas West South

What is the difference between 3NF and BCNF?

岁酱吖の 提交于 2019-12-17 21:43:11
问题 Can someone please explain the difference between 3NF and BCNF to me? It would be great if you could also provide some examples. Thanks. 回答1: The difference between 3NF and BCNF is subtle. 3NF Definition A relation is in 3NF if it is in 2NF and no non-prime attribute transitively depends on the primary key. In other words, a relation R is in 3NF if for each functional dependency X ⟶ A in R, at least one of the following conditions are met: X is a key or superkey in R A is a prime attribute in