Please enable JavaScript.
Coggle requires JavaScript to display documents.
Topic 7: relational databases - Coggle Diagram
Topic 7: relational databases
Concepts
Database
A database is a computerised system that makes it easy to search, select and store information.
Table
The table contains all of the fields and the records for one type of entity. A database may contain more than one table
Relational database
Relational databases allow data to be separated and connected across several tables. Tables are connected through primary and foreign keys to increase efficiency
Record
a collection of fields about the same person/item/object
Primary key
unique identifier given to every record in the database
Field
The smallest unit of storage in a database. Often thought of as the columns within a database table.
Foreign key
a field in one table that is linked to the primary key in another table.
SQL queries
FROM
Details where the data is to be taken from :
WHERE
Used to detail certain data to be selected if it meets a certain criteria
SELECT
Used to select data from a database
ORDER BY
Tells the program how to order the selected data
Data Inconsistency and data redundancy
Data inconsistency is different and conflicting versions of the same data. Relational databases remove this risk by only storing data once
Data redundancy is where data is repeated multiple times in different tables. The proper use of foreign keys reduce the risk of this happening
SQL to add, edit and delete
INSERT INTO
values
UPDATE SET
DELETE FROM