Database Storage Requirements

advertisement
Database Storage Requirements
Lesson Outcomes
• Calculate the storage requirements for 1 record
• Calculate the storage requirements for multiple records
• Calculate how many records can be stored on various
storage devices
Example 1
A Garage has 10,000 cars for sale. Calculate the storage
requirements of their database given the following record
structure.
Size in bytes
Make
Model
Triumph
Acclaim Silver
1985
Ford
Escort
Blue
1992
Audi
A3
Black
1998
14500 very smart
Vauxhall Nova
White
1995
5000 very nippy
Vauxhall Tigress
Silver
1997
Ford
Green
1996
4500 cassette
4
5
15
Fiesta
10
Colour Year
8
Cost (£) Comments
500 old and rusty
1000
12500 one lady owner
20
Storage for 1 record = 15 + 10 + 8 + 4 + 5 + 20 = 62 bytes
Storage for 10,000 records = 10000 * 62 = 620000 bytes = 620000/1024 Kilobytes
= 605.46875 KB = 605.5 Kb
Example 2
A School has 800 pupils. Calculate the storage requirements
of their database given the following record structure.
Forename Surname Age Class Guidance
Size in bytes
Martin
Andrews
12 1C
Mrs Allan
Jamie
Fullerton
14 3A
Mr White
Andrew
Smith
13 2B
Mrs Keating
John
Jones
12 1D
Mr Jackson
David
Thomson
14 3C
Mrs Allan
Peter
Grant
13 2A
Mr White
10
15
2
2
15
Storage for 1 record = 10 + 15 + 2 + 2 + 15 = 44 bytes
Storage for 800 records = 800 * 44 = 35200 bytes = 35200/1024 Kilobytes
= 34.375 KB = 34.4 Kb
Example 3
A Bank has 80,000 employees. Calculate the storage
requirements of their database given the following record
structure.
Size in bytes
Surname
First Name
Address
Town
Post Code
Salary
Pitt
Brad
22 Hattonrigg
Bellshill
BF5 4RH
£12,250.00
25/07/1992
Merton
Mabel
99 Castle Hall
Edinburgh
EH3 6TH
£30,000.00
21/01/1972
Carson
William
1 The Shire
Falkirk
FK4 5GR
£23,350.00
28/03/1994
Sinatra
Frank
2467 Pear Road
Larbet
LY6 5HY
£18,500.00
11/08/1994
Presley
Elvis
5 Ring Road
Coatbridge
ML2 6HY
£20,250.00
18/04/1990
10
10
20
15
7
7
Storage for 1 record = 10 + 10 + 20 + 15 + 7 + 7 + 8 = 77 bytes
Storage for 80000 records = 80000 * 77 = 6160000 bytes = 6160000/1024 Kilobytes
= 6015.625 KB
= 6015.625/1024 Mb
= 5.8746 Mb
= 5.9 Mb
Date Started
8
Task 1
A Company has 20,000 customers. Calculate the storage
requirements of their database given the following record
structure.
Forename Surname
Address
Phone Number
Martin
Taylor
12 Walker Road
876654
Mary
Armstrong 12 Victoria Road
877564
Sammy
Smith
11 Abbey Road
876582
Mark
Thomson
8 Walker Road
877623
Task 2
A music fan has created a database that has 10,000 records.
Calculate the storage requirements of their database given
the following record structure.
Bands
Hit Single
Album
Lead Singer
Oasis
Wonderwall
What's the Story
Liam Gallagher
Blur
Country House
The Great Escape Damon Albarn
1
Pulp
Common People
Different Class
Jarvis Cocker
4
Richard Ashcroft
1
The Verve Drugs Don't Work Urban Hymns
Chart Position
1
Task 3
A football supporter has created a database that has 30,000
records. Calculate the storage requirements of their database
given the following record structure.
Team Names Stadium
Capacity Colours
Barcelona
Nou Camp
120000 Blue
Celtic
Parkhead
60500 Green
Rangers
Ibrox
47000 Blue
Liverpool
Anfield
45400 Red
Task 4
1
Taking your answer to Task 1 how many of these files
could be stored on a:
a) 1.44Mb floppy disc
b) 100Gb hard disc
c) 750 Mb CD
Task 5
1
Taking your answer to Task 2 how many of these files
could be stored on a:
a) 1.44Mb floppy disc
b) 100Gb hard disc
c) 750 MB CD
Task 6
1
Taking your answer to Task 2 how many of these files
could be stored on a:
a) 1.44Mb floppy disc
b) 100Gb hard disc
c) 750 MB CD
Download