1,880 reputation
713
bio website
location
age
visits member for 3 years, 8 months
seen 2 days ago

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
Oct
25
comment What is SQL Server Parallel Data Warehouse?
It's not so expensive relatively speaking. PDW is intended to compete with the likes of Oracle Exadata, Netezza, Teradata. The price is pitched accordingly.
Oct
25
answered What is SQL Server Parallel Data Warehouse?
Oct
21
answered Can a 2NF relation be M:M?
Oct
19
awarded  Enlightened
Oct
19
awarded  Nice Answer
Oct
19
comment Is DB Normalization done purely based on the primary key or is it done based on all the candidate keys?
I agree the Elmasri and Navathe explanation is over-complicated - perhaps because their book also covers more than just the relational model. In other contexts (e.g. ER modelling) the idea of designating a "primary" key is given more significance than it is in relational database terms. My own view is that the "primary key" is essentially an outdated concept that should not figure prominently when teaching relational database design. The concept is really worth not much more than a paragraph a footnote.
Oct
19
comment Is DB Normalization done purely based on the primary key or is it done based on all the candidate keys?
@Nabeel, In your example, if BC is a candidate key then B->D is a partial key dependency and therefore R is not in 2NF. If a relation has more than one candidate key then it doesn't matter which you call "primary" - the choice is arbitrary and doesn't make any fundamental or practical difference. What matters is which keys and dependencies you want to be satisfied. Maybe the examples your teacher used only had one key anyway? You will find plenty of examples around that only identify one candidate key per relation.
Oct
19
answered Is DB Normalization done purely based on the primary key or is it done based on all the candidate keys?
Oct
18
comment Should you design the database before the application code is written?
@FabriciO, It depends on the project and many other factors. I disagree that DB changes mean a failure to capture business rules or that the database was not well designed.
Oct
17
comment Should you design the database before the application code is written?
@Fabricio, in an Agile project you do not know for sure what is coming in future sprints. Change doesn't mean failure. If you try to anticipate too much then you create more work for yourself and potentially others too - and put the sprint objectives at risk. You might be able to build stuff in advance but you'd be unwise to assume things will remain static.
Oct
14
answered What are the performance considerations between using a broad PK vs a separate synthetic key and UQ?
Oct
14
comment What are the performance considerations between using a broad PK vs a separate synthetic key and UQ?
+1 for the point that performance has nothing to do with primary keys and everything to do with indexes.
Oct
12
comment Should you design the database before the application code is written?
Your data models change whenever your business changes. If your business isn't changing then it is probably dying. Nothing should ever be "etched in stone".
Oct
12
comment Should you design the database before the application code is written?
Some upfront thinking may be useful but attempting to define the whole model in advance is usually counterproductive. The model should align with business requirements and fit with project deliverables (app included) as they evolve. You cannot and should not expect those things not to change. Also creating the whole model upfront can actually obstruct other development because of the need to create dummy interfaces to support as-yet unused parts of the schema.
Oct
11
comment Should you design the database before the application code is written?
@RolandoMySQLDBA, you are assuming that a database design built during app development will be a poorer design than one built before? Why? The opposite is often true.
Oct
11
answered Should you design the database before the application code is written?