1.8.1 — Database Management Systems (DBMS)
1.8.2 — Relational database modelling
1.8.3 — Data Definition Language (DDL) and Data Manipulation Language (DML)
A non-redundant method of storing data that are related and in order, allowing the user to easily access.
A database structured to recognise relations between stored items of information.
Also known as Database Management System.
Stores metadata.
Also known as Entity Relationship Diagram.
an object or event that can be distinctly identified
a structure that contains a group of entities in rows and columns called an entity set (fields)
a row (record) in a relation
a column in a relation that contains values (fields contain attributes)
a secondary key making the attribute easier to find; this improves the speed of data retrieval operations
an attribute or combination of attributes where each tuple's attribute value is unique
an attribute that can potentially be a primary key
candidate keys that are not chosen as a primary key
attribute or a combination of them that relates 2 different tables
Describes interrelated things of interest, also called the cardinality of a table with another.
Doctor table and records in the patient table.
The process of restructuring a relational database in accordance to 'normal forms' in order to reduce data redundancy and improve data integrity.
Also known as First Normal Form.
Also known as Second Normal Form.
Also known as Third Normal Form.
Also known as Structured Query Language.
Also known as Data Definition Language.
CREATE DATABASE BandBooking;CREATE TABLE Band ( BandName varchar2(25), NumberOfMembers number(1));ALTER TABLE Band ADD PRIMARY KEY (BandName);ALTER TABLE Band-Booking ADD FOREIGN KEY (BandName) REFERENCES Band(BandName);DATABASE - creates a database
TABLE - creates a table
TABLE
Also known as Data Manipulation Language.
INSERT INTO Band ('ComputerKidz', 5);INSERT INTO Band-Booking (BandName, BookingID) VALUES ('ComputerKidz', '2016/023');UPDATE Band SET NumberOfMembers = 6;DELETE FROM BandName WHERE BandName = 'ITWizz';SELECT BandName FROM Band ORDER BY BandName;SELECT BandName FROM Band-Booking WHERE Headlining = 'Y' GROUP BY BandName;selects an attribute
locates attribute's table: 'Band'
produces an ordered list, sorted by 'BandName'
identifies items in 'BandName' that have the Headlining attribute as 'Y'
groups (puts together) these identified items by 'BandName'
SELECT Orders.OrderID, Customers.CustomerName FROM Orders INNER JOIN Customers ON Orders.CustomerID = Customers.CustomerID;