home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.databases.oracle      Overblown overpriced overengineered SHIT      2,288 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 1,785 of 2,288   
   .com to Agoston Bejo   
   Re: Implementing complicated constraints   
   29 Sep 04 07:30:20   
   
   XPost: comp.databases.oracle.server   
   From: mcstockX@Xenquery   
      
   "Agoston Bejo"  wrote in message   
   news:cjdr0n$vr4$1@news.caesar.elte.hu...   
   | I would like to do this so that the structure of the tables remain the   
   same.   
   | (Since in the real-life analogue of this example it is important that the   
   | structures reflect the real-life concepts.)   
   |   
   | Anyway, the question is rather about the implementation of more   
   complicated   
   | constraints on tables than this specific example (which actually led me to   
   | pose this question in the newsgroup).   
   |   
   |   
   | "wario"  wrote in message   
   | news:962c6d85.0409280619.395fb2@posting.google.com...   
   | > --Table A(AID, BID ref. B.BID, CID ref. C.CID, ATXT)   
   | > --Table B(BID, CID ref. C.CID)   
   | > --Table C(CID)   
   | >   
   | > 1.  Add CID key to table A.   
   | > 2.  Create unique index on CID and ATXT.   
   | >   
   | > Wario   
   |   
   |   
      
   Typically, the conceptual data model should accurately reflect the business   
   reality -- but the actual table structure that implements the model will   
   usually be compromised (denormalized) to accommodate technology   
      
   keep in mind that if these are dependent tables, the natural key structure   
   would be:   
      
   C   
   CID   
   PK (CID )   
      
   B   
   CID   
   BID   
   FK(CID) ref C   
   PK(CID, BID)   
      
   A   
   CID   
   BID   
   AID   
   TXT   
   FK(CID, BID) ref B   
   PK(CID, BID, AID)   
      
   which then give you the option of adding the UK to table A -- but again, it   
   depends on factors that you've not yet stated   
      
   ++ mcs   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca