Reputation
7,110
Top tag
Next privilege 10,000 Rep.
Access moderator tools
Badges
1 9 23
Newest
 Explainer
Impact
~151k people reached

Nov
2
answered Preventing duplicate data when usual normalization only makes sense for some of the records
Nov
2
answered How to insert values in junction table for many to many relationships?
Nov
2
answered Database Design for Paper Submission System
Oct
18
answered Can't finish my ER diagram
Oct
17
comment Why does a UNIQUE constraint allow only one NULL?
Semantically there is a huge difference between Null (don't know) and Null (don't care). Not making a distinction between these in either the standard or the various implementations makes for a lot of resulting confusion. You could say that all "null/don't know" are equal but all "null/don't care" are distinct, for example. It makes for strange, arbitrary implementation decisions by each RDBMS builder.
Oct
17
comment Can't finish my ER diagram
You should go and take a closer look at the ERD reference that you linked. I'm pretty sure you have the crow's foot backwards for what you intend. Your diagram says "a book has one or more publishers" (which may be true in some real world scenarios) but it also says: "a publisher publishes (exactly) one book" which I'm sure you didn't mean. Same thing for members renting and authors writing.
Oct
9
answered ERD Design for Employee Leave
Sep
30
awarded  Explainer
Sep
30
comment Supertyping Inventory Transactions
Agreed. Further to this, if you think you really want to run queries against one particular transaction type, create views on the transaction table(s). If the big table with nulls approach is used, the views on the table will almost certainly be writable as well.
Sep
28
comment Database design : hotel room and its detail
Room type and room size on a room description table might violate 3NF if the type and size depend on the room, not on the description of the room. You don't state your assumptions about dependencies, you just split a bunch of properties of rooms off from the rooms table in a way that might be creating transitive dependencies. Your inference of my logic is in exactly the opposite direction.
Sep
28
reviewed Close get mysql index size split by index
Sep
28
reviewed Leave Open MySQL lost connection
Sep
28
awarded  Custodian
Sep
28
reviewed Leave Open Disaster Recovery Options for Sql Server
Sep
28
reviewed Close CROSS JOIN and updatable model design for Ruby on Rails
Sep
28
comment Database design : hotel room and its detail
A table of code tables (your Type 2) is generally considered to be an anti-pattern. You should probably avoid it. If you are concerned about the number of tables in your database you might use something like schemas to allow you to focus on an area of interest while "ignoring" the other areas in your database. Alternatively, you could (and probably should) just come to terms with your aversion to many tables. Any real world business system will have lots of tables.
Sep
28
comment Database design : hotel room and its detail
It looks to me like you are suggesting blending room type and room size? Or are you creating a three tier structure: room -> room_description -> room_type (and other lookup tables, such as room_size)? If the former, that would not be third normal form. If the latter, why introduce a middle tier? What non-key attribute do you expect to depend on a description code?
Sep
15
answered How to represent foreign key in an ER diagram?
Sep
7
reviewed Approve Best practice database design - user rating tables
Sep
7
answered Best practice database design - user rating tables