Introduction to Databases  
line decor
  
line decor
 
 
 
 

 
 
Exercise 13: SUPERMARKET DATABASE
 
 
Practice Working with databases often requires you to SEARCH (using either Simple or Complex search methods) for possible information and SORT the RESULTS (using either Simple or Complex methods) .
   
 
 
TO DO - In the Supermarket database
For final practice, answer the following questions in your progress grids. Remember to use your skills that your practices in Exercises 1 - 4. If you can't remember, look at the movies to remind yourself.
 
1. a. How many records are in this database?.
  b. How many different fields are there in each record?
  c. How many different layouts are in this database?
2. Sort the database in order of the code number.
Write down the code number of the 19th item shown.
3. Sort the database with stock levels arranged in descending order.
Write down the code number of the of the first item shown.
4. Sort the database in order of cost.
Write down the code number of the cheapest.
5. a. Find all the records where the goods type is Dairy.
  b. How many records are shown?
  c. For the records found, sort the stock levels in ascending order.
Write down the stock level of the last item on the list.
6. a. Find all the records where the cost is greater than £1.70
  b. How many records are shown?
  c. For the records found, sort the the cost in ascending order.
Write down the code number of the first item in the list.
7. a. Find all the canned goods where the stock level is less than 100.
  b. How many records are shown?
  c. For the records found, sort the stock level in ascending order.
Write down the code number of the 2nd item on this list.
8. a. Find all the goods costing less than or equal to £1.55 and the stock level is greater than 70.
  b. How many records are shown.
  c. For the records found, sort the cost and then the stock level in ascending order.
Write down the code number of the 20th item in the list.
   
9. Add the following new records to the database (don't worry about including a picture)
 
Code Number
Item Name
Goods Type
Stock Level
Cost
233
Hoover bags
Household
57
£2.60
271
Rich Tea
Biscuits
146
£0.42
     
10. Delete the following records from the database.
 
Code Number
Item Name
Goods Type
Stock Level
Cost
827
Pack of Eggs
Dairy
42
£0.88
285
Lentil Soup
Canned
102
£0.40
     
11. The items with the code numbers 431 and 513 have the wrong details included. Use the information in the table to Amend or Edit these records to include the correct details.
 
Code Number
Item Name
Goods Type
Stock Level
Cost
431
Mars Multipack
Biscuits
244
£1.42
513
Twix Multipack
Biscuits
42
1.12
     
12. a. Find all records where the code number is greater than 600.
  b. Sort the items in the list in ascending order of code number.
  c. Create a list layout with your name and class included in a footer. The list should only contain only the fields code number, item name and cost.
 
Once all questions have been answered, mark off Exercise 13 in your Progress Grids.
 
Congratulations!
You are now an expert in Sorting, Searching and using
Databases.
 
 

 

 

 
 

 

'HOW DO I' MOVIES

Introduction to Databases Introduction to Databases
   
Simple Sorting Movie 1. Simple Sorting
   
Complex Sorting Movie 2. Complex Sorting
   
Simple Searching Movie 3. Simple Searching
   
Complex Searching 4. Complex Searching
   
Adding Records Movie 5. Adding Records
   
Deleting Records Movie 6. Deleting Records
   
Amending Records Movie 7. Amending Records
   
Changing Layouts Movie 8. Changing Layouts
   
New Column Layout Movie 9. New Column Layouts
   
New Form Layout Movie 10. New Form Layout
   
Create Detabase Movie 11. New Database
   
Working with Database Movie 12. Working with New Database.