|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Thursday, April 18, 2013 8:56 AM
Points: 22,
Visits: 140
|
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Wednesday, June 20, 2012 7:32 AM
Points: 1,
Visits: 17
|
|
| The article is of course correct but 'decoupling databases' is not what it is about. What you describe is the very basics of database design. And the tabels are relation tables, not bridge tables... So nothing is being decoupled here, just properly designed.
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Monday, April 01, 2013 5:46 PM
Points: 1,
Visits: 20
|
|
| I have to agree that this article is both mis-named and really a no-brainer. Just good design practice. There is really no simpler way of implementing many-to-many relationships in relational databases
|
|
|
|
|
Hall of Fame
       
Group: General Forum Members
Last Login: Yesterday @ 7:40 AM
Points: 3,541,
Visits: 1,134
|
|
My understanding is that in this standard relational database design pattern (as highlighted by the previous posters) and what the article refers to as a 'bridge table' is commonly referred to as a 'link table'.
Gaz
-- Stop your grinnin' and drop your linen...they're everywhere!!!
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: 2 days ago @ 1:34 AM
Points: 196,
Visits: 464
|
|
Hi Timothy,
Normalization and decoupling are one and the same?
|
|
|
|
|
Hall of Fame
       
Group: General Forum Members
Last Login: Yesterday @ 7:40 AM
Points: 3,541,
Visits: 1,134
|
|
sqlusers (3/2/2010) Hi Timothy,
Normalization and decoupling are one and the same?
Just to butt in, I would say that normalisation is the standard way of decoupling data in a relational database.
Gaz
-- Stop your grinnin' and drop your linen...they're everywhere!!!
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Wednesday, July 13, 2011 4:11 AM
Points: 113,
Visits: 144
|
|
Give the guy a break - this is aimed at newbies.
Right - it is a no-brainer for us grizzled database developers. I can add a little constructive criticism though Tim. Your link table has an IDENTITY column - why? If you create a composite key of your fk_user + fk_group columns (check out your naming as well) and set this as the PRIMARY KEY to this link table you are killing a couple of birds with one stone.
(1) You have eliminated a redundant column (2) You have ensured that you are not duplicating USER-GROUP membership (PK uniqueness) (3) You can either eliminate your duplicate checking SQL and let the UI layer deal with an error, or simplify your checking to ignore the error completely
Bill
|
|
|
|
|
Hall of Fame
       
Group: General Forum Members
Last Login: Yesterday @ 7:40 AM
Points: 3,541,
Visits: 1,134
|
|
bill.sugden (3/2/2010) Give the guy a break - this is aimed at newbies.
Right - it is a no-brainer for us grizzled database developers. I can add a little constructive criticism though Tim. Your link table has an IDENTITY column - why? If you create a composite key of your fk_user + fk_group columns (check out your naming as well) and set this as the PRIMARY KEY to this link table you are killing a couple of birds with one stone.
(1) You have eliminated a redundant column (2) You have ensured that you are not duplicating USER-GROUP membership (PK uniqueness) (3) You can either eliminate your duplicate checking SQL and let the UI layer deal with an error, or simplify your checking to ignore the error completely
Bill
Bill,
I will say that I feel that most of the comments are constructive criticisms. Particularly as this is aimed at the more novice practitioner, we need to ensure the accuracy of the article. Personally, I don't think that terms such as 'no brainer' and 'newbies' helps but some people find them helpful descriptives. Interestingly, there is a recent thread discussing how to inform authors or errors, mistakes and corrections ([url=http://www.sqlservercentral.com/Forums/Topic872452-263-1.aspx][/url]).
Regards, Gary
Gaz
-- Stop your grinnin' and drop your linen...they're everywhere!!!
|
|
|
|
|
SSCertifiable
       
Group: General Forum Members
Last Login: Wednesday, May 22, 2013 2:17 AM
Points: 6,862,
Visits: 8,049
|
|
|
|
|
|
Old Hand
      
Group: General Forum Members
Last Login: Yesterday @ 4:50 AM
Points: 316,
Visits: 1,186
|
|
It's not decoupling but designing for resolving many-to-many releationships.
|
|
|
|