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

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

$
0
0

The Domain Expert has given you a requirement disguised as an implementation detail. I would implement this by:

  • Implementing a relation table as you want
  • Implementing a view which will give up to 4 associated registrations per owner

When an owner registers a fifth registration the system should keep working with no problem (which is probably what the DE wants) but the view he uses for reporting will still only show 4 registrations. (Maybe the view could include the total number of registrations per owner as well?)

This way you may have to change the view (used only for reporting) every now and then, rather than have to change a major table and all the relations and code that will be affected.


Viewing all articles
Browse latest Browse all 3

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>