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

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
31
awarded  Yearling
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
3
awarded  database-design
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
answered Question about choosing primary key
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
18
answered Can we determine FDs if we are given some tuples?
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
19
answered does the mere existence of a primary key increase query speed for large data sets?
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.
Nov
3
revised What exactly is overlapping candidate key?
added 35 characters in body
Nov
3
answered What exactly is overlapping candidate key?
Apr
11
answered Given the functional dependencies of a relation is there more then one way to normalize it?
Mar
31
awarded  Yearling