Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 2

Database Management Practical Worksheet#1

READ the instructions carefully.


Create a database called PETSHOP. Create a table called PETINFO, the design view
for PETINFO is shown below:
Field Name Data type Description Field Primary key
Size
PetID text This is the unique Idnumber 3 yes
for each pet
Petname text Name given to pet by 11
owner
PetType text Type of animal 10
PetWeight number Weight of the animal byte
OwnerID text Owner Id for each pet 4

Records for PETINFO.


PetID Petname PetType Petweight OwnerID
Zpp Zipper Dog 80 OWCL
Hmm Hommer Horse 250 NMJM
Gri Grizzly Amarillo 10 CLSB
Zuc Zucchini Hamster 1 KRSO
Pic Pickles Cat 12 NMJM
Nim Nimrod Hamster 3 OWCL
Mee Meep-Meep Cat 20 NMJM
Mon Montana Snake 8 CLSB
Ski Skipper Dog 50 KRSO
Eag Eagle Horse 180 OWCL
Des Destiny Cat 8 KRSO
Sno Snowball Hamster 2 OWCL

Create another table called OWNERS. The design view for OWNERS table is shown
below:
Field name Data type desrciption Field size Primary key
OwnerID Text Owner number 4 yes
Ownername Text Owner name 35
Ownernumber Text Telephone number 8
Address Text Owner’s address 18
Parish Text Owner Parish 15

Records for the OWNER table:


OwnerID Ownername Ownernumber Address Parish
OWCL Orville Clarke 564-9078 4 Hope Road Kingston
NMJM Nadine Moore 890-6745 15 Bay View St. Mary
CLSB Carol Brown 234-6579 56 Luke Lane St. Andrew
KRSO Kingsley Robertson 909-4531 97 Mark Street Kingston

Please add five records of your own to both the OWNER and PETINFO tables.
Database Management Practical Worksheet#1

Creating Queries
1. Display PetID, Petname, Petweight of all pets with a weight greater than 10
pounds. Name the query Pet_weight.
2. List the names of all the pets owned by Carol Brown, the query should display the
Petname, Petype and owners’ name. Name the query as C_Brown .
3. Find the average weight of all the pets. Name the query Averageweight.
4. List all the name of the pets whose pet names begin with the letter Z. Name the
query Petname_Z.
5. List the names of all the Cats .Name the query Cats.
6. List the names of all the dogs .Name the query Dogs.
7. List the names of all the horses .Name the query Horses.
8. List the names of all the Hamsters .Name the query Hamsters.
9. List all the name of the pets whose pet names end with the letter R. Name the
query Petname_R.
10. What is the name of the owner of the Amarillo, display the PETID, Pet name,
owner’s name and owner telephone number? Name the query as Amarillo.
11. List the names of all Cats who weigh 10 pounds or less. Name the query
Catweight.
12. Count how many animals are in the PETINFO table. Name the query
Animal_count.
13. Name the pet with the highest weight. Name the query Heavy_weight.
14. Create a form using the PETinfo table. Save the form as PET_DATA.
15. Create a report using the PETINFO table that lists the PetID, Pettype, petname,
petweight. The report should group according to Pettype and sort according to
petname. Title the report Pet Data Summary Report. Place the footer on the report
“Pet haven a place for all pets”. Calculate the average weight of all the pets.

You might also like