please it's very important to my work

tarek_ta2ta2

Tarek
Local time
Today, 10:31
Joined
Jun 8, 2008
Messages
47
hi every one

i will try to be specific this time, may be someone will help me here

what i want is to create data base to store the location of my shop vehicles

i have place to store vehicles and i design the place into zones and bays for example zone A contains 30 bays and zone B contain 32 and go on
i have 5 zones

i want to design the database to show where i put my vehicles which bay or zone so i can search for their location quikly

so when my vehicles arrive i want to enter the vehicle plate number and specify the zone and area and save the location and go on for all vehicles and ofcourse if i put a vehicle in specified zone and area i don't wana make them available again to put vehicle in them which mean i want a way to free the place when the car is out

please this is very important and i don't have any clue to start

Helppppppppppp
 
You will need a table that contains the following fields

ID - PK Primary key
Zone ID
Bay ID
Occupied


Next you will need another table for your cars

ID PK Primary Key
Plate Plate number
Location FK foreign key (PK from locations table)


As a car can only be in one place at a time you only need to a one to one relationship

Have a form that lets you pick up a car from your cars table

Then have a comb box that lets you pick a zone
Then another that lets you pick up the bays for that zone that are unoccupied.

Then have a button that runs an update query that set the field Occupied to True in the locations table for the selected bay. Then run another update query that puts the locations ID in the Location field in the cars table.


This is it at is simplest form.

David
 
Ok, so let's start by identifying your tables.

You have a table to store your "Zones", a table to store your "Bays", and a table to store your "Vehicles".

Now thinking of the relationships, Each "zone" can have "many bays". Each bay can have many vehicles stored over time, and each vehicle can be stored in many different bays over time. This is a many-to-many relationship.

Thinking logically down the line, you will need to store information on when the vehicle was placed there, and when the vehicle was removed from there. That way you can build queries to see if a bay is occupied or not (if a bay has any vehicle without a removed date, then it is full, otherwise it is empty.).

I would suggest reading up on data normalization, queries, and other Access Tutorials before you begin this task.

EDIT: DCrake replied before I finished typing, and his idea might be simpler than mine, it depends on what information you wish to get out of the database at the end.
 

Users who are viewing this thread

Back
Top Bottom