Home Forums Database Design Relational Theory Defining keys as sets that must not intersect instead of scalar values that must not be equal RE: Defining keys as sets that must not intersect instead of scalar values that must not be equal

  • I don't think it will work without quite a lot of refinement.

    The obvious case that doesn't work is where people share a phone number.   The situation where a contact numbers takes you to a shared secretary where neither I nor the CEO nor the Creative Director is going to give a direct line contact numer to all and sundry, so the three of us share a phone number which will be answerd by someone else who will act as a gatekeeper/filter for us, passing calls on when appropriate to the relevant one of the three or dealing with them without disturbing any of us.   That phone number s then a contact number for 4 people, and your "empty intersection" rule means that your database can only have one of the four of us as a contact with that phone number.  Customrs of my former employer would still have that problem today, although I wouldn't be one of the 4 involved since I retired 8 years ago.

    Many yearsbefore that, there would have been a problem with my home phone number too. Some people would have that number because there were circumstances at which certain very senior executives of customer companies had to be able to contact me out of office hours (ability built into some contracts).  But some people would have that number so they could contact my wife in her role as borough mayor or as chair of the county and borough joint highway committee,  and it's quite common for senior people in companies to have to deal both with suppliers and with local government, so your system would be broken because my wife and I - clearly distinct contacts with distinct functins and acting on behalf of different legal entities - would have had for anyone who needed both contacts key sets with a non-empty intersection, so your scheme could not handle them.

    I don't think this is at all uncommon, in fact shared phone numbers are extremely common.

    Tom