Download presentation
Presentation is loading. Please wait.
Published byJacob Burns Modified over 7 years ago
1
Relational Databases This topic forms part of the ISDD unit in Higher Computer Science. An introduction was made to the relational database model at Nat 5. At Higher, our depth of knowledge will be further developed.
2
Content Design notation ER diagrams Data dictionaries
Structures and Links Relational database structures Keys – primary, foreign and compound Relationship cardinality Complex database operations – queries, forms, reports and calculations
3
Learning Intentions By the end of this unit, pupils should be able to:
Describe flat files and relational databases. Design a simple relational database. Draw and interpret entity-relationship (E-R) diagrams. Create data dictionaries. Define and explain the purpose of primary, secondary and foreign keys. Create relational databases in Microsoft Access. Create complex database operations – queries, forms, reports and calculations. Write scripts in SQL.
4
Databases – Change in Focus
At SG and Nat 5 databases were covered at a more basic level, with flat file databases being the main focus. At Nat 5 level, relational databases were touched upon, where the focus was on the idea of linked tables and an introduction to primary and foreign keys was made. This is known as the relational model. The relational model improves data accuracy and has less duplication of data since data is only entered once, therefore fewer errors occur. For Higher, a much closer look is taken at the relational model. In order to begin work on the relational model, it is necessary to firstly understand the problems (or anomalies) that exist in the flat file model.
5
Data Anomalies Anomalies are problems that can occur in poorly planned, un-normalised databases where all the data is stored in one table (a flat-file database). Insertion Anomaly - The nature of a database may be such that it is not possible to add a required piece of data unless another piece of unavailable data is also added. E.g. A library database that cannot store the details of a new member until that member has taken out a book. Deletion Anomaly - A record of data can legitimately be deleted from a database, and the deletion can result in the deletion of the only instance of other, required data, E.g. Deleting a book loan from a library member can remove all details of the particular book from the database such as the author, book title etc. Modification Anomaly - Incorrect data may have to be changed, which could involve many records having to be changed, leading to the possibility of some changes being made incorrectly.
6
Example Let’s look at the Kitten Order Database to illustrate these so called data anomalies. The following assumptions can be made: Customers can buy more than one kitten. Kittens can be resold but not to a previous owner. Kitten Orders Database Cust ID Cust Name Address First Time Owner Kitten ID Kitten Name Sex Kitten Cost Litter ID DOB Father Mother Date Ordered Date Collected 743 Adams 51 Inverdale Drive No 11 Poppy M £225 1 11/10/13 Stan Tilly 12/12/13 25/1/14 9 Fluffy F £300 12 Patch £250 2 17/7/13 Spike Kitty 21/8/13 26/10/13 137 Roy 12 Bright Avenue Yes 10 Sprite 9/11/13 3/1/14 654 Fraser 9 Fair View 3 Coco £350 Sid Betty 19/9/13 12/11/13 6 Gerry £275 18/8/13 18/9/13 23/11/13
7
Insertion Anomaly Kitten Orders Database
Cust ID Cust Name Address First Time Owner Kitten ID Kitten Name Sex Kitten Cost Litter ID DOB Father Mother Date Ordered Date Collected 743 Adams 51 Inverdale Drive No 11 Poppy M £225 1 11/10/13 Stan Tilly 12/12/13 25/1/14 9 Fluffy F £300 12 Patch £250 2 17/7/13 Spike Kitty 21/8/13 26/10/13 137 Roy 12 Bright Avenue Yes 10 Sprite 9/11/13 3/1/14 654 Fraser 9 Fair View 3 Coco £350 Sid Betty 19/9/13 12/11/13 6 Gerry £275 18/8/13 18/9/13 23/11/13 Adding a piece of information to a flat file database may not be possible unless another, unavailable piece of data can also be added. For example, it is not possible to store the details of a customer in this database until they have actually ordered a kitten.
8
Update (or modify) Anomaly
Kitten Orders Database Cust ID Cust Name Address First Time Owner Kitten ID Kitten Name Sex Kitten Cost Litter ID DOB Father Mother Date Ordered Date Collected 743 Adams 51 Inverdale Drive No 11 Poppy M £225 1 11/10/13 Stan Tilly 12/12/13 25/1/14 9 Fluffy F £300 12 Patch £250 2 17/7/13 Spike Kitty 21/8/13 26/10/13 137 Roy 12 Bright Avenue Yes 10 Sprite 9/11/13 3/1/14 654 Fraser 9 Fair View 3 Coco £350 Sid Betty 19/9/13 12/11/13 6 Gerry £275 18/8/13 18/9/13 23/11/13 Data needing to be changed, may require many records to be changed. This can lead to errors or omissions being made. For example, if the customer Adams moves house, the address will have to be changed in 3 separate records which may lead to some being changed correctly and others not. Imagine this in a much larger database where hundreds of records might need to be changed.
9
Deletion Anomaly Kitten Orders Database
Cust ID Cust Name Address First Time Owner Kitten ID Kitten Name Sex Kitten Cost Litter ID DOB Father Mother Date Ordered Date Collected 743 Adams 51 Inverdale Drive No 11 Poppy M £225 1 11/10/13 Stan Tilly 12/12/13 25/1/14 9 Fluffy F £300 12 Patch £250 2 17/7/13 Spike Kitty 21/8/13 26/10/13 137 Roy 12 Bright Avenue Yes 10 Sprite 9/11/13 3/1/14 654 Fraser 9 Fair View 3 Coco £350 Sid Betty 19/9/13 12/11/13 6 Gerry £275 18/8/13 18/9/13 23/11/13 Deleting the record for customer Roy would be perfectly valid if they decided they didn’t want to go ahead with the order.
10
Deletion Anomaly Kitten Orders Database
Cust ID Cust Name Address First Time Owner Kitten ID Kitten Name Sex Kitten Cost Litter ID DOB Father Mother Date Ordered Date Collected 743 Adams 51 Inverdale Drive No 11 Poppy M £225 1 11/10/13 Stan Tilly 12/12/13 25/1/14 9 Fluffy F £300 12 Patch £250 2 17/7/13 Spike Kitty 21/8/13 26/10/13 137 Roy 12 Bright Avenue Yes 10 Sprite 9/11/13 3/1/14 654 Fraser 9 Fair View 3 Coco £350 Sid Betty 19/9/13 12/11/13 6 Gerry £275 18/8/13 18/9/13 23/11/13 Deleting the record for customer Roy would be perfectly valid if they decided they didn’t want to go ahead with the order.
11
Deletion Anomaly Kitten Orders Database
Cust ID Cust Name Address First Time Owner Kitten ID Kitten Name Sex Kitten Cost Litter ID DOB Father Mother Date Ordered Date Collected 743 Adams 51 Inverdale Drive No 11 Poppy M £225 1 11/10/13 Stan Tilly 12/12/13 25/1/14 9 Fluffy F £300 12 Patch £250 2 17/7/13 Spike Kitty 21/8/13 26/10/13 654 Fraser 9 Fair View 3 Coco £350 Sid Betty 19/9/13 12/11/13 6 Gerry £275 18/8/13 18/9/13 23/11/13 Deleting the record for customer Roy would be perfectly valid if they decided they didn’t want to go ahead with the order. This leaves a problem though. What is the address for the customer Roy? It has been deleted along with the order and is no longer stored in the database so we do not know.
12
Keys and Data Dependency
In order to move on it is important to understand the idea of different keys in a relational database and also the idea of data dependency. Primary key (or key field) – this uniquely identifies each row in the database table. Cust ID Forename Surname Address 113 John Smith 10 Bond Street 107 Carrie James 9 The Orchard 114 53 Mayburn Road In the example above, Cust ID uniquely identifies the details for each customer. If we know that the Cust ID is 107, we know we are referring to details for Carrie James, 9 The Orchard. If we didn’t have a primary key, we would have difficulty distinguishing between John Smith of 10 Bond Street and John Smith of 53 Mayburn Road.
13
Keys and Data Dependency
Foreign key – allows tables to be joined together and enables relationships between tables to be created. It is a field in one table that links with the primary key of another table. Customer Cust ID Forename Surname Address 113 John Smith 10 Bond Street 107 Carrie James 9 The Orchard 114 53 Mayburn Road Order Order ID Product Name Quantity Cust ID 001 spanner 3 113 002 tyre 4 paint pot 1 107 spray gun 5 114 Cust ID is the primary key in the Customer table and a foreign key in the Order table. This enables a relationship to be created between the tables.
14
Normalisation A flat file database contains all the data in one file and is said to be un-normalised (UNF). Normalisation is a process that removes many of the anomalies discussed in the previous section. Kitten Orders Database Cust ID Cust Name Address First Time Owner Kitten ID Kitten Name Sex Kitten Cost Litter ID DOB Father Mother Date Ordered Date Collected 743 Adams 51 Inverdale Drive No 11 Poppy M £225 1 11/10/13 Stan Tilly 12/12/13 25/1/14 9 Fluffy F £300 12 Patch £250 2 17/7/13 Spike Kitty 21/8/13 26/10/13 137 Roy 12 Bright Avenue Yes 10 Sprite 9/11/13 3/1/14 654 Fraser 9 Fair View 3 Coco £350 Sid Betty 19/9/13 12/11/13 6 Gerry £275 18/8/13 18/9/13 23/11/13
15
Normalisation The information in the un-normalised table can be written a different way as follows: UNF (un-normalised form) Kitten Orders (Cust ID Cust Name Cust Address First Time Owner Kitten ID Kitten Name Sex Kitten Cost Litter ID DOB Father Mother Date Ordered Date Collected)
16
Normalisation – 1NF Cust ID Cust Name Address First Time Owner Kitten ID Kitten Name Sex Kitten Cost Litter ID DOB Father Mother Date Ordered Date Collected 743 Adams 51 Inverdale Drive No 11 9 12 Poppy Fluffy Patch M F £225 £300 £250 1 2 11/10/13 17/7/13 Stan Spike Tilly Kitty 12/12/13 21/8/13 25/1/14 26/10/13 137 Roy 12 Bright Avenue Yes 10 Sprite 9/11/13 3/1/14 654 Fraser 9 Fair View 3 Coco £350 Sid Betty 19/9/13 12/11/13 6 Gerry £275 18/8/13 18/9/13 23/11/13 For 1NF remove repeating data to a new entity, along with a copy of the key. What is repeating data? Focus on one row and for each of the boxes determine how many items it could hold. Boxes which can hold more than one possible value form part of the repeating group.
17
Normalisation – 1NF Cust ID Cust Name Address First Time Owner Kitten ID Kitten Name Sex Kitten Cost Litter ID DOB Father Mother Date Ordered Date Collected 743 Adams 51 Inverdale Drive No 11 9 12 Poppy Fluffy Patch M F £225 £300 £250 1 2 11/10/13 17/7/13 Stan Spike Tilly Kitty 12/12/13 21/8/13 25/1/14 26/10/13 137 Roy 12 Bright Avenue Yes 10 Sprite 9/11/13 3/1/14 654 Fraser 9 Fair View 3 Coco £350 Sid Betty 19/9/13 12/11/13 6 Gerry £275 18/8/13 18/9/13 23/11/13 For 1NF remove repeating data to a new entity, along with a copy of the key. What is repeating data? Focus on one row and for each of the boxes determine how many items it could hold. Boxes which can hold more than one possible value form part of the repeating group.
18
Normalisation – 1NF Cust ID Cust Name Address First Time Owner Kitten ID Kitten Name Sex Kitten Cost Litter ID DOB Father Mother Date Ordered Date Collected 743 Adams 51 Inverdale Drive No 11 9 12 Poppy Fluffy Patch M F £225 £300 £250 1 2 11/10/13 17/7/13 Stan Spike Tilly Kitty 12/12/13 21/8/13 25/1/14 26/10/13 137 Roy 12 Bright Avenue Yes 10 Sprite 9/11/13 3/1/14 654 Fraser 9 Fair View 3 Coco £350 Sid Betty 19/9/13 12/11/13 6 Gerry £275 18/8/13 18/9/13 23/11/13 For 1NF remove repeating data to a new entity, along with a copy of the key. What is repeating data? Focus on one row and for each of the boxes determine how many items it could hold. Boxes which can hold more than one possible value form part of the repeating group.
19
Normalisation – 1NF The information in the un-normalised table can be written a different way as follows: UNF (un-normalised form) Kitten Orders (Cust ID Cust Name Cust Address First Time Owner Kitten ID Kitten Name Sex Kitten Cost Litter ID DOB Father Mother Date Ordered Date Collected) Repeating data
20
Normalisation – 1NF Kitten Database Customer (Cust ID Cust Name
Cust Address First Time Owner) Order (Kitten ID Kitten Name Sex Kitten Cost Litter ID DOB Father Mother Date Ordered Date Collected Cust ID ) The new entity now requires a primary key and any new foreign keys must now be identified.
21
Normalisation – 1NF Kitten ID Kitten Name Sex Kitten Cost Litter ID DOB Father Mother Date Ordered Date Collected Cust ID 11 Poppy M £225 1 11/10/13 Stan Tilly 12/12/13 25/1/14 743 9 Fluffy F £300 9/3/14 11/4/14 137 3 Coco £350 17/7/13 Sid Betty 19/9/13 12/11/13 654 6 Gerry £275 2 18/8/13 Spike Kitty 18/9/13 23/11/13 Using the sample data above, it is now necessary to determine the primary key and any foreign key.
22
Normalisation – 1NF Kitten ID Kitten Name Sex Kitten Cost Litter ID DOB Father Mother Date Ordered Date Collected Cust ID 11 Poppy M £225 1 11/10/13 Stan Tilly 12/12/13 25/1/14 743 9 Fluffy F £300 9/3/14 11/4/14 137 3 Coco £350 17/7/13 Sid Betty 19/9/13 12/11/13 654 6 Gerry £275 2 18/8/13 Spike Kitty 18/9/13 23/11/13 We could consider something obvious, such as Kitten ID. However, there are two entries for Kitten ID 11. They are attached to different customer orders. Kitten ID alone will not uniquely identify the record. We could also consider the other obvious choice of Litter ID, however it occurs more than once, for different kittens, so this would not work either. The same is the case with Cust ID. In this example, there is nothing on its own that can act as a unique identifier.
23
A kitten can be resold but not to the same owner
Normalisation – 1NF Kitten ID Kitten Name Sex Kitten Cost Litter ID DOB Father Mother Date Ordered Date Collected Cust ID 11 Poppy M £225 1 11/10/13 Stan Tilly 12/12/13 25/1/14 743 9 Fluffy F £300 9/3/14 11/4/14 137 3 Coco £350 17/7/13 Sid Betty 19/9/13 12/11/13 654 6 Gerry £275 2 18/8/13 Spike Kitty 18/9/13 23/11/13 We have to consider a compound key. Think back to the scenario given for this example: A kitten can be resold but not to the same owner Kitten ID 11 can therefore not be resold to Cust ID We could use both fields and make a compound key of Kitten ID and Cust ID. This would provide us with unique rows in the table. For 1NF, the foreign key is always in the new table that was created from the repeating data. It is always the primary key from the original table. In this case Cust ID.
24
Normalisation – 1NF Kitten Database Customer (Cust ID Cust Name
Cust Address First Time Owner) Order (Kitten ID Kitten Name Sex Kitten Cost Litter ID DOB Father Mother Date Ordered Date Collected Cust ID *) Customer Table Primary key – Cust ID Foreign Key - none Order Table Primary key – Kitten ID and Cust ID Foreign Key – Cust ID
25
Relationships Person and Passport (Person 1:1 Passport)
After normalisation, a database is likely to have a series of different tables which have to link together to make the database function efficiently. Relationships are used to map these links from table to table. Person and Passport (Person 1:1 Passport) One person has one passport. One passport belongs to one person. Orders and Items (Order 1:M Item) One order has many items on that order. One item can be part of one order Patients and Doctors (Patient M:N Doctor) One patient in hospital can see many different doctors. One doctor can see many patients .
26
Relationships Patients and Doctors (Patient M:N Doctor)
Many to Many relationships are considered a poor relational database design. For this reason Many to Many relationships are placed with two One to Many relationships by using a join table between the two tables. Patients and Doctors (Patient M:N Doctor) One patient in hospital can see many different doctors. One doctor can see many patients . By using a join table called Appointment we get the following: Patients, Appointments and Doctors (Patient 1:M Appointment and Doctor 1:M Appointment) One patient in hospital can have many appointments but a particular appointment will be for one patient. One doctor can take many appointments but a particular appointment will only be with one doctor .
27
Relationships Relationship Type ? 1 to 1 1 to M M to N
Relationship Type ? 1 to 1 1 to M M to N shop and department person and driving license car and service patient and dental appointment buses and routes car model and car manufacturer books and borrowers dress and designer
28
Relationships Relationship Type ? 1 to 1 1 to M M to N
Relationship Type ? 1 to 1 1 to M M to N shop and department √ person and driving license car and service patient and dental appointment buses and routes car model and car manufacturer books and borrowers dress and designer
29
Relationships Relationship Type ? 1 to 1 1 to M M to N
Relationship Type ? 1 to 1 1 to M M to N shop and department √ person and driving license car and service patient and dental appointment buses and routes car model and car manufacturer books and borrowers dress and designer
30
Relationships Relationship Type ? 1 to 1 1 to M M to N
Relationship Type ? 1 to 1 1 to M M to N shop and department √ person and driving license car and service patient and dental appointment buses and routes car model and car manufacturer books and borrowers dress and designer
31
Relationships Relationship Type ? 1 to 1 1 to M M to N
Relationship Type ? 1 to 1 1 to M M to N shop and department √ person and driving license car and service patient and dental appointment √ buses and routes car model and car manufacturer books and borrowers dress and designer
32
Relationships Relationship Type ? 1 to 1 1 to M M to N
Relationship Type ? 1 to 1 1 to M M to N shop and department √ person and driving license car and service √ patient and dental appointment buses and routes car model and car manufacturer books and borrowers dress and designer
33
Relationships Relationship Type ? 1 to 1 1 to M M to N
Relationship Type ? 1 to 1 1 to M M to N shop and department √ person and driving license car and service patient and dental appointment √ buses and routes car model and car manufacturer books and borrowers dress and designer
34
Relationships Relationship Type ? 1 to 1 1 to M M to N
Relationship Type ? 1 to 1 1 to M M to N shop and department √ person and driving license car and service √ patient and dental appointment buses and routes car model and car manufacturer books and borrowers dress and designer
35
Relationships Relationship Type ? 1 to 1 1 to M M to N
Relationship Type ? 1 to 1 1 to M M to N shop and department √ person and driving license car and service √ patient and dental appointment buses and routes car model and car manufacturer books and borrowers dress and designer
36
Entity Relationship Diagrams
ERDs have many different representations. The following are all valid representations of a one to many relationship between a band and albums. Band Album Band Album makes 1 M Band Album 1 1..*
37
Entity Relationship Diagrams
Manager Band Album Track Manager ID Band Name Album ID Song Title Surname Genre Album Name Album ID* Forename No of members Running Time Duration Manager ID* Released Track Position Band Name* Manager Band Album Track
38
Entity Relationship Diagrams
Kitten Database Customer (Cust ID Cust Name Cust Address First Time Owner) Order (Kitten ID* Date Ordered Date Collected Cust ID ) Kitten (Kitten ID Kitten Name Sex Kitten Cost Litter ID*) Litter (Litter ID DOB Father Mother) An Entity Relationship (E/R) diagram is used to model the relationships between tables. The E/R diagram matches primary keys to foreign keys, and displays the cardinality of the relationships that are displayed as 1:1, 1:M. (In the case of an unnormalised system it could be possible to display a M:N (many to many) relationship).
39
Entity Relationship Diagrams
Kitten Database Customer (Cust ID Cust Name Cust Address First Time Owner) Order (Kitten ID* Date Ordered Date Collected Cust ID ) Kitten (Kitten ID Kitten Name Sex Kitten Cost Litter ID*) Litter (Litter ID DOB Father Mother) An Entity Relationship (E/R) diagram is used to model the relationships between tables. The E/R diagram matches primary keys to foreign keys, and displays the cardinality of the relationships that are displayed as 1:1, 1:M. (In the case of an unnormalised system it could be possible to display a M:N (many to many) relationship).
40
Entity Relationship Diagrams
Kitten Database Customer (Cust ID Cust Name Cust Address First Time Owner) Order (Kitten ID* Date Ordered Date Collected Cust ID ) Kitten (Kitten ID Kitten Name Sex Kitten Cost Litter ID*) Litter (Litter ID DOB Father Mother) An Entity Relationship (E/R) diagram is used to model the relationships between tables. The E/R diagram matches primary keys to foreign keys, and displays the cardinality of the relationships that are displayed as 1:1, 1:M. (In the case of an unnormalised system it could be possible to display a M:N (many to many) relationship).
41
Entity Relationship Diagrams
Customer Order Litter Kitten 1 Customer can make many Orders 1 particular Order can only be for 1 Customer 1 Order will be for 1 particular Kitten. 1 Kitten can be part of many different Orders. 1 Kitten is part of only 1 Litter. 1 Litter can have many Kittens.
42
Data Dictionary A data dictionary holds detailed information about database tables and their attributes including: primary/foreign keys (PK/FK) data type (and size) if the contents should be unique if the contents are required (presence check) formatting eg currency, dd/mm/yy any validation that is required (range, lookup, restricted choice, length check, calculation etc Data dictionaries hold information on the structure of the data in the database but not the actual data itself.
43
Data Dictionary Table Field name Key PK/FK Type(size) Unique Req?
Validation Format Order Order ID PK Number Yes Auto increment from 00000 00000 Order Date Date No dd/mm/yy Payment Type Text(11) Restricted Choice from [Credit Card, Debit Card, Paypal, Gift Card] Customer ID FK Lookup Lookup from Customer 0000
44
Data Dictionary Table Field name Key PK/FK Type(size) Unique Req?
Validation Format Part Order Part ID PK Number Yes Gift Wrap Boolean No checkbox Quantit y In range >=1 and <=9 Subtotal Calculatio n =quantity * product.price currency Order ID FK Lookup Lookup from Order Product ID Lookup from Product
45
Useful Exam Questions H IS 2012 2. Define the terms (a) compound key
(b) foreign key H IS 2010 Golf handicaps are a measure of a golfer’s ability and are constantly adjusted. Kenneth Cruise has a golf handicap of 12. His golf club list him as KC12, his initials followed by his current handicap. State two problems of using this meaningful identifier as a primary key.
46
Useful Exam Questions H IS 2013 Q12 a and b
Carter’s Carriage is a transport company which operates a fleet of vans carrying goods between 25 depots throughout the country. Every trip follows one of a number of set routes between an origin depot and a destination depot. Refuelling, if necessary on longer routes, is only permitted at a particular town on the route. A relational database has been created to help the company. The structure of the data model is as follows: Driver Trip Van Route Driver number Driver number* Reg number Route number Driver name Reg numer* Capacity Origin Mobile number Date Date purchased Destination Route number* Refuel town (a) Draw an entity relationship diagram to represent the data model. (b) The data dictionary below represents the Trip entity. State a suitable entry for each of the missing items A to D. Attribute Data Type Validation Unique Key Driver Number Integer Lookup from Driver N PK/FK Reg Number A Lookup from Van Date C PK Route Number B D
47
Useful Exam Questions H IS 2010 Q14
Teachers at North Craig High School organise several trips throughout the year. Teachers may organise more than one trip in a year and pupils may book more than one trip. A relational database has been set up to record pupil payments. The entities and attributes are as follows: PUPIL (Pupil Id, Name, Form Class*) TRIP (Trip ID, Trip Leader, Destination, Date, Cost) PAYMENT (Pupil ID*, Trip ID*, Payment date, Amount) FORM CLASS (Form class, Form teacher) (a) Draw an entity relationship diagram to represent this data model. (b) The data dictionary below represents the Payment entity. State a suitable entry for each of the missing items A to C. Attribute Data Type Validation Required Key Pupil ID Integer Lookup from Pupil Y PK/FK Trip ID Text B Payment Date A Amount Real C
48
Useful Exam Questions H IS 2011 Q17a and 17c
SUPPLIER (Supplier Name, Address1, Address2) RENTAL (Customer ID*, Tool ID*, Date, Insurance) CUSTOMER (Customer ID, Forename, Surname, Address1, Address2, Tel No) TOOL (Tool ID, Type, price, Supplier Name *) (a) Draw an entity relationship diagram to represent the structure of this database. (b) Part of the data dictionary is shown below. State a suitable entry for each of the items A to D. Entity Attribute PK FK Required Unique Type Validation SUPPLIER Supplier Name Y N Yes Text Address1 No Address2 RENTAL Customer ID A B C D Tool ID Date
49
Database Implementation
You will use MicroSoft Access to implement your database design. At Higher level you are required to undertake complex database operations, all of which are covered in the practical task booklet: Queries – used to interrogate a database in order to find specific pieces of information. For example a query may be used to find all the kittens born on a particular date. Forms – Provides a user interface which makes it easier to enter data for example. Reports – reports present information based on a table or query in a readable attractive way. Records can be sorted in a particular way, show only certain fields and provide summaries based on calculations.
50
SQL – Structured Query language
Information in a relational database can be accessed and modified using a scripting language called SQL. Common SQL commands used are SELECT, WHERE, INSERT, UPDATE and DELETE. SELECT Kitten ID, Kitten Name, Sex FROM Kitten WHERE Kitten Cost < 300 This means find the Kitten ID, Kitten Name and Sex of kittens stored in the Kitten table that cost less than £300. You will work through SQL tutorials at and also at
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.