Timeline for Maintaining referential integrity in a booking system
Current License: CC BY-SA 3.0
4 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
May 23, 2017 at 11:33 | history | edited | CommunityBot |
replaced http://stackoverflow.com/ with https://stackoverflow.com/
|
|
Mar 29, 2012 at 5:52 | comment | added | ypercubeᵀᴹ |
@Uncle: See @Alex's answer. It's a perfectly valid solution that works in your problem, solving it using only declarative constraints. It kind of avoids the problem because only a simple COUNT(*) would be needed in the subquery solution. And having UNIQUE (a) and (a BETWEEN 1 AND size) is the same as (COUNT(*) ...) < size . So, you just have to move (add) the size column to the Booking table and also add that column a (called BookingNumber in the provided solution).
|
|
Mar 28, 2012 at 23:58 | history | edited | ypercubeᵀᴹ | CC BY-SA 3.0 |
added 289 characters in body
|
Mar 28, 2012 at 23:48 | history | answered | ypercubeᵀᴹ | CC BY-SA 3.0 |