1,816 reputation
713
bio website
location
age
visits member for 3 years, 5 months
seen 4 hours ago

Jan
25
comment Is an anomaly free relation necessarily normalized?
If "all normal forms" includes DKNF then the answer is no. A relation in 6NF does not have undesirable update, insertion or deletion anomalies in the usual sense but it still may not satisfy DKNF. On the other hand DKNF is not very important and is frequently irrelevant or unachievable.
Jan
20
awarded  Nice Answer
Jan
11
answered why doesn't time for a simple update scale linearly with the number of records?
Jan
9
comment SQL Server : primary keys advice to my whitepaper needed
It is premature optimization to allow the choice of clustered index to dictate the primary key of your tables. Very premature and very unnecessary!
Jan
9
comment SQL Server : primary keys advice to my whitepaper needed
All of your points are wrong because they apparently refer to the properties of clustered indexes and not primary keys. Clustered indexes and primary keys are two different things.
Jan
9
awarded  Cleanup
Jan
9
revised What Is The Point of a Primary Key?
"unique key" is a pointless tautology - keys are unique by definition. To be absolutely clear I have substituted "candidate key" instead.
Jan
9
revised What Is The Point of a Primary Key?
rolled back to a previous revision
Jan
6
awarded  Enlightened
Jan
6
awarded  Nice Answer
Dec
24
comment Temporarily disable checking of constraints
Oleg, I think it's not clear why you are suggesting "WITH NOCHECK CHECK" instead of "WITH CHECK CHECK". The latter should generally be used unless you intend to do it anyway later on.
Dec
17
answered Is normalization process needed?
Dec
17
comment What Is The Point of a Primary Key?
@BenBrocka, Are you sure you know what a key is? Uniqueness constraints and indexes are just two possible ways to implement keys - they are not alternatives to keys!
Dec
17
comment What Is The Point of a Primary Key?
@BenBrocka, In SQL DBMSs many operations are difficult or impossible unless you can uniquely identify rows. Whole features may be disabled or crippled without keys. I don't see how you can justify a claim that the "ordinary data manipulation will work fine" without keys. I think there's plenty of evidence that lack of keys and the problem of duplicate rows cost vast amounts of time and money for database customers to fix. The fact that keys and uniqueness are not automatically enforced is the most serious flaw of SQL-based systems and the most difficult problem to solve.
Dec
16
comment What Is The Point of a Primary Key?
One definition (E.F.Codd's) is that a surrogate is a stand in for another key in the same table. Another possible definition is simply that a surrogate key is a key that doesn't mean anything in the external Universe of Discourse. I prefer the second definition.
Dec
16
comment What Is The Point of a Primary Key?
@db2, My point was that we can't reliably say based only a data structure that an auto-incrementing column called Id is "meaningless". It depends how it is being used. If I use it as an order number then that is a "meaningful" key like any other business key. I would recommend not using auto-incrementing columns for such purposes but I've seen plenty of examples where people do use them for meaningful (non-surrogate) business keys.
Dec
16
comment What Is The Point of a Primary Key?
"Does either table have a usable key?" Depends what the key is being used for. I expect you mean that the user is NOT able to use Id to identify books. On the other had if Id is an integer that represents an order number, stock control label/RFID or some other real world identifier that gets assigned to books then it may be usable for the purposes of identifying real books or actual orders or stock. The main disadvantage is that some DBMSs place unreasonable restrictions on the use of key generator columns - only permitting one per table or making them read-only for example.
Dec
16
answered What Is The Point of a Primary Key?
Dec
13
answered Term for a one-row table?
Nov
9
awarded  Enthusiast