LECTURE_13
E/R modelling helps find the requirements of a database
Normalisation helps to refine a design by removing data redundancy
Physical design Concerned with storing and accessing the data
RAID - redundant array of independent (inexpensive) disks
Storing information across more than one physical disk
Speed - can access more than one disk
Robustness - if one disk fails it is OK
RAID Level 0 : Files are split across several disks
For a system with n disks, each file is split into n parts, one part stored on each disk
Improves speed, but no redundancy
RAID Level 1: As RAID 0 but with redundancy
Files are split over multiple disks
Each disk is mirrored
For n disks, split files into n/2 parts, each stored on 2 disks
Improves speed, has redundancy(in two disks), but needs lots of disks
Parity Checking: for a set of data in binary form we count the number of 1s for each bit across the data. If this is even the parity is 0, if odd then it is 1. We can use parity checking to reduce the number of disks ---------????????how to reduce the number of disk
Recovery With Parity: If one of our pieces of data is lost we can recover it.
RAID Level 3: Data is striped over disks, and a parity disk for redundancy
For n disks, we split the data in n-1 parts
Each part is stored on a disk
The final disk stores parity information for recovery
Indexes:
Types of indexes
Primary or clustered indexes affect the order that the data is stored in a file
Secondary indexes give a look-up table into the file
Only one primary index, but many secondary ones
Choosing Indexes: only have one primary index. The most frequently looked-up value is often the best choice. Some DBMSs assume the primary key is the primary index, as it is usually used to refer to rows
Don’t create too many indexes: They can speed up queries, but they slow down inserts, updates and deletes. Whenever the data is changed, the index may need to change
Creating Indexes:
Query Processing:
Three main stages
Parsing and translation - the query is put into an internal form
relational operators: PRODUCT,SELECTION, PROJECTION,
Optimisation - changes are made for efficiency
Evaluation - the optimised query is applied to the DB
----------P31??????????????????, why 15 operantions
Wednesday, 9 May 2007
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment