<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Table design</TITLE>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2600.0" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>You 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:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Product OrderType</FONT></DIV>
<DIV><FONT face=Arial size=2>Product1 Christmas</FONT></DIV>
<DIV><FONT face=Arial size=2>Product1 AllYear</FONT></DIV>
<DIV><FONT face=Arial size=2>Product1 Corporate</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>and so on... </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>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. </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Susan H. </FONT></DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=Tim.Pain@sc.akzonobel.com
href="mailto:Tim.Pain@sc.akzonobel.com">Pain, T. (Tim)</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=accessd@databaseadvisors.com
href="mailto:accessd@databaseadvisors.com">accessd@databaseadvisors.com</A>
</DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Friday, May 30, 2003 10:08 AM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> [AccessD] Table design</DIV>
<DIV><BR></DIV><!-- Converted from text/rtf format -->
<P><FONT face=Arial size=2>I currently have the following <snipped>
table designs -</FONT> </P>
<P><FONT face=Arial size=2>Products:</FONT> <BR><U><FONT face=Courier>Product
Christmas Easter AllYear
Major
Corporate</FONT></U> <BR><FONT face=Courier size=2>Product
1
True
False
True
False
True</FONT> <BR><FONT face=Courier
size=2>Product 2
False
False
True
True
False</FONT> <BR><FONT face=Courier
size=2>Product 3
etc'</FONT> </P>
<P><FONT face=Arial size=2>OrderType:</FONT> <BR><U><FONT
face=Courier>OrderType
Christmas Easter AllYear
Major
Corporate</FONT></U> <BR><FONT face=Courier
size=2>Christmas
True
False
False
True
False</FONT> <BR><FONT face=Courier
size=2>Easter
False
True
False
True False</FONT>
<BR><FONT face=Courier size=2>AllYear
False
False
True
True
False</FONT> <BR><FONT face=Courier
size=2>Corporate
True
True
True
True
True</FONT> <BR><FONT face=Courier
size=2>Major
False
False
False
True
False</FONT> </P>
<P><FONT face=Arial size=2>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".</FONT></P>
<P><FONT face=Arial size=2>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.</FONT></P>
<P><FONT face=Arial size=2>There has to be a more elegant and easier to
maintain way of doing this, but I can't see it.</FONT> <BR><FONT face=Arial
size=2>Any ideas please?</FONT> </P>
<P><FONT face=Arial size=2>Many thanks</FONT> <BR><B><I><FONT
face="Times New Roman" color=#000080>Tim</FONT><SPAN
lang=it></SPAN></I></B><I><SPAN lang=it></SPAN></I><SPAN lang=it></SPAN><SPAN
lang=it> </SPAN></P><BR><BR>
<P>
<HR>
<P></P>_______________________________________________<BR>AccessD mailing
list<BR>AccessD@databaseadvisors.com<BR>http://databaseadvisors.com/mailman/listinfo/accessd<BR>Website:
http://www.databaseadvisors.com<BR></BLOCKQUOTE></BODY></HTML>