July 15, 2019 at 8:40 am
I understand that one technique for many-to-many relationship implementation in data warehouses in using bridge table. I have difficulties understanding its nature and what exactly in contains - real measures, or just keys? Good articles and books are welcome.
Thanks for your help!
July 15, 2019 at 9:57 am
I typed "sql bridge table" into my favourite search engine and got a few promising results. Another term for it is "junction table" - you may get some more results if you search for that as well.
John
July 15, 2019 at 4:35 pm
Usually these are just tables with two dimension columns for a many:many relationship. I suppose if you wanted to add some measure in here, like weight, you could.
August 9, 2019 at 12:44 pm
Such a table certainly could contain measures. The concept of a "bridge table" (AKA join table or association table among other names) is actually pretty subjective and difficult to pin down. One possible definition is that it's a table with two or more foreign keys. If that's correct then lots of tables are "bridge" tables but most of the time we don't call them that.
August 9, 2019 at 2:38 pm
To emphasize the lesson that John Mitchell is trying to teach, become independent and don't limit yourself to "just" the answers you might get on a forum. Try his searches and try searching on the very question you asked.
And don't limit your search to a single try. John used "SQL Bridge Table". Try "Bridge Table SQL" and see that the first answer that comes back has a good explanation even though it's for a different type of database. Also make sure you look at the suggested searches as you're typing where you might find such gems as a reference to W3Schools.
--Jeff Moden
Change is inevitable... Change for the better is not.
August 9, 2019 at 6:56 pm
A great reference to data warehouse design is the Kimball Group. They have an article on bridge tables and an example here:
https://www.kimballgroup.com/2012/02/design-tip-142-building-bridges/
They wrote the book on data warehousing and dimensional modeling, literally!
Their work is continued by the group DecisionWorks:
August 9, 2019 at 7:05 pm
Good links, Chris. Just to be sure, though, you don't have to have a data warehouse to use "Bridge Tables".
--Jeff Moden
Change is inevitable... Change for the better is not.
August 9, 2019 at 8:08 pm
Jeff,
That is true, but since the OP explicitly asked about bridge tables in data warehouses, I figured I'd give them the best resources I know of instead of telling them to do a random Google search and have to weed through all the material themselves.
August 10, 2019 at 4:03 am
Chris Harshman wrote:https://www.kimballgroup.com/2012/02/design-tip-142-building-bridges/
I'm not impressed with the suggestion in that article. Rolling data up into XML and then unwrapping it just to generate a new surrogate key! It's a good thing not everyone lives on Planet Kimball.
August 11, 2019 at 3:47 pm
Jeff,
That is true, but since the OP explicitly asked about bridge tables in data warehouses, I figured I'd give them the best resources I know of instead of telling them to do a random Google search and have to weed through all the material themselves.
Yeah, sorry. Short posts don't always tell the rest of the story. The first sentence was directed at you and the time you took to post some data warehouse links. The second sentence was directed at the OP or anyone else that might be thinking that you have to have a data warehouse in order to be able to use "Bridge Tables".
I'll try to be a bit more explicit on such things to avoid such confusion.
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 10 posts - 1 through 9 (of 9 total)
You must be logged in to reply to this topic. Login to reply