They are a collection of organised information so the information can be easily accessed, processes and managed.
2
New cards
Database Management System (DBMS)
It is a software package designed to define, manipulate, retrieve and manage data in a database
3
New cards
Entity
It is one type of object.
4
New cards
Attribute
They describe the entity
5
New cards
They are also called fields or columns.
6
New cards
How is a database table organised?
In records, they can also be called rows.
7
New cards
Data Models
They define how data is connected to each other and how they are processed and stored inside the system.
8
New cards
Designed to allow easy data input.
9
New cards
Relational Database
It is a database that has been designed and structured so that the relationships among different entities are identified by shared attributes among different entities.
10
New cards
Primary Key
It is a unique identifier for a record
11
New cards
Foreign Key
It is a primary key from a different table used to define the relationship.
12
New cards
Composite Key
It is a combination of two or more attributes in a table that can be used uniquely to identify each record in the table.
13
New cards
Relationship
14
New cards
One-to-One
One entity can relate to the other entity exactly once.
15
New cards
Relationship
16
New cards
One-to-Many
One entity can relate to the other entity more than once.
17
New cards
Relationship
18
New cards
Many-to-Many
One entity can appeal multiple times in the other entity and vice versa.
19
New cards
First Normal Form (1NF)
It has no repeating attribute/field or groups of attributes.
20
New cards
It contains only atomic values.
21
New cards
Second Normal Form (2NF)
It is in the first normal form and all the *non-key attributes* are fully functional dependant on the primary key.
22
New cards
This is partially dependant on the primary key only occurs if there is a composite key.
23
New cards
Third Normal Form (3NF)
It is in second normal form and there is no non-key dependancies or no attributes depending on other attributes.
24
New cards
Database Normalisation
To reduce data redundancy.
25
New cards
To maintain data integrity.
26
New cards
Smaller tables, faster indexing, fast sorting, searching, updating.
27
New cards
No accidental deleting a record.
28
New cards
DDL (Data Definition Language)
It is a standard for commands that define the different structures in a database.
29
New cards
Statements create, modify and remove database objects like tables.
30
New cards
Inner join
31
New cards
Client-Server Database Model
It is a centralised database server dealing with many requests from different clients on different PCs
32
New cards
Advantages of using a Client-Server Database Model
Avoids data inconsistency since only one copy of the database is accessed.
33
New cards
All updates will be immediately available to all clients.
34
New cards
Avoid expensive cost of resources required to have multiple copies of a database.
35
New cards
Access rights and security can be centrally managed.
36
New cards
Disadvantages of using a Client-Server Database Model
When clients update the same record at the same time, some updates will be lost.
37
New cards
To prevent data inconsistency, a DBMS uses *record locking* mechanism - whenever a record is being updated, it is being locked until the transaction is completed or cancelled.
38
New cards
Serialisation
It is a mechanism to ensure there is not transactions overlap in time. A transaction cannot start until the previous one has finished.
39
New cards
Serialisation Techniques
40
New cards
Timestamp Ordering
A timestamp is given at the start of each transaction. For two transactions updating the same record, the transaction with the earlier timestamp will be applied first.
41
New cards
Serialisation Techniques
42
New cards
Commitment Ordering
Transactions are ordered by their dependencies on each other as well as the time they started.
43
New cards
If the transaction has dependencies on another, it it blocked until the dependent-upon transactions have finished/committed.