Reputation
1,961
Top tag
Next privilege 2,000 Rep.
Edit questions and answers
Badges
8 14
Newest
 Yearling
Impact
~81k people reached

Apr
30
comment Normalization of library book table with multiple authors
I agree but I didn't quite understand your concern about nulls so I wanted to emphasize the point that no nulls are needed.
Apr
24
comment How to get a surrogate key value in order to put a foreign key in and create relationship?
You need to fix your database design. You can't expect to get useful results if you only have surrogate keys and no alternate real world keys to identify information with. It's like putting your coat into a coat check without getting a ticket for it!
Apr
16
comment Is the table in 3NF?
@Emilie, According to your sample data ISBN does NOT determine SKU. There are 3 different SKUs for a single ISBN. If ISBN->SKU and SKU is a key then ISBN must be a key as well. In that case there would be no violation of 3NF.
Apr
5
comment What normal form does a surrogate key violate?
Your interpretation of 3NF is not correct. 3NF is violated where there is a dependency on a non-prime attribute (i.e. a "transitive" dependency). Non-prime means an attribute that is not part of any candidate key. Dependence on several alternative keys therefore is not a violation of 3NF and such dependencies are implicit and required whenever a table has more than one key. By definition every attribute of a relation is functionally determined by every candidate key of that relation.
Mar
29
comment Why aren't primary key / foreign key matches used for joins?
SQL did not come first! The relational model (which included the concept of foreign keys of course) was first outlined by E.F.Codd in 1969. SEQUEL, as it was then, didn't see the light of day until around 1974. Its inventors made it clear from the outset that SEQUEL/SQL was intended to be based on the pre-existing relational model - although SQL did fall short of being a truly relational language.
Mar
5
comment How to sort rows to appear alternating (e.g. A B A B … )?
Does your table have a key? It would be useful to know. Your column X contains duplicates and there appears to be nothing else to define the ordering of the table with.
Mar
2
comment Question about choosing primary key
Yes. Therefore the table does satisfy 3NF.
Mar
2
comment Question about choosing primary key
Thomas, My point (and ypercube's) is that PersonID --> EmployeeID --> {Employee Attributes} is NOT a transitive dependency if EmployeeID is a key as well as PersonID. 3NF requires no distinction between primary and "non-primary" candidate keys. All candidate keys are equally important in 3NF as the Wikipedia link you posted makes very clear (I'm not advocating Wikipedia as a generally reliable source of information but in this instance it happens to be more accurate than the other links you referred to).
Mar
2
comment Question about choosing primary key
PersonID and EmployeeID are both keys in Employee. On that basis there is no violation of 3NF.
Feb
3
comment If A and B are candidate keys, then AB is candidate key or not ?
ab doesn't mean the intersection of the domains a and b, it means the superkey {a,b}. That might have been clearer if the OP had put parentheses around it but the question is clearly about keys and superkeys.
Jan
5
comment Why should I create an ID column when I can use others as key fields?
If criminals are known to clone some identifier then surely that might be a very good reason to enforce the business rule that the attribute must be unique - i.e. not to "trip up" the system but to prevent the said duplicate values from entering the database and thereby red-flag any such attempts as potential fraud or errors requiring further investigation.
Nov
7
comment Uniqueidentifier vs. IDENTITY vs. Material Code --which is the best choice for primary key?
There is nothing purely "philosophical" about the need to identify real things accurately and to guarantee the uniqueness of meaningful data through key constraints. Natural keys are a very practical necessity.
Mar
21
comment Confusion with Foreign Keys
There's no reason in principle why primary key attributes shouldn't be foreign keys.
Mar
5
comment Column suitable for natural key?
@mircale, my point was that the reason for key constraints is to guarantee that infomration is not duplicated. If you don't enforce a natural key on some attribute then the values of that attribute may be duplicated on multiple tuples with different surrogate key values. That is apparently not what is wanted here.
Jan
4
comment Primary Key Question
"if I have a key of FirstName, LastName, Email on my Student table, and then have to repeat that information in my Classes table then I'm duplicating data in that table and breaking one of the normal forms. Is that not correct?" That is not correct. In any case it's a poor example because it seems highly unlikely that firstname and lastname would be part of a key for students in any real or practical sense.
Nov
1
comment If all variables are a subset of the candidate key, is the database design 5NF?
Damir, you are right and my answer is wrong. I don't know what I was thinking of - BCNF maybe. Thanks anyway.
Oct
31
comment Is normalization process needed?
Perhaps it would be better to say that we should normalize the logical structure of the database. The phrase "logical model" is often (mis)understood to mean merely a preliminary design for a database rather than something actually existing in a database system. The important point surely is that what you implement ought to be normalized, not just what you sketch on paper :)
Oct
15
comment SQL Server transaction log file size and auto grow
When did you last back up the log? That is what determines the lifetime of the log. You should back up the log more often than you take full backups. Check that your log backups are working as you expect.
Oct
15
comment SQL Server transaction log file size and auto grow
SQL Server works similarly to Oracle. If you back up the log the space will be reused. If you have already backed up the log then create a new log file to make more space.
Jun
16
comment how to convert a table into second normal form
Without any explanation of what dependencies the table is supposed to satisfy all anyone can do is make guesses based on the attribute names.