Intro to Database Flashcards

(30 cards)

1
Q

What is a database?

A

A structured electronic collection of data that can be stored, searched, updated, and organised.

Databases are essential for managing large amounts of information efficiently.

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

What is a table in a database?

A

A collection of similar records (rows) with shared fields (columns).

Tables are fundamental components of a database structure.

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

What is a record (row)?

A

One entry representing a single item (e.g., one customer).

Each record contains data related to a specific instance.

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

What is a field (column)?

A

A single piece of information about a record (e.g., name, email).

Fields define the attributes of the data stored in a record.

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

What is a primary key?

A

A unique, non-NULL identifier for a row.

Primary keys ensure that each record can be uniquely identified.

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

What is a foreign key?

A

A field referencing a primary key in another table to link data.

Foreign keys establish relationships between tables.

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

What is structured data?

A

Data stored in fixed formats like tables (rows + columns).

Structured data is easily searchable and organized.

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

What is semi-structured data?

A

Flexible data with some structure, like JSON or XML.

Semi-structured data allows for more variability in data representation.

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

What is unstructured data?

A

Data with no fixed format (images, videos, PDFs).

Unstructured data is often more challenging to analyze.

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

What is normalisation?

A

The process of splitting data into clean, organised tables to remove duplication.

Normalisation helps maintain data integrity.

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

What does 1NF remove?

A

Repeating groups and multi-value cells; enforces atomic data.

First Normal Form ensures that each field contains only atomic values.

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

What does 2NF remove?

A

Partial dependencies when using a composite primary key.

Second Normal Form ensures that all non-key attributes are fully functional dependent on the primary key.

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

What does 3NF remove?

A

Transitive dependencies (non-key columns depending on non-key columns).

Third Normal Form aims to eliminate redundancy in data.

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

What is SQL?

A

Structured Query Language used to interact with relational databases.

SQL is the standard language for managing and manipulating databases.

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

What are examples of DDL commands?

A
  • CREATE
  • ALTER
  • DROP
  • TRUNCATE

DDL commands are used to define and modify database structures.

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

What are examples of DML commands?

A
  • SELECT
  • INSERT
  • UPDATE
  • DELETE

DML commands are used to manipulate data within the database.

17
Q

What are examples of DCL commands?

A
  • GRANT
  • REVOKE

DCL commands are used to control access to data in the database.

18
Q

What are TCL commands?

A
  • BEGIN
  • COMMIT
  • ROLLBACK
  • SAVEPOINT

TCL commands manage transactions in a database.

19
Q

What does an INNER JOIN return?

A

Only matching rows from both tables.

INNER JOIN is used to combine rows from two or more tables based on a related column.

20
Q

What does a LEFT JOIN return?

A

All rows from the left table plus matches from the right.

LEFT JOIN includes all records from the left table, even if there are no matches in the right table.

21
Q

What is an index?

A

A structure that speeds up searches by avoiding full table scans.

Indexes improve the performance of database queries.

22
Q

What is a clustered index?

A

The table’s physical order; only one allowed.

A clustered index determines the order in which data is stored in a table.

23
Q

What is a non-clustered index?

A

A separate lookup structure pointing to rows; many allowed.

Non-clustered indexes do not affect the physical order of data.

24
Q

What is OLTP used for?

A

Fast inserts, updates, and real-time transactions (e.g., banking).

OLTP systems are optimized for transaction-oriented applications.

25
What is **OLAP** used for?
Large-scale analytics, reporting, dashboards. ## Footnote OLAP systems are designed for complex queries and data analysis.
26
What are **ACID properties**?
* Atomicity * Consistency * Isolation * Durability ## Footnote ACID properties ensure reliable processing of database transactions.
27
What does a **Database Administrator (DBA)** do?
Manages, secures, backs up, and optimises databases. ## Footnote DBAs are crucial for maintaining the integrity and performance of databases.
28
What does a **Data Engineer** do?
Builds pipelines, integrates data, transforms data for analytics. ## Footnote Data Engineers focus on preparing data for analytical or operational purposes.
29
What does a **Data Analyst** do?
Analyses data, builds reports, finds insights. ## Footnote Data Analysts interpret data to help inform business decisions.
30
What is **Azure SQL Database**?
A fully managed cloud relational database service. ## Footnote Azure SQL Database provides scalability and high availability in the cloud.