Programming - databases Flashcards

(33 cards)

1
Q

What is the data life cycle?

A

stages that data goes through during its existence from initial creation to eventual disposal or archiving

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

What are the stages of the data life cycle?

A

collection, disposal, storage, analysis, processing

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

What are the challenges with data protection?

A

data quality, accuracy, completeness, and ethical/regulatory considerations – collect only what’s needed

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

What are challenges with data storage?

A

Compliance considerations for sensitive data (e.g. Data Protection Act 2018, General Data Protection Regulation (GDPR))

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

What are problems with data disposal?

A

ensuring data is permanently removed to prevent unauthorised access, ensuring we do not remove needed data

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

What is the DBMS?

A

Database Management Systems
The software that manages databases

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

What facilities does the DBMS provide?

A

Allow users to define the database
Allow users to insert, update, delete, and retrieve data from the database
Prevent unauthorised access
Maintain consistency of stored data
Backup data and to restore the database

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

What is ACID?

A

Atomicity, Consistency, Isolation, Durability

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

What does atomicity mean?

A

All or nothing. A transaction must be performed or not performed at all

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

What does consistency mean?

A

A transaction must transform the database from one consistent state to another consistent state

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

What does isolation mean?

A

transactions execute independently of one another

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

What does durability mean?

A

the effects of a successful transaction are permanently recorded in the database

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

What are some advantages of DBMS?

A

Control of data redundancy
Data consistency
Sharing of data becomes easier across entire organisation as data kept in one place
Improved data integrity through constraints (rules) to ensure validity and consistency of data
Improved security with simplified, centralised security measures
Enforcement of consistent standards
Improved data accessibility and responsiveness
Increased productivity
Improved maintenance through data independence
Increased concurrency
Improved backup and recovery services

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

What are the disadvantages of DBMS?

A

increased cost - hardware and software, staff training
significantly more complex
have to maintain the system to ensure it stays current

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

What are the components in the DBMS environment?

A

Hardware, software, data, procedures and people

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

What is a relational database?

A

Store data in structured tables with rows and columns
Relationships between tables defined using primary and foreign key
Suitable for structured date such as financial systems, HR systems
Examples: SQLite, Microsoft SQL Server, MySQL, Oracle Database

17
Q

What is a NoSQL database?

A

To handle unstructured or semi structured data
Do not follow a fixed schema
Many types depending on how data is organised (e.g. key-value pairs, JSON, columns)
Suitable for social networks, IOT, real-time analytics
Examples: MongoDB, Oracle NoSQL Database, Apache Cassandra

18
Q

What is a data model?

A

A data model is a collection of concepts that can be used to:
- Describe a set of data (structural part)
- The operations to manipulate data
- A set of integrity constraints for the data

19
Q

What is a primary key?

A

a unique identifier for each record in a table

20
Q

What is a foreign key?

A

a field in one table that links to the primary key in another table

21
Q

What is a superkey?

A

An attribute or set of attributes that uniquely identifies a tuple within a relation
A superkey may contain attributes that are not necessary for unique identification

22
Q

What is a candidate key?

A

a superkey such that no proper subset is a superkey

23
Q

What does the entity integrity rules state?

A

every relation must have a primary key
The primary must not contain null values

24
Q

What does the referential integrity rule state?

A

if a foreign key exists in a relation:
- Either the foreign key value must match a candidate key value of some tuple in its home relation
- Or the foreign key value must be wholly null

25
What are the stages of the database system development lifecycle?
Planning Requirements collection and analysis Database design Implementation Testing and validation Deployment and maintenance
26
What is the difference between physical and conceptual entities?
Physical entities – a concrete, tangible item. Conceptual entities – a more abstract idea or concept.
27
What is the difference between strong and weak entities?
Strong entity – an entity that is not existence-dependent on any other entity. E.g. a car, a product Weak entity – an entity that is existence-dependent on another entity. E.g. a journey must involve a car and a person
28
What is the main concept of First Normal Form?
the intersection of an attribute and a tuple is a single value
29
What is the main concept of Second Normal Form?
every attribute in a relation is fully dependent on the primary key
30
What is the main concept of Third Normal Form?
there are not transitive relationships between attributes in a relation
31
What is SQL?
the language which we will use to make, maintain and extract data from relation databases
32
What is the difference between DDL and DML?
DDL: data definition language – create the tables DML: data manipulation language – query the tables
33
What are the main operations of DDL functionality?
Generally termed CRUD operations: Create Read Update Delete