Steve Erbach
erbachs at gmail.com
Sat Apr 9 12:00:58 CDT 2005
Thank you, Arthur. I thought, at first, about suggesting the addition of columns to a master table as you did. It seemed to be one of those relational thingummies that we're taught to avoid. Granted, your solution is much the simplest -- leaving out the flower children on this list. Steve Erbach On Apr 9, 2005 11:42 AM, Arthur Fuller <artful at rogers.com> wrote: > First of all, I would question the usefulness of placing the objects in > numerous tables. The first problem with this design is the fact that you > have to add new tables relatively frequently. I would suggest -- at > least for purposes of kicking it around -- another structure in which > two tables -- ObjectTypes and Objects -- are used. Every time you need a > new object type, you add a row to that table. This new object may > require new columns that are not yet present in Objects. So you add > them. Then you create a view/query for each object type that exposes > only those rows from Objects that are relevant to said object type. For > example, automobiles have a VIN#, CDs don't, and so on. But on the other > hand, virtually all the objects have things in common, such as > Description, purchase date, purchase price and so on, so all queries > will contain these columns. A good way to do that is to create one query > that includes all the common columns, and additional queries (one per > object type) that add the columns unique to that type. > > One significant advantage to this design is the ease with which you can > produce a report that includes all objects of all object types -- just > report the common columns. > > Once you have the queries for each object type, you could generate > autoForms, set their default to DataSheet, then create a master form > with a tab control, and plonk each DS form onto its own tab. The master > form could be based on the ObjectTypes table, making the links to the > Objects table a no-brainer. > > Assuming that you have a list of the properties for each object type, > you could do this whole app in a morning. > > Arthur