Download presentation
Presentation is loading. Please wait.
1
Databases
2
What is a Database? Somewhere that stores information and can be searched for using query's. The Key components of a database are tables, records, fields, data types and relationships Tables: where simple information can be stored e.g. name, address, age etc… Or At a school the class list of each community group. Record e.g. an individual persons record such as a students who has a name, address, parental details, behaviour details achievements and medical history all recorded in their own record. Fields is the individual titles where data is categorized or recorded. E.g name field, Address fields, Date of birth are individual fields. Data Types e.g. numerical e.g. age, number of house points or written e.g. name and address. You can even have different documents stored in a database such as word docs, power points etc… Relations: where two separate tables are merged to locate information. E.g students names are merged with another table called house points, this is also merged with a community group name e.g. LJS to form a table that consistent of LJS students, their names, their house point totals.
3
Advantages and disadvantages
Easy to access information worldwide, working from home Secured via an encrypted password – security is better Can be accessed by multiple devices. Better monitoring Better data access – produce queries very quickly Disadvantages Can be hacked Have malicious malware placed on it to deleted items Can lead to fraud and loss of business if the database is hacked. Cost is expensive Maintenance costs can be high
4
Database Validation Validation and verification are useful to provide confidence in the data. It aims to make sure that the data is sensible, reasonable, complete and within acceptable limits. Check digit (number check, barcodes, ISBN numbers) Picture format check (Postcodes) Lookup (creating lists, dress sizes limited) Presence check (ensuring fields are not left blank) Length check (telephone numbers etc.) Range check (numbers upper limit <=100 or lower limit >=0, a range >=75 AND <=84 ) Type check (entering the correct type of data e.g. numbers)
5
SIMS
6
DBMS – Database Management System
A computer software application that interacts with the user, other applications, and the database itself to capture and analyse data. My SQL is an example of DBMS
7
DBMS – Database Management System
8
DBMS – Database Management System
9
DBMS – Views
10
Exam Questions Describe how a DBMS allows the separation of data from applications and why this is desirable. Describe the principal features of a DBMS and how they can be used to create customised data handling applications.
11
Exam Questions Describe how a DBMS allows the separation of data from applications and why this is desirable. Describe the principal features of a DBMS and how they can be used to create customised data handling applications.
12
Relational Databases A database structured to recognise relations between stored items of information. More than one table of information which links fields using a primary key amongst the tables.
13
E.G Online shopping Amazon for example would have a table of all of the customers numbers, names and addresses. They would also have a table of all products bought by customers. With a relational database a sales manger can easily make a query about all customers that bought an iPad in March for example. A sales manager may like to do this to then offer those customers offers iPad cases. The query essentially links information between two different tables using the Primary Key.
14
Components Tables – tables of information stored
Forms – Form capturing information from the user Queries – searching the relational database using key criteria's Reports – displaying the query results Modules – pre-written programs. Software and languages.
15
Logical operators When searching within a relational database criteria's are used from the fields of the tables. > greater than < less than >= greater than or equal too <= less than or equal too “” exact search AND OR NOT refining and extending searches
16
Primary key This is the most important function of a relational database. It has to be something unique on each table for example a customer number as this cannot occur more than once. This allows for accurate searches that does not allow data to be repeated on a query.
17
Relationships: One to one
E.g. one customer has one address this is a one to one relationship in a database. E.g. John Doe has one address. It has to be something unique to that customer (Not a common relationship)
18
Relationships One to Many
This could be where one customer makes many orders e.g. John Doe makes two orders. This relationship is one to many
19
Many to Many This is where many customers order the same item in different orders and is called many to many. A new table will be created to deal with this type of order.
20
A Foreign Key This is the key that points at the primary key in other tables to link them together.
21
Data redundancy Data redundancy – where data is partially duplicated across records
22
Task What is the function of a Primary Key ?
What is an example of a one to one relationship? What is an example of a one to many relationship? What is an example of a many to many relationship? What is a relational Database?
23
The benefits of a relational database
It means that new customer for example doesn't have to be entered ever time they buy a product. When searches/ queries are carried out the database won duplicate data that a single table would carryout.
24
Databases Exam (A) This is an example of a one to many relationship. Where one primary key in the hire table is linked to the two other primary keys in the table by a foreign key to provide the relevant data in a query.
25
Database exam (B) What is a relational database? The advantage of using relational databases that contains several tables rather then one table is that in a relational database the data is not duplicated (repeated). For example you wont have to keep writing in the customer ID each time the customer hires a car. This also means the less errors occur as the data is only entered once and accurately.
26
Exam Question What type of relational database is this?
Where are the Primary keys and what is the role of the Foreign key
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.