Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 12345»»»

Decoupling in Relational Databases Expand / Collapse
Author
Message
Posted Monday, March 1, 2010 9:33 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Friday, October 17, 2014 11:18 AM
Points: 22, Visits: 141
Comments posted to this topic are about the item Decoupling in Relational Databases
Post #874846
Posted Tuesday, March 2, 2010 12:49 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, December 6, 2013 1:08 AM
Points: 1, Visits: 19
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.
Post #874901
Posted Tuesday, March 2, 2010 12:55 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, April 1, 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
Post #874902
Posted Tuesday, March 2, 2010 1:36 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 3:10 AM
Points: 5,591, Visits: 3,442
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!!!
Post #874924
Posted Tuesday, March 2, 2010 2:54 AM


SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Wednesday, June 18, 2014 3:47 AM
Points: 199, Visits: 512
Hi Timothy,

Normalization and decoupling are one and the same?
Post #874950
Posted Tuesday, March 2, 2010 3:05 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 3:10 AM
Points: 5,591, Visits: 3,442
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!!!
Post #874959
Posted Tuesday, March 2, 2010 3:06 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-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
Post #874960
Posted Tuesday, March 2, 2010 3:47 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 3:10 AM
Points: 5,591, Visits: 3,442
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!!!
Post #874985
Posted Tuesday, March 2, 2010 3:48 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Thursday, October 9, 2014 10:42 AM
Points: 6,731, Visits: 8,480
This is a good article that proves how normalization helps you design and maintain a database.



Johan


Don't drive faster than your guardian angel can fly ...
but keeping both feet on the ground won't get you anywhere

- How to post Performance Problems
- How to post data/code to get the best help


- How to prevent a sore throat after hours of presenting ppt ?


"press F1 for solution", "press shift+F1 for urgent solution"


Need a bit of Powershell? How about this

Who am I ? Sometimes this is me but most of the time this is me
Post #874987
Posted Tuesday, March 2, 2010 4:15 AM


Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Thursday, October 16, 2014 3:45 AM
Points: 338, Visits: 1,431
It's not decoupling but designing for resolving many-to-many releationships.
Post #874998
« Prev Topic | Next Topic »

Add to briefcase 12345»»»

Permissions Expand / Collapse