[AccessD] Table design

Susan Harkins harkins at iglou.com
Fri May 30 09:31:56 CDT 2003


Table designYou might consider renormalizing your data into two tables, although I'm not sure the second table's really necessary -- would need more info to decide:

Product    OrderType
Product1    Christmas
Product1    AllYear
Product1    Corporate

and so on... 

Whether a second table that lists just the order types is really necessary or not really depends on you and how much you're using that list. 

Susan H. 
  ----- Original Message ----- 
  From: Pain, T. (Tim) 
  To: accessd at databaseadvisors.com 
  Sent: Friday, May 30, 2003 10:08 AM
  Subject: [AccessD] Table design


  I currently have the following <snipped> table designs - 

  Products: 
  Product         Christmas       Easter  AllYear Major           Corporate 
  Product 1               True            False           True            False           True 
  Product 2               False           False           True            True            False 
  Product 3               etc' 

  OrderType: 
  OrderType               Christmas       Easter  AllYear Major           Corporate 
  Christmas               True            False           False           True            False 
  Easter          False           True            False           True            False 
  AllYear         False           False           True            True            False 
  Corporate               True            True            True            True            True 
  Major                   False           False           False           True            False 

  In Order Entry, the user selects an "OrderType" in the header and I then need to check for each line item, if this product is allowed for this "OrderType".

  Now this works, but does require quite a bit of code to test each variation, but more important, it also makes maintenance a pain. If I now need to add a new OrderType, I have to add a record to the OrderType table (no problem with this), but also add a column to the Products table and then re-work the code to check the order line items.

  There has to be a more elegant and easier to maintain way of doing this, but I can't see it. 
  Any ideas please? 

  Many thanks 
  Tim 






------------------------------------------------------------------------------


  _______________________________________________
  AccessD mailing list
  AccessD at databaseadvisors.com
  http://databaseadvisors.com/mailman/listinfo/accessd
  Website: http://www.databaseadvisors.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://databaseadvisors.com/pipermail/accessd/attachments/20030530/9b9aa9fa/attachment-0001.html>


More information about the AccessD mailing list