On Thursday, July 12, 2012 1:08:21 PM UTC-6, Jamie Hodge wrote: > > I was asking if the records and joins tables could be structured in a > manner that better embodied the business logic, i.e. a way in which it was > impossible for an approval record to exist without an accompanying item and > author pair.
I would add item_id and author_id to authorizations. Add the appropriate unique indexes for those. And setup a "on delete cascade". Doing this in the application/model code results in extra database queries than necessary, so I'd agree that you'd want this in the db schema/code. Joe -- You received this message because you are subscribed to the Google Groups "sequel-talk" group. To view this discussion on the web visit https://groups.google.com/d/msg/sequel-talk/-/W9f3v6s5ZrcJ. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/sequel-talk?hl=en.
