Anda di halaman 1dari 3

Edwin Efemini Mizon

Unit 20

Brian

Relational Databases Report

P1)
Relational databases are the most common choice in storing certain types of data, these include; financial records, personal data as well as medical records. The reason for this is because they are so easy to use, the data on them is easy to find and there is literally no reason to use a spreadsheet over a relational database. A relational database is a database that matches the data by using common characteristics/ features from the data set. By doing this it helps you keep track of similar data and helps you find the data when you need to. A relational database consists of relations that are usually known as tables. These tables contain different data on them that relate to each table. This makes it easy to find data, as each table has certain sets of data on them, this means you dont need to scroll through pages to find the data, and you just click on the right table. Data redundancy is something that occurs in a database when data is repeated in the same data base. The data only needs to be stored once, so the second time it is entered becomes redundant as it is not needed. Data extraction is taking data out of the database. It refers to how long it takes to get the data from the database, this all relies on how organised it is and how well labelled each table is. Using a relational database removes the problem that is data redundancy; it makes it so that the same information is never repeated. It does this by having their name etc in the primary table; this then leads onto another table specific to this person. This eliminates the problem of data being repeated over and over again. The main advantage of it is the fact that it makes the data so much easier to attain and that data does not get cluttered up. In a spreadsheet of just 1 table it would take a long time to find one piece of data in one massive table that has data being repeated over and over. Sure, on a computer you can use the search function, but databases arent only on computers. Databases can be on paper too and having a relational database helps even more in this situation. It means that there is a separate table for each person, meaning you can easily flick between each piece of paper/table. This is so much easier than scrolling through the massive table to try and find one piece of data.

M1)
Referential Integrity is where all the values in all the different tables in the relational database match. There are many ways the data can be checked to see if it is correct one way is by just validating the data. This is done by using a validation mask; this allows you to make all the names in the table you choose have the correct capital letters on them and remove capital letters that may be

Edwin Efemini Mizon

Unit 20

Brian

in the wrong place. This is just a quick way of fixing human errors. Another example of this is with the date. You can enter in the validation mask <Date(2011) this will make it so all the dates in the table have to be before 2011. You can also do something like <Date(1993) To make sure everyone is older than that year.

Another way is to use primary/ foreign keys. The best way to explain what these are is to show an example. ID 1 Initial A Surname Smith Title Mrs Address 4 High St, Hereford 72 Castle Road, Ledbury Postcode HR1 1ZX

Miles

Mr

HR7 AA

DogI D 1 2 3 4 5

Dog Name Ant Dec Jordan Rooney Fang

Gender DOB

Breed

ID

M M F M M

21/08/02 21/08/02 08/08/04 23/10/05 14/03/07

Alsatian Alsatian Terrier Poodle

1 1 1 1

Chihuahua 2

On the top table the keys on the left are the primary keys. I will call this table 1. On table 1 all there is, are the clients names, address etc. The table below, table 2, shows the clients order the keys on the right which were previously the primary keys are now foreign keys on the right of table 2. These represent the owners of the dogs, whereas the new primary keys on the left represent each individual dog. This separates it much better while at the same time keeping it organised and correct.

Edwin Efemini Mizon

Unit 20

Brian

This helps the tables keep their referential Integrity as it is easy to follow and correct if there is a mistake.

D1) However there are some problems that can occur when making a relational database, a lot of these simply come down to the planning. Because of the way relational databases are made with all the tables intersecting they take a lot of planning, you dont want to get far down the road of making it and realise you should of done something else. An example of this is how you decided to arrange the tables, if you decide you want to change this up completely half way through because the tables dont fit as you thought they would because you didnt plan correctly, it will cost you a lot of time to have to redo a large part of the database since a lot of the tables connect to each other. The problem with this is, if there is an error in one table, it may lead to you having to correct more than one table if you have to only correct something from one. Without proper planning it could even lead to the integrity of the data being compromised, if it is planned and set up poorly it may be hard to see exactly what the database is trying to tell you and the incorrect information could be taken from it. Without proper planning it will also make the database a lot harder for the user to use. A well planned database will be easy to navigate through, with each table leading to the next in a way that it keeps data separate and easy to read. Without proper planning this will not be the case. If the data is hard to get from the database and it is hard to navigate then it will cost the user a lot of time and frustration as well as the fact that they may not get the right data because of it. The thing is, this problem can be solved very easily, time just needs to be put in. If time is put in the planning then there will be no problems with it, they need to look into what they plan to do and what they know they will do. It is better to put in a lot of time at the start to make sure everything is correct than to have to go back and change half the database just because you didnt plan properly.

Anda mungkin juga menyukai