View Single Post
  #3  
Old March 30th, 2010, 06:49 PM posted to microsoft.public.access.tablesdbdesign
Steve[_77_]
external usenet poster
 
Posts: 1,017
Default Newbee Access DB structure help

Roy,

Dennis has given you some bad advise! Start at the beginning and not at the
end. The first thing you need is a well designed set of normalized tables to
hold your data. To avoid building in headaches, find a reference to Access
Reserved Words and don't name any table or field with a reserved word. Part
two of avoiding building in headaches is to name all your tables starting
with Tbl and don't use any spaces or underlines in the names. Part three is
to use an autonumber field for all primary keys, end the primary key field
name with ID and make all foreign key names the same as its related primary
key. If you achieve this, coding will be simple and easy to read and
creating any forms and reports you want will be easy.

Basically your data consists of components, receptacles for components and
location of each receptacle. Spend time with a pencil and paper and work out
a preliminary design of your tables. Then post back what you have for a
critique and suggestions. The typical way to post tables is:
TblComponent
ComponentID
ComponentDesc
other fields describing attributes of a component


Steve






"Yoric" wrote in message
...
Hi All,
I am doing a project to get started on Access. I am a tinkerer, and have a
lab and garage full of storage boxes, component chests, tackle boxes,
plastic
tubs and such, on shelves, in cupboards and on the floor. Each receptacle,
be
it a large plastic tub, or a single drawer of a 6x5 component chest has
components in it. There may be more than one, and more than one type of
component in each receptacle. Each receptacle has a location (room),
position
(shelf, floor) and a unique id. A receptacle is always singular, but may
be a
single carton, or a drawer within a multi-drawer chest. There may be
several
chests, some with 5x6 drawers, some with 8x4 drawers etc.
Components each have attributes: Description, part #, genre, image,
datasheet, # on hand, etc. A single type of component may have 1, 2 or
more
genres (OPTO, Discrete, Semiconductor). There may be the same type of
component in different receptacles (Part of the reason for this project is
to
gather them and consolidate them!)
Thus far, I have created tables for ReceptacleType (18 possibilities),
Location(4 possible rooms), Component (20 fields incl location, receptacle
type, #on hand, but mainly just attributes etc). I also have a Receptacle
table which is the uniqueid for every single receptacle, its type,
location,
and component list field.
I am struggling in several areas:
1) I am not sure how to build the relationships, such that some
receptacles
have 'parents' or hierarchy and some do not. For example, a drawer within
a
chest of 20, or a single large cardboard box.
2) How to construct forms that will change 'downstream' fields, dependent
upon a certain choice made in a combo box. Say if I select a chest drawer,
a
field will open to describe which chest
3) How to set up forms for the most efficient data entry.

I envisage visiting each receptacle with my laptop, entering the list of
components in it (briefly), the location of the receptacle, physically
labelling the receptacle with the uniqueid sticker, then moving to the
next.
Once that is done, I would go to each component, and flesh out the data
for
the attributes as necessary. Later on, it would be great to report all the
'OPTO' components, so I could gather them all up and consolidate them into
grouped, or adjacent receptacles, updating the db as I did so.
An important attribute for each component would be a synonym field, so I
could query LED, led, LEDS, Light Emitting Diodes and find all of the
relevant records.

Frankly, any advice, especially on where to begin, would be most
appreciated!

Thanks in anticipation,
Roy.