Databases Flashcards

1
Q

What are serial files

A
  • Data stored in the order in which it was entered
  • No order to the data is maintained
  • Useful for storing transactional data and initialisaion files
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are sequential files?

A
  • Store data in order of a ket field
  • Order is maintained when new records are added
  • Useful for storing master files
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are sequential files?

A
  • Store data in order of a ket field
  • Order is maintained when new records are added
  • Useful for storing master files
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are databases used for?

A
  • Handles large data sets
  • Efficient processing of data
  • Reducing storage requirements
  • Avoiding redundancy
  • Allowing different users to see relevant data
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the Database Management System (DBMS)

A
  • A manipulation langague to access anmd change the data
  • Integraty to ensure efficiency and structure is not compromised
  • Additional security
  • INterface for other programs to access and use the data
  • Progrma data inderpendence
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are databases made up of?

A
  • Tables that store data in rows and colums
  • Queries to manipulate data: search, sort, add, amend and delete
  • Can create UI and forms
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Why is a flat file database bad?

A
  • Only one table
  • Not easy to query
  • Duplicated data + inefficient
  • More errors between datasets = loss of integrety
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What do entity relationship models show

A
  • They can show the relationships between databases
  • Can be one to one or one to many
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What are primary Keys

A
  • Unique identifier for one record from any other
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is seconday keys?

A
  • Allows for quick ordering of data accoring to a column
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is normalisation?

A
  • Splitting up tables in a database
  • Arranging the data to move it from 1NF to 2NF to 3NF
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How do you go from 0NF to 1NF

A
  • Eleminate uplicate columns
  • Get rid of any groups repeating data
  • Identify Primary key
  • Seperate out any attributes which are not atomic into sepearate attributes (One peice of data per field)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

How to get from 1NF to 2NF

A
  • Check data is already in 1NF
  • Remove any partial dependencies which is one or more of the attributes depend on only part of the primary key (like course number and student name)
  • Seperate the partial dependencies into different tables
  • Fix any many-to-many relationships found
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

How do you convert from 2NF to 3NF

A
  • Check data in 2NF
  • Make sure there is no-key dependencies
  • Meaning every field must depend on the primary key
  • If not its seperated again to remove repeating data
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is SQL?

A
  • Allows fast efficient querying
  • Retrieving information from databases
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is the command for deleting data?

A

DELETE from FORM WHERE Forename = ‘9C’

17
Q

What is the command for inserting a new row into the table

A

INSERT INTO Form VALUES (‘10C’, ‘Miss. Badman’, ‘B12’)

18
Q

What is the command for querying a database?

A

SELECT Forename FROM Form WHERE FORM = ‘7R’

19
Q

What is the command for updating an existing command

A

UPDATE Form SET Formteacher = ‘Joey’ WHERE Forename = ‘7R’

20
Q

What is the command for creating a new table?

A

CREATE TABLE Staff(
StaffID INT PRIMARY KEY;
Name VARCHAR(20);
JoinDate date-time;
Age int;
Gender boolean;
)

21
Q

What is transaction processing?

A
  • Any information processing which is divided into individual, indivisible operations
  • Each operation must succeed or fail as a complete unit
22
Q

What transactional statments do all databses have?

A

CRUD
- Create
- Read
- Update
- Delete

23
Q

What does the A.C.I.D rules do?

A

They are a set of rules that ensure data integraty

24
Q

What is atomicity?

A
  • A change to a database must be performed or not performed
  • Any half completed change must not be saved to the datasbe
25
What is consistency?
Any change in the databse must retain the overall state of the database
26
What is isolation?
- A transaction must not be able to be interruped by another transaction - The transaction must occur in isolation so that other users or processes cannot have access to the data concerned - Carried out through record locking where any data used is temporarily put in a read only mode
27
What is durability?
- Once a change has been made to the databse it must not be lost due to a system failure - Achived through transactions being stored in secondary storage as soon as possible (as secondary is non volitile)