![]() | |
#1
| |||
| |||
|
|
After trying to normalize the database, it looks like I might have to do up to 6 inserts after a user signs up. Is that normal? Is the database normalized well? Here's the image of the database: http://img818.imageshack.us/img818/9899/nikeairjdb.png |
#2
| |||
| |||
|
|
Randall (personal): After trying to normalize the database, it looks like I might have to do up to 6 inserts after a user signs up. Is that normal? Is the database normalized well? Here's the image of the database: http://img818.imageshack.us/img818/9899/nikeairjdb.png Yup, looks pretty good. I just don't see why you have attributes full_name and abbr_name in State and in Country. Are these fields different from each other? (Just info: it's not 'singup', but rater 'signup' in 'Activation' -- Erick |
#3
| |||
| |||
|
|
Thanks for your feedback! I feel better about my database structure now. So, I am guessing that doing about 6 inserts per customer registration is normal for this type of structure? |
#4
| |||
| |||
|
|
Jerry, What exact do you disagree with in your response. For example I would happily stick something like Home_Phone / Work_phone / Mobile_Phone into the customer table instead of a phone/phone_type table sometimes, even though clearly that isn't well normalised like in the example provided here. I might even have to add Work_phone_2 or something at a later date but if you know that is extremely unlikely I can't see any real issues in the denormalised version, it depends on the business need as pointed out. |
#5
| |||
| |||
|
|
On Wed, 6 Oct 2010 09:15:41 -0700 (PDT), RB wrote: Jerry, What exact do you disagree with in your response. For example I would happily stick something like Home_Phone / Work_phone / Mobile_Phone into the customer table instead of a phone/phone_type table sometimes, even though clearly that isn't well normalised like in the example provided here. I might even have to add Work_phone_2 or something at a later date but if you know that is extremely unlikely I can't see any real issues in the denormalised version, it depends on the business need as pointed out. There's an appropriate aphorism: Rules exist so that we can afford to break them. Which essentially comes down to in this case that it's important to always have the eye on reaching a reasonable ideal (3NF is usually a pretty good target). This tends to maximize the flexibility of the database you're creating. It means that you can add features and maintain the thing with minimal additional actual code. Setting aside normalization should be a *decision*, and one made every time it's done, for clear and well-understood reasons, because that decision may well make things harder further down the line. |
#6
| |||
| |||
|
|
Very nice summary of a reasonable approach to balancing rigor and practice. If you break a rule, have a good reason. |
#7
| |||
| |||
|
|
Heather Mills wrote: Very nice summary of a reasonable approach to balancing rigor and practice. If you break a rule, have a good reason. Rules are for the guidance of wise men, and the obedience of fools. |
#8
| |||
| |||
|
|
On 07/10/2010 03:55, Peter H. Coffin wrote: On Wed, 6 Oct 2010 09:15:41 -0700 (PDT), RB wrote: Jerry, What exact do you disagree with in your response. For example I would happily stick something like Home_Phone / Work_phone / Mobile_Phone into the customer table instead of a phone/phone_type table sometimes, even though clearly that isn't well normalised like in the example provided here. I might even have to add Work_phone_2 or something at a later date but if you know that is extremely unlikely I can't see any real issues in the denormalised version, it depends on the business need as pointed out. There's an appropriate aphorism: Rules exist so that we can afford to break them. Which essentially comes down to in this case that it's important to always have the eye on reaching a reasonable ideal (3NF is usually a pretty good target). This tends to maximize the flexibility of the database you're creating. It means that you can add features and maintain the thing with minimal additional actual code. Setting aside normalization should be a *decision*, and one made every time it's done, for clear and well-understood reasons, because that decision may well make things harder further down the line. My approach is to create a logical design in 3NF and then denormalize to produce a 'physical' design for performance, adding triggers and other apparatus to retain referential integrity where necessary. My approach is to avoid people who *talk* about 3NF, and use those who |
#9
| |||
| |||
|
|
Heather Mills wrote: Very nice summary of a reasonable approach to balancing rigor and practice. If you break a rule, have a good reason. Rules are for the guidance of wise men, and the obedience of fools. |
#10
| |||
| |||
|
|
On 10/7/2010 8:51 AM, The Natural Philosopher wrote: Heather Mills wrote: Very nice summary of a reasonable approach to balancing rigor and practice. If you break a rule, have a good reason. Rules are for the guidance of wise men, and the obedience of fools. And to be criticized and ignored by idiots. |
![]() |
| Thread Tools | |
| Display Modes | |
| |