Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 26th, 2012  |  syntax: None  |  size: 0.46 KB  |  hits: 11  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Why unidirectional one-to-many association on a foreign key is an unusual case and is not recommended?
  2. Owner : [OwnerId, Name...]
  3. Car   : [CarId, Name...., OwnerId]
  4.        
  5. Owner    : [OwnerId, Name...]
  6.  Car      : [CarId, Name....]
  7.  CarOwner : [OwnerId,CarId]
  8.        
  9. table customer(id, idAccount)
  10.  
  11. id  |  idAccount
  12. 1         1
  13. 1         2
  14.        
  15. table customer(id)
  16.  
  17. id |
  18.  1
  19.  
  20. table join (idCustomer, idAccount)
  21.  
  22. idCustomer  | idAccount
  23.      1            1
  24.      1            2