#1,683 in Computers & technology books
Use arrows to jump to the previous/next product

Reddit mentions of Data Model Patterns

Sentiment score: 2
Reddit mentions: 2

We found 2 Reddit mentions of Data Model Patterns. Here are the top ones.

Data Model Patterns
Buying options
View on Amazon.com
or
    Features:
  • Johns Hopkins University Press
Specs:
Height8.75 Inches
Length6.75 Inches
Weight1 Pounds
Width0.75 Inches

idea-bulb Interested in what Redditors like? Check out our Shuffle feature

Shuffle: random products popular on Reddit

Found 2 comments on Data Model Patterns:

u/NotTooDeep ยท 2 pointsr/mysql

/u/chammit gave you the best answer. I'd like to expand on it so that you have a few ways to look at 'linking' tables.

I've worked on distributed order management systems and a bunch of other stuff. The basic relationship you need to understand is the many-to-many relationship. To use your example, a product has a set of attributes. One type of product is a screwdriver. A specific screwdriver may be in one and only one inventory location.

Screwdrivers can be in one or more inventory locations. In one sense, this sounds like one-to-many, but it doesn't scale. If we only had one product and could guarantee that we'd never have more than one product, the inventory location would just be another column on the product table. But this is not realistic.

Products may exist in one or more inventory locations.

An Inventory location may stock one or more products.

These two statements declare the many-to-many relationship. Many-to-many relationships are always resolved through a 'link' table that maps the PK from one table in the relationship to the PK in the other table. Each product in the product table might have one record in the link table for each store.

Which leads to this question: how many screwdrivers are in the Canadian store? Which leads to this: where should the model store the value for how many screwdrivers are in a store? That value belongs in the link table. So do pricing, the effective dates for sales, replenishment thresholds (time to reorder number), etc.

Here are some synonyms that I've run across in specific situations. This will help you understand what people are talking about. Just remember that all these tables resolve a many-to-many relationship, with one potential exception.

Here's the possible exception: Crosswalk table. This is used to maintain the mappings of one system's names for things to another system's different names for the same things. It's used in integration APIs, ETL for data warehouse and integrations feeds. It's more often the case that this table only has one mapping record for each term, to no many-to-many relationship exists, even though it could.

Other synonyms: bridge table, associative table.

Note that if you look at an invoice detail table, it is resolving the many-to-many relationships between several entities; product, customer, store, date. The same can be said for any detail table in a master-detail model, any child in a parent-child model. The phrase, 'master-detail', I believe is common in GUI design, while 'parent-child' is common in backend development. They mean the same thing from the point of view of the table structure.

Your modeling skills are off to a good start. This is because you asked the right question: "How many screwdrivers are at the Canadian store?" I attempted to share how I would break down your question to arrive at a modeling solution.

Edit: My recommended book: https://www.amazon.com/Data-Model-Patterns-David-Hay/dp/0932633749

u/el_chief ยท 2 pointsr/Database

For your particular application I would look at OpenStreetMaps. Otherwise...

David Hay's