4.10 Fundamentals of databases Flashcards
`What are the characteristics of serial files? (3)
- data is stored in the order in which it is entered
- No order to the data is maintained
- useful for storing transactional and initialisation files
What are characteristics of a sequential file (3)
- stores data in the order of a key field
- order is maintained when new records are added.
- useful for storing master files
What is a database? (1-2)
A structured persistent collection of data.
What components must a database have (2)
- tables that store data in rows and columns
- queries with which to manipulate data
Advantages of using a database when handling large datasets ( 4)
- Makes processing more efficient
- Reduces storage requirements
- Avoids redundancy
- Allows different users to only see relevant data.
Which additional layer of software manages the database (1)
The DBMS - database management system
What services does the DBMS provide
(5)
- A language with which to manipulate data.
- Additional security
- Structural integrity
- Program/data independence.
- An interface for other programs to use data.
What is a flat file database? (3)
Allows the user to specify data attributes for only one table at a time
storing those attributes independently.
There is no link between the different tables.
What is a relational database(2)
Similar to flatfile, but allows user to specify information about the tables and the relationships between them.
What is normalisation (1)
concept of splitting up tables in a database and arranging the data to move it from 1NF, 2NF and 3NF
When is table in 1st normal form (2)
- if it contains no repeating attributes or groups of attributes
- All attributes must be atomic
what does atomic mean in the concept of normalisation (1)
A single attribute cannot consist of two data items such as first-name and surname.
What is a composite key (1)
A combination of two or more columns in a table that can be used to uniquely identify each row in the table.
When is 2NF achieved (2)
- Must be in 1NF
- No partial dependencies
In the context of normalisation what are partial dependencies ? (1)
One or more attributes depends on one part of the primary key ( only in cases of composite keys0
What are the three keywords used in deleting from a data table using SQL
DELETE FROM(table) WHERE(condition)
Keywords used when inserting a new row into a table
INSERT INTO(table) VALUES(values)
Selecting data from a table using SQL
SELECT (fields) FROM (table) WHERE condition
Inserting specific data into a table
INSERT INTO (table) ((fields)) VALUES(values)
Keywords for updating values in a datatable
UPDATE
SET
WHERE
What is transaction processing
Any information processing which is divided into individual, invisible operations
What base functionalities do all relational database systems (4)
CREATE
READ
UPDATE
DELETE
What does a client - server database provide
Provides simultaneous access to the database for multiple clients, known as concurrent access
How can the problem of updates be lost if two clients edit a record at the same time fixed
Record locks, a record is locked when a user retrieves it for editing or updating
What is serialisation / timestamp ordering
every record has a read and a write timestamp.
When trying to write to a record, if the read timestamp is not the same as when it was originally accessed
the Database Management System knows that another user has accessed the record.
What is commitment ordering
In commitment ordering, no transactions are lost if two users try to access the same record at the same time. Transactions are ordered by their dependencies.