The tables and relationships I plan to use
There will be two tables my first table will be criminal personal details it will contain 8 fields, these are:
- ID
- Name
- Age
- Date of birth
- Address
- Post code
- Telephone number
- Crime code
The second table will be records of incidents, this table stores all the incidents of the criminals, it will contain 4 fields, and these are:
- ID
- Incident
- Date of incident
- Crime code
There are many different sizes of fields I have chosen in each of the tables it really depends on the data type. For example if the data type is “text” then the field size is always 50, on the other hand if the data type is “number or “auto number” then the field size will always be long integer.
How I put my plan for tables and relationships onto access
Here are screenshots of what I did to set up my tables, similar to a step by step.
I set up the primary key by choosing the field “ID” because it I unique key, I right clicked and selected “primary key”.
Setting up a relationship
These are some screenshots of what I did to set up my relationships
I went of “tools” then “relationships”
A new window called the Show Table appeared on the screen then I Selected each table name in turn, clicking on Add after each one. I did this with both tables then I clicked on close
Then I Clicked and held on the field name “ID” in the Records of incidents window and dragged it to the Criminal person details field in the Crime Code window, before releasing the mouse button.
After that was done a new window appeared already knowing that the relationship is One-to-Many
After that was done a new window appeared already knowing that the relationship is One-to-Many
I clicked the Enforce Referential Integrity and ticked cascade update related fields and records and click create.
The field “ID” is a primary key. The field “Crime code” is not a primary key, but is part of a relationship, so it’s called a foreign key.
How I entered data into my tables
Here are some screenshots of the forms I have designed and used,
I have designed 2 forms, criminal details and records of incidents form
To go with my database I also made a form which shows the information that was needed, this form shows the criminals personal details
This form shows the records of incidents
Here are some screenshots of my query
Printout of my reports
Safety
To make sure I don’t loose my work I have kept back-up copies of my work on floppy disk, if my floppy was to get lost I would still have a back up on my home hard drive, so this is how I kept my work safe.
Also in my work there was no errors that occurred.