Unit 10 Flashcards
(14 cards)
Entity
An object, person, event or thing of interest to an organisation and about which data are recorded.
Attribute
A property or characteristic of an entity; Attributes are the columns or fields in a table
entity relation
one to one, one to many, many to many
1st Normal Form
There are no repeating groups
All the key attributes are defined
All attributes are dependent on the primary key
2nd Normal Form
It’s already in first normal form
It includes no partial dependencies (where an attribute is dependent on only part of the key)
3rd Normal Form
It’s already in second normal form
It includes no transitive dependencies (where a non-key attribute is dependent on another non-key attribute)
Internal Level
The view of the entire database as it is stored
This is the level where the data is organised and indexed
It is normally hidden from the users by the DBMS
Conceptual level
Gives a single, usable view of all the data on the database
Used mainly by the database managers and administrators
External view
Data is arranged into different views to suit different users requirements and access rights
SQL queries
SELECT
INSERT (same as INSERT INTO)
UPDATE
DELETE
FROM
WHERE
ORDER BY
CREATE TABLE
Record Locks
Prevent simultaneous access to objects in database by locking a record while it is in use so other users are denied access to that record. Can result in deadlock if access is requested simultaneously. Can be implemented by storing a flag with each record to indicate if it is currently being accessed
Serialisation
Ensures that transactions do not overlap in time and therefore cannot interfere with each other or lead to updates being lost. Implemented using Timestamp ordering
Timestamp ordering
A timestamp is given to each transaction so that if 2 transactions affect the same object (record) the transaction with the earlier timestamp would be applied first and to ensure the updates are not lost. Every object in the database has a read and write timestamp which are updated whenever an object in the database is read or written
Commitment Ordering
Serialisation technique so when users are simultaneously accessing the same object in database transactions are ordered in terms of their dependencies on each other and the time they were initiated