Quantcast
Channel: Is there a name for this pattern, representing one-to-many relationships by adding columns with an index to a single table? - Database Administrators Stack Exchange
Viewing all articles
Browse latest Browse all 3

Is there a name for this pattern, representing one-to-many relationships by adding columns with an index to a single table?

0
0

So a domain expert wants the following relation:

CarOwners(owner_id, name, address, car_1_registration, car_2_registration, car_3_registration, car_4_registration)

The reason given that most people are unlikely to have more cars than that, and that it's easier to reason with than the general case of an arbitrary number of cars. This seems like a common pattern for Excel jockeys, whereas for a DBA it would be much easier to simply have a separate relation:

Car(registration, owner_id)

But this idea is hard to sell to anyone who doesn't know what a JOIN is.

I looked in database literature and couldn't find any references to this (arguably anti-)pattern. Perhaps there's nothing theoretically wrong with it (it's just impractical), or it's simply too goofy to even be considered by academics. But it would be interesting to hear if it's actually covered.


Viewing all articles
Browse latest Browse all 3

Latest Images

Trending Articles





Latest Images