Database----database normalization?

About your example: that table doesn't fit the second database normalization (with your sample data, I presume that the C depends only on A). The second normalization form requires that: No non-prime attribute in the table is functionally dependent on a proper subset of a candidate key ( Wikipedia ) So the C depends on "A", which is a subset of your primary key. Your primary key is a special superkey (dportas point out the fact that it can't be called candidate key, since it's not minimal) Let's say more about the second normalization form.

Transform your example a little for easy understanding, presume that there's a table CUSTOMER(customer_id, customer_name, address) A super key is a sub-set of your properties which uniquely determine a tube. In this case, there are 3 super key: (customer_id) ; (customer_id, customer_name) ; (customer_id, customer_name, address). (Customer name may be the same for 2 people) In your case, you have determined (customer_id, customer_name) be the Primary Key.It violated the second form rules; since it only needs customer_id to determine uniquely a tube in your database For the sake of theory accuration, the problem here raised from the choice of primary key(it's not a candidate key), though the same argument can be applied to show the redundance.

You may find some useful example here The third normal form states that: Every non-prime attribute is non-transitively dependent on every candidate key in the table Let give it an example. Changing the previous table to fit the second form, now we have the table CUSTOMER(customer_id,customer_name, city, postal_code) with customer_id is primary key Clearly enough, "postal_code" depends on the "city" of customer. This is where it violated the third rule: postal_code depends on city, city depends on customer_id.

That means postal_code transitively depends on customer_id, so that table doesn't fit the third normal form To correct it, we need to eliminate the transitive dependence. So we split the table into 2 table: CUSTOMER(customer_id, customer_name, city) and CITY(city, postal_code) This prevent the redundance of having too many tubes with the same city & postal_code.

About your example: that table doesn't fit the second database normalization (with your sample data, I presume that the C depends only on A). The second normalization form requires that: No non-prime attribute in the table is functionally dependent on a proper subset of a candidate key (Wikipedia) So the C depends on "A", which is a subset of your primary key. Your primary key is a special superkey.(dportas point out the fact that it can't be called candidate key, since it's not minimal).

Let's say more about the second normalization form. Transform your example a little for easy understanding, presume that there's a table CUSTOMER(customer_id, customer_name, address). A super key is a sub-set of your properties which uniquely determine a tube.In this case, there are 3 super key: (customer_id) ; (customer_id, customer_name) ; (customer_id, customer_name, address).

(Customer name may be the same for 2 people) In your case, you have determined (customer_id, customer_name) be the Primary Key. It violated the second form rules; since it only needs customer_id to determine uniquely a tube in your database. For the sake of theory accuration, the problem here raised from the choice of primary key(it's not a candidate key), though the same argument can be applied to show the redundance.

You may find some useful example here. The third normal form states that: Every non-prime attribute is non-transitively dependent on every candidate key in the table Let give it an example. Changing the previous table to fit the second form, now we have the table CUSTOMER(customer_id,customer_name, city, postal_code), with customer_id is primary key.

Clearly enough, "postal_code" depends on the "city" of customer. This is where it violated the third rule: postal_code depends on city, city depends on customer_id. That means postal_code transitively depends on customer_id, so that table doesn't fit the third normal form.

To correct it, we need to eliminate the transitive dependence. So we split the table into 2 table: CUSTOMER(customer_id, customer_name, city) and CITY(city, postal_code). This prevent the redundance of having too many tubes with the same city & postal_code.

Runeveryday: I know that my English is not very good, so please ask if there's any vague issue. – Hoàng Long Jan 6 at 3:13 1 (customer_id) ; (customer_id, customer_name) ; (customer_id, customer_name, address) cannot all be candidate keys because they are subsets of each other. A Candidate Key must be minimal.

– dportas Jan 6 at 7:20 @dportas: actually, the database terms are not the same among books of different authors. – Hoàng Long Jan 6 at 17:38 àng: I can't imagine any reputable source defining a candidate key as anything other than a minimal superkey - it would make nonsense of 2NF and 3NF. – dportas Jan 6 at 18:08 @dportas: after googling, I admit that a candidate key should be a minimal superkey.So my example gives another aspect of that: when the primary key is wrong determined, it causes the same effect.

I edited the answer to reflect that fact. Thanks for the correction. – Hoàng Long Jan 67 at 2:12.

Your question cannot be answered properly unless you state what dependencies are supposed to be satisfied here. You appear to have two attributes with the same name (pk), in which case this table doesn't even satisfy 1NF because it doesn't qualify as a relation.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions