Databases Flashcards

(23 cards)

1
Q

characteristics of serial files

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

what are files

A

permanent storage of data

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

alternative to a series file

A

sequential file

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

characteristics of a sequential file

A
  • stores data in order of key field
  • this order is maintained when new records are added
  • useful for storing master files
  • index sequential files allow groups of records to be accessed quickly
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

advantages of databases

A
  • makes processing more efficient
  • reduces storage requirements
  • avoids redundancy
  • allows different users to only see relevant dat
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

what is the data management system

A
  • an additional layer of software which provides
    • manipulation language to access and change the data
  • integrity to ensure efficiency and structure is not compromised
  • additional security
  • an interface for other programs to access and use the data
  • program/ data independence
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

examples of DMBs

A

oracle

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

what is a flat file database

A

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 files

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

what are relational databases

A

allows the user to specify information about multiple tables and the relationship between those tables

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

what is a primary key

A
  • a field which identifies the table
  • has to be unique and has to exist
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

what is normalisation

A

the concept of splitting up tables in a database and arranging the data tk move it from first to second to third normal form

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

how to get a database into first normal form

A
  • eliminate duplicate columns
  • get rid of any groups of repeating data
  • identify the primary key
  • separate any attributes which are not atomic into separate attributes
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

what is a composite key

A

a combination of two or more columns in a table that can be used to uniquely identify each row in the table

  • uniqueness is only guaranteed when the columns are combined
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

how to get a database into second normal form

A
  • check that data is already in 1NF
  • remove any partial dependencies
  • fix any many to many rls
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

what is a partial dependency

A

means that one or more of the attributes depends on only part of the primary key
- this can only occur when the primary key is a composite key

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

what should we do if we find a partial dependency

A

split the table on that attribute and move it to a separate table

17
Q

what are the issues with a many to many relationship

A

Without proper normalization, many-to-many relationships can lead to data redundancy and inconsistencies.

18
Q

how to solve the many to many relationship issue

A

create a linking table

19
Q

how to get database into third normal form

A
  • check data is in second normal form
  • check there are no non key dependencies
20
Q

what is a non key dependency

A

where the value of an attribute is determined by an attribute which is not part of the key

21
Q

aim of normalisation

A
  • minimises data duplication
  • improves consistency
  • eliminate insertion anomalies
  • eliminate data redundancy
  • eliminate update/deletion anomalies
22
Q

Problems that can occur with databases that are not fully normalised

A

Redundant/duplicated data may waste storage space;

If data is stored more than once then it could be inconsistent

If data is stored more than once then each copy of the data would need to be
updated if it changed;

It might not be possible to store data about one type of entity without creating a
record for another type of entity

When a record for one type of entity is deleted it might delete the data about
another type of entity

May be difficult to select/edit data if it is not atomic // if there are repeating groups;

23
Q

why are non relational better than relational databases

A

Dynamic Schema:
NoSQL databases don’t require a fixed schema, allowing for easier adaptation to changing data structures and requirements.

Unstructured Data Handling:
They can manage various data formats, including unstructured and semi-structured data like JSON or XML documents.

Rapid Development:
The flexible schema allows for faster development cycles, especially when the data model is not fully defined upfront.

  1. Scalability and Performance:
    Horizontal Scalability:
    NoSQL databases can scale horizontally by adding more servers, making them suitable for handling large datasets and high traffic.

High Availability:
Data replication across multiple nodes ensures high availability and fault tolerance, minimizing downtime.

Optimized for Specific Data Types:
Different NoSQL databases are optimized for various data models (e.g., key-value, document, graph), allowing for efficient storage and retrieval of specific data types.