Databases Flashcards

1
Q

What is a database?

A

A database is a structured collection of data that is organized in a way to facilitate efficient retrieval and management.

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

Explain the concept of a database table.

A

A database table is a collection of related data entries organized in rows and columns. Each row represents a record and each column represents an attribute.

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

What is SQL?

A

SQL (Structured Query Language) is a domain-specific language used for managing and manipulating relational databases. It is used for tasks such as querying data updating data and defining and modifying the structure of databases.

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

What is normalization in the context of databases?

A

Normalization is the process of organizing data in a database to reduce redundancy and dependency. It involves dividing large tables into smaller related tables and defining relationships between them.

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

How does a SELECT statement work in SQL?

A

The SELECT statement in SQL is used to retrieve data from one or more tables. It allows you to specify the columns you want to retrieve the table from which to retrieve the data and optional conditions to filter the results.

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

What is a primary key?

A

A primary key is a unique identifier for a record in a database table. It ensures that each record can be uniquely identified and is used to establish relationships between tables.

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

What is a foreign key?

A

A foreign key is a field in a database table that is used to establish a link between two tables. It creates a relationship between the tables by referencing the primary key of another table.

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

What is an index in a database?

A

An index in a database is a data structure that improves the speed of data retrieval operations on a database table. It is created on one or more columns of a table to quickly locate and access rows.

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

What is the purpose of the WHERE clause in SQL?

A

The WHERE clause in SQL is used to filter the rows returned by a SELECT statement. It allows you to specify a condition that must be met for a row to be included in the result set.

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

Explain the concept of ACID properties in database transactions.

A

ACID (Atomicity Consistency Isolation Durability) properties are a set of characteristics that guarantee reliable processing of database transactions. Atomicity ensures that a transaction is treated as a single indivisible unit of work Consistency ensures that the database remains in a consistent state before and after a transaction Isolation ensures that the execution of transactions is independent of each other and Durability ensures that once a transaction is committed its effects are permanent.

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