New database

G

GB

Hi All,

I have a client with a simple requirement for a database. It involves
machinery eg lawnmowers and power tools with a service history. now the
dilemma is because the same piece of equipment is serviced more than once
and also possibly spare parts assigned to it, what would be the best way to
put this into a database without having to re-enter the same information a
lot of times for the same piece if the only thing that changes in that
specific day is a change of oil??

THanks in advance and regards

GB
 
D

Dirk Goldgar

GB said:
Hi All,

I have a client with a simple requirement for a database. It involves
machinery eg lawnmowers and power tools with a service history. now
the dilemma is because the same piece of equipment is serviced more
than once and also possibly spare parts assigned to it, what would be
the best way to put this into a database without having to re-enter
the same information a lot of times for the same piece if the only
thing that changes in that specific day is a change of oil??

THanks in advance and regards

GB

This is exactly what a relational database system (like Access) is for,
and where it shines over a simple spreadsheet like Excel. With Access,
you define a separate table for each unique type of "entity" -- thing,
person, event -- that needs to be represented, and then you define
relationships between those tables based on key fields they have in
common. These key fields are the only pieces of information that are
duplicated.

For example, you might conceivably define tables like these:

Table: EquipmentTypes
(one record for each type of equipment)
Fields: EQTypeID (primary key),
EQTypeDescription

Table: Equipment
(one record for each piece of equipment)
Fields: EquipmentID (primary key),
EQTypeID (key to EquipmentTypes)
EquipmentDescription

Table: Services
(one record for each type of service)
Fields: ServiceID (primary key)
ServiceDescription
ServiceLaborCharge

Table: Parts
(one record for each part)
Fields: PartID (primary key)
PartName
Manufacturer
PartPurchaseCost
PartSaleCost

Table: ServiceHistory
(one record for each service performed on
a piece of equipment)
Fields: SvcHistID (primary key)
ServiceDate
EquipmentID (key to Equipment)
ServiceID (key to Services)

Table: ServiceParts
(one record for each part used in a
given service)
Fields: SvcPartID (primary key)
ServiceID (key to Services)
PartID (key to Parts)

The above table design is very rudimentary, of course. Anyway, with
Access you set up tables like these to represent the universe of
information that your database is supposed to track, and you define
relationships between the tables. For example, EquipmentTypes has a
one-to-many relationship to Equipment: for each type of equipment there
may be many actual pieces of equipment of that type. Services has a
one-to-many relationship with ServiceHistory, and so does Equipment.

Having defined your tables, you set up forms and subforms to let you
enter or view the data in its proper relationship. For example, you
might have a form based on the Equipment table, with a subform based on
ServiceHistory showing, for each piece of equipment, the services that
have been performed on that piece. When a new service is performed on
some item, you need only open the Equipment form, locate the record for
the item in question, and then enter the details of the service and date
on the service-history subform.

There's a lot that goes into designing a really good, intuitive,
easy-to-use database, but these are, I think, the essentials.
 
J

Jeff Conrad

Well I didn't think it was a waste.
A very good read if I may say so.

Jeff Conrad
Bend, Oregon
 
V

Van T. Dinh

Your answer is much more detailed than mine!

Mine is more of telling the O.P. to get on the right track. It sounds like
the O.P. is doing this for a client but he / she has very little idea about
Relational Database Design Theory.
 
G

GB

Hi All,

Thanks for all your input, and no you didn't write all that for nothing.
Excuse me if I had posted it to 2 groups, but at times, no-one gets a reply,
so please get off your high horses, because maybe some day some of you might
need some of my expertise in some other areas. If you know it all then,
hey, good for you. I mean this with the highest respect.

thanks again for the help, it is really appreciated

Regards

GB
 
V

Van T. Dinh

Your 2 threads wre posted at the same time and Dirk
answered within 15 mins and mine reply was within 45 mins.

If you want your question to appear in both groups, use
cross-posting as metioned in the netiquette.

IMHO, devoloping databases for clients without knowing the
basics of Relational Database Theory is doing a
*disservice* to the clients. Whether you want to do the
right thing for your clients and improving your skills in
database development is up to you.

HTH
Van T. Dinh
MVP (Access)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top