You are on page 1of 13

DATABASES

What is a database

one organised by author and another set organised by book title. There were often two sets of cards. . Card file systems were used in libraries so people could find books easily.PAPER BASED DATA STORAGE Data is often stored in an organised way so that things can be found easily.

Offices were filled with filing cabinets containing files organised in one way or another.PAPER BASED DATA STORAGE Address books and recipe files are other examples of commonly used filing systems. .

Searching for a phone number when you know someone's name is easy. searching through an address book is difficult. Sorting a phone book by phone number would mean writing it out again in order. . However if you know the number and want to know who it belongs to.PROBLEMS WITH PAPER BASED STORAGE They are useful when searching for data in the way in which the data was sorted. Reorganising by a different field is time consuming and difficult.

May enter under the correct letter but then all those entries are entered chronologically as they were received. Adding entries in an address book can be a problem.PROBLEMS WITH PAPER BASED STORAGE Inserting a new record can be a problem especially when dealing with the storage. . Adding a new file in an already packed filing cabinet may mean shuffling and re organising draws.

The layout is fixed. . It often means the record has to be recreated with new data. The storage can be difficult for multiple users to access.PROBLEMS WITH PAPER BASED STORAGE Updating a record can be difficult. Only one person can access a record at a time.

For example search for phone = "0121"* will find all phone numbers that start with 0121 . However they are more flexible that the static records found in a paper based database.COMPUTER DATABASES Computer databases store related data in an organised way. Records can be sorted on any field Records can be search on any field and even use wildcards.

The table columns are fields. 0 Large A record Simpson Homer 768 Evergreen Springfield SP12 01471 555 W4 CA1 Crutch .THE STRUCTURE OF A DATABASE A database stores data in a table. Surnam Forenam Address1 Town/City Post Phone Ward Item Description pric Date Date e e Code Code e Loaned Returned Simpson Homer 768 Evergreen Springfield SP12 01471 555 W4 CA1 Crutch . £25 02/05/13 05/05/13 Terrace 3WE 897 Adult Gumble Barney 7 Beer Gardens Springfield SP24 01471 555 W6 CA2 Crutch .Junior Simpson Homer 768 Evergreen Springfield SP12 01471 555 W3 WCL1 Wheel £30 07/05/13 16/05/13 Terrace 3WE 897 Chair . £25 03/05/13 14/05/13 6AW 421 Adult Cartman Eric 1245 Snowy South Park SP 12 01247 555 W6 NCJ1 Neck Collar £6 03/05/13 10/05/13 Cresent 7UY 874 . £25 07/05/13 09/05/13 Terrace 3WE 897 Adult A field . A completed row is a record.

A DBMS provides a standard way to create a database.DATABASE MANAGEMENT SYSTEMS A database is the store of data. edit and search through a database. It provides a standard way to search through the data. Most DBMS's use a programming language called SQL to access. A Database Management System (DBMS) is the software used to create. It makes sure that the data is stored efficiently and makes sure that the data integrity is kept. . It provides a level of security so only authorised users can access the database. and search through a database.

Adult £25 02/05/13 05/05/13 Evergreen 3WE 555 897 Terrace Gumble Barney 7 Beer Springfield SP24 01471 W6 CA2 Crutch .FLAT FILE DATABASES A flat file database is one where all the data is stored in one table.Adult £25 03/05/13 14/05/13 Gardens 6AW 555 421 Cartman Eric 1245 Snowy South Park SP 12 01247 W6 NCJ1 Neck Collar .Adult £25 21/05/13 28/05/13 Gardens 6AW 555 421 Cartman Eric 1245 Snowy South Park SP 12 01247 W6 WCJ1 Wheel Chair .Adult £25 07/05/13 09/05/13 Evergreen 3WE 555 897 Terrace Gumble Barney 7 Beer Springfield SP24 01471 W6 CA2 Crutch .Large Terrace Simpson Homer 768 Springfield SP12 01471 W4 CA1 Crutch . £250 03/06/13 09/06/13 Cresent 7UY 555 874 Junior Simpson Homer 768 Springfield SP12 01471 W4 CA2 Crutch . Surname Forename Address1 Town/City Post Phone Ward Item Description price Date Date Code Code Loaned Returned Simpson Homer 768 Springfield SP12 01471 W4 CA1 Crutch . £6 03/05/13 10/05/13 Cresent 7UY 555 874 Junior Simpson Homer 768 Springfield SP12 01471 W3 WCL1 Wheel £300 07/05/13 16/05/13 Evergreen 3WE 555 897 Chair . Look at the example of the hospital loans.Adult £25 06/06/13 19/06/13 Evergreen 3WE 555 897 Terrace .

£25 02/05/13 05/05/13 Evergreen 3WE 555 897 Adult Terrace Gumble Barney 7 Beer Springfield SP24 01471 W6 CA2 Crutch . £25 21/05/13 28/05/13 Gardens 6AW 555 421 Adult Cartman Eric 1245 South Park SP 12 01247 W6 WCJ1 Wheel Chair £250 03/06/13 09/06/13 Snowy 7UY 555 874 .Junior Cresent Simpson Homer 768 Springfield SP12 01471 W4 CA2 Crutch .Large Terrace Simpson Homer 768 Springfield SP12 01471 W4 CA1 Crutch . £25 07/05/13 09/05/13 Evergreen 3WE 555 897 Adult Terrace Gumble Barney 7 Beer Springfield SP24 01471 W6 CA2 Crutch .FLAT FILE DATABASES Surname Forename Address1 Town/City Post Phone Ward Item Description price Date Date Code Code Loaned Returned Simpson Homer 768 Springfield SP12 01471 W4 CA1 Crutch . £25 03/05/13 14/05/13 Gardens 6AW 555 421 Adult Cartman Eric 1245 South Park SP 12 01247 W6 NCJ1 Neck Collar . £25 06/06/13 19/06/13 Evergreen 3WE 555 897 Adult Terrace . £6 03/05/13 10/05/13 Snowy 7UY 555 874 Junior Cresent Simpson Homer 768 Springfield SP12 01471 W3 WCL1 Wheel £300 07/05/13 16/05/13 Evergreen 3WE 555 897 Chair .

If someone moves or changes their name or phone number. Takes time to enter all the data again. This duplication is known as data redundancy and leads to a number of problems. do you update all their previous records? How would you know to do so if there were thousands of records? . If they loan two things in one transaction then all the data has to be entered twice. Then when searching the results may look like two different people. What if one record is entered slightly differently. It takes up space.PROBLEMS WITH FLAT FILE DATABASES Every time a patient loans some equipment all their details need to be entered again. one for each loan.

These issue can cause problems and they get worse the large and more complex the data that needs to be stored.PROBLEMS WITH FLAT FILE DATABASES Data can only be entered if it is part of a loan. If a new item of kit was purchased then there would be no record until it was loaned. .