145 reputation
4
bio website
location
age
visits member for 2 years, 1 month
seen Dec 9 '13 at 12:07

Aug
25
comment UPLOCK to avoid multiple reads
The row I'm selecting (the order) isn't the same row that's being inserted (the event). So how can I use OUTPUT to do both steps within a single statement?
Aug
25
asked UPLOCK to avoid multiple reads
Oct
17
comment How can I get a copy of the SQL generated by Management Studio?
Yes.. hopefully seeing the scripts will help reduce my dependence on the designer.
Oct
17
accepted How can I get a copy of the SQL generated by Management Studio?
Oct
17
awarded  Commentator
Oct
17
comment How can I get a copy of the SQL generated by Management Studio?
Ah, excellent and its in 2008. Please write this up as an answer.
Oct
17
comment How can I get a copy of the SQL generated by Management Studio?
I don't think you can get ALTER statements like that, say, if I add a new column.
Oct
16
asked How can I get a copy of the SQL generated by Management Studio?
Oct
15
comment Database design: where do I put this data?
OK not exactly the same. :) But firstly, the columns 'eventcategoryid' and 'name' are shared by both 'Event1' and 'Event2' so they should be in 'EventCommonColumns'. Secondly, the relationship between 'Event1/2' and 'EventCommonColumns' is 1-1. So there's no need for 'eventCommonColumnsId' - just have the primary key of 'EventCommonColumns' be the same as that of the corresponding row in the event specific table. When one makes these changes then I think you have the same design that I proposed in the question.
Oct
14
comment Database design: where do I put this data?
Isn't that the same design as the one proposed in my question?
Oct
14
comment Database design: where do I put this data?
Yes but I'm saying that LLBLGen allows both table designs - two tables with a 1-1- mapping or one table with some rows with padding nulls. Whichever way round one chooses though what is there to stop an event having category specific per event fields but referencing the wrong category and vica versa?
Oct
14
comment Database design: where do I put this data?
The OR mapper I'm using 'LLBLGen' does allow one to cram a hierarchy of types into a single table seamlessly but that still leaves my main qualm from the question alive.
Oct
14
comment Database design: where do I put this data?
But then both 'Event' table and 'Different Event' table would duplicate the base columns that they both have in common. If I want to add a new base column then I'd need to do it in two places.
Oct
14
comment Database design: where do I put this data?
If both tables were joined then events which were not special events would have to pad out the unnecessary columns with nulls. Thus the table wouldn't be in first normal form.
Oct
13
asked Database design: where do I put this data?
Mar
9
awarded  Scholar
Mar
9
accepted Where does a type specific field go?
Mar
9
comment Where does a type specific field go?
I reckon I've come up with a bad example. I should have stuck to my actual situation at hand and described it more technically. ;) Quick translation... the cars table holds instances of cars. Manufacturers should really be types of car (e.g. Model-T). Each car instance will need a value for each car feature e.g. color. So some car types have more features than others. I think Joel Brown has identified the issue here.
Mar
9
comment Where does a type specific field go?
Wouldn't this also need a join table between Car and Features in order to set the values of the features for a car?
Mar
9
awarded  Supporter