Introduction to Databases Flashcards

Learn the harder stuff (32 cards)

1
Q

What is the role of the query processor in a database system?

A
  • Interprets queries
  • Creates a plan to modify the database or retrieve data
  • Returns query results to the application
  • Performs query optimization

The query processor ensures the most efficient instructions are executed on the data.

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

What does the storage manager do in a database system?

A
  • Translates query processor instructions into low-level file-system commands
  • Modifies or retrieves data
  • Uses indexes to quickly locate data

Database sizes can range from megabytes to many terabytes.

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

What is the function of the transaction manager?

A
  • Ensures transactions are properly executed
  • Prevents conflicts between concurrent transactions
  • Restores the database to a consistent state in case of failure

The transaction manager plays a crucial role in maintaining data integrity.

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

What is contained in the log of a database?

A

A complete record of all inserts, updates, and deletes processed by the database

The transaction manager writes log records before applying changes to the database.

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

How does the transaction manager use log records in the event of a failure?

A

Uses log records to restore the database

This process ensures data integrity and consistency.

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

What is the catalog in a database system also known as?

A

Data dictionary

It is a directory of tables, columns, indexes, and other database objects.

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

What information does the catalog provide to other components?

A

Information to process and execute queries

The catalog is essential for the functioning of the database system.

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

What data type is used to store integer values?

A

INT

INT is a common data type in databases for storing whole numbers.

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

What data type is used to store fractional numeric values?

A

DECIMAL

DECIMAL allows for precise storage of numbers with decimal points.

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

What data type is used to store textual values?

A

VARCHAR

VARCHAR is used for variable-length strings in databases.

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

What data type is used to store year, month, and day?

A

DATE

DATE is specifically designed to handle date values in databases.

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

The principle that physical design never affects query results is called?

A

data independence

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

API

A

A library of procedures or classes that links a host programming language to a database

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

A database model

A

a conceptual framework for database systems, with three parts:
1. Data structures that prescribe how data is organized.
2. Operations that manipulate data structures.
3. Rules that govern valid data.

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

Data Structure Terms

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

Mathmatical and file term for Table

A

Relation and File

17
Q

Mathmatical and file term for column

A

Attribute and Field

18
Q

Mathmatical and file term for Row

A

Tuple and Record

19
Q

Mathmatical and file term for Data Type

A

Domain and also Data Type

20
Q

What is the purpose of the Select operation in relational operations?

A

Select selects a subset of (or all) rows of a table

This operation is fundamental for retrieving specific data from a table.

21
Q

What does the Project operation do in relational operations?

A

Project selects one or more columns of a table

This operation allows for focusing on specific attributes of the data.

22
Q

What is the result of the Product operation in relational operations?

A

Product lists all combinations of rows of two tables

This operation is also known as the Cartesian product.

23
Q

How does the Join operation function in relational operations?

A

Join combines two tables by comparing related columns

This operation is essential for merging data from different tables based on a common attribute.

24
Q

What does the Union operation do in relational operations?

A

Union selects all rows of two tables

This operation combines the results of two queries, eliminating duplicates.

25
What is the purpose of the **Intersect** operation in relational operations?
Intersect selects rows common to two tables ## Footnote This operation identifies shared data between two datasets.
26
What does the **Difference** operation accomplish in relational operations?
Difference selects rows that appear in one table but not another ## Footnote This operation helps in identifying unique data in one dataset.
27
What is the function of the **Rename** operation in relational operations?
Rename changes a table name ## Footnote This operation is useful for improving clarity or avoiding naming conflicts.
28
What does the **Aggregate** operation compute in relational operations?
Aggregate computes functions over multiple table rows, such as sum and count ## Footnote This operation is essential for summarizing data.
29
What are **relational rules** in the context of the relational model?
* Unique primary key * Unique column names * No duplicate rows ## Footnote Relational rules govern data in every relational database.
30
What does a **unique primary key** ensure in a relational database?
Values may not repeat ## Footnote All tables must have a primary key column or group of columns.
31
True or false: Different columns of the same table can have the **same name**.
FALSE ## Footnote Each column in a table must have a unique name.
32
What does the rule of **no duplicate rows** state in a relational database?
No two rows of the same table have identical values in all columns ## Footnote This ensures data integrity within the table.