Professional Documents
Culture Documents
Vet Clinic Customer Database - 0
Vet Clinic Customer Database - 0
Organization
Owner/Customer Information
The owner of a pet is the customer of the Vet. Clinic. The owner bears the responsibility of a pet,
therefore, owner details is of great importance like his/her name, occupation, phone number, and
related information. We might consider to have the owners information in a separate table to
reduce redundancies.
A table is a set of columns and rows. Each column is called a field. The fields included in the above
mentioned tables are given below
Name of table
Field (Primary Key)
Field
Field
Field
Field
Customers
Customer ID
Customers Name
Contact no.
Address
Occupation
Pet Information
The pets are the patient. Information about the pets/patients can be kept in another table to
reduce redundancies. The basic information about an animal includes type, breed, birthdate, and
gender. We will consider creating a separate table with the pets information.
Name of table
Field (Primary Key)
Field
Field
Field
Field
Pets
Pets ID
Pets Name
Type Of Animal
Breed
Gender
Visits/Transaction
Keeping a history about previous visits of the pet can provide the clinic with information to
improve the service level. We will consider adding a third table that contains with information like
the date and time of the visit(s), services rendered, amount paid, and notes.
Name of table
Visits
Field (Primary Key)
Visits ID
Field
Date & Time
Field
Service Rendered
The Customer table is used from the prebuilt table of MS Access
The Pets Table is created by importing an Excel file containing the information of Pets
The Visits Table is created using MS Access
Tasks to Perform
Task 1: Creating a Blank Database
To rename the table from Contacts to Customers, Right- click on the table name
(Contacts) and Select Rename.
Type new table name that is Customers and press Enter twice.
To Change the Field Name Right-click on that name and select Rename Field
Type the New Field Name as CustomerID and press Enter
Right click on the table to Save and then close the table
At first an Excel file is created (named Pets) containing the fields and data.
On MS Access, go to External Data then Select Excel from the Import and
Link tool box
A new dialogue box will pop-up. Browse the location of the Excel File and click OK.
Another Window will pop-up and check your data if it matches with the Excel file
data and click on Next>
Check the button to make the first Row as Column Headings and click Next >
The next window gives an option to change or rename the field and column data. If
everything is correct click on Next>
The Next window enables to choose primary key. Click on let Access select the
primary key and click Next>
Now, to change the field name from the table using Design View , Right click on the
table Pets and Select Design View.
The PetID is already Selected as the Primary Key. But it is important to add another
field named CustomerID as it works as the foreign key of this table. To do so, Right
click on the field named PetName and select Insert Rows.
To make VisitID as the Primary key, select the VisitID and click on the Primary Key
button.
Then to Save the table right click on the Table1 and click save. Change the name of the
table to Visits. Close the table after changing the name.
Go to Database Tools and select Relationships and a table will pop up.
Fig: Relationships
Now to select the 3 tables (Customers, Pets & Visits) highlight them all by using the
(click and hold) Shift Keyand click on the 2 nd and 3rd tables (Pets & Visits) and click
Add.The Relationships Table now will show 3 tables.
Now click the primary key CustomerID (from the 1st table) and drag it to the foreign
key named CustomerID on the Pets table. Then the Edit Relationship Window opens.
Check (tick mark) the Enforce Referential Integrity box and click on Create.
Now repeat the same procedure to connect the foreign key PetID with the
Primary key PetID.
Save and close the table and open Pets Table by right clicking and selecting
Design view as well.
Vet Database: Lab Manual
Now select the TypeOfAnimal field and select Lookup Wizard to add type of
animals.
Select the Option I will type in the values I want to add the animal types
manually and click on next.
If you dont have anything to edit like the table name then click on finish.
To create a form, select the Customer Table then go to Create Tab and Select
Form and it will create a form.
If you dont have anything to change in the form then right click on the form
name and save it.
At first the form named Customer is filled up with a new customer name and
other information. If you scroll down the Pet table is found.
Then the Pet table is filled up and on the top left corner of the pet table there is
a plus sign (+) which is linked to the Visits table.
Now Add some more Customers from the following table to get a clear idea
about a Database
Customers Table
1. First Name: Mark
Last Name:
Robinson
Contact#
+123456
City: London
Country : UK
2. First Name:
Khodeza
Pets Table
Name: Snoopy
TypeOfAnimal: Dog
Breed: Mixed
DateOfBirth: 06/04/2011
Gender: M
Visits Table
Visit Date: 02/01/2014
Total Amount: 30
Invoiced: yes
Name: Billu
TypeOfAnimal: Cat
Last Name:
Begum
Contact#
+143011
City: London
Country : UK
Breed: Persian
DateOfBirth: 10/12/2013
Gender: F
Invoiced: yes
Name: Tommy
TypeOfAnimal: Dog
Breed: Mixed
DateOfBirth: 04/09/2011
Gender: M
Name: Sammy
TypeOfAnimal: Dog
Breed: Mixed
DateOfBirth: 24/09/2010
Gender: M
Name: Dinky
TypeOfAnimal: Cat
Breed: Mixed
DateOfBirth: 05/10/2008
Gender: F
6. First Name:
Farhana
Last Name:
Haque
Contact#
+000333
City: London
Country : UK
Name: Scooby
TypeOfAnimal: Dog
Breed: Mixed
DateOfBirth: 04/09/2010
Gender: M
Name: Chappyac
TypeOfAnimal: Dog
Breed: Mixed
DateOfBirth: 04/09/2010
Gender: M
Name: Cruzer
TypeofAnimal: Dog
Breed: Mixed
DateOfBirth: 23/12/2009
Gender: M
Name: Sam
TypeofAnimal: Dog
Breed: Mixed
DateOfBirth: 12/12/2012
City: London
Country: Uk
10.First Name: Mary
Last Name: Kom
Contact#+00077
7
City: London
Country: Uk
Gender: M
Name: Tony
TypeofAnimal: Dog
Breed: Mixed
DateOfBirth: 11/11/2011
Gender: M
A new window will pop up. Select Simple Query Wizard Click Ok
Select the Table Name and the Field Names you want in your Query. For
Example, if you want to find number of dogs, you must add the field named
TypeOfTable.Here three fields are selected, CustomerID, PetName and
TypeOfAnimal.
To select field name, select the field name and click on the arrow sign, press
next and proceed
Give a suitable query name and select the option Modify the query design .
Click on Finish and the design view of the Query will be shown.
If you click on the View tab it will show you the result of your query. You can go
back to your design view by clicking on it again
Query basically means the question you want to ask to find a particular set of information.
Here the query is designed to find the list of dogs as patients in this clinic.
Fig: Query