2: DBMS Architecture & Classification

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/168

encourage image

There's no tags or description

Looks like no tags are added yet.

169 Terms

1
New cards

What are the main components of a DBMS?

Connection manager, security manager, DDL compiler, query processor, storage manager, DBMS utilities, and DBMS interfaces.

2
New cards

What does the connection manager do?

Establishes a local or network connection, verifies logon credentials, and returns a connection handle.

3
New cards

How may a database connection be handled?

By a separate process or a thread within a process.

4
New cards

What does the security manager do?

Checks whether a user has permission to perform an operation, such as reading, writing, or deleting data.

5
New cards

How does the connection manager differ from the security manager?

The connection manager establishes and authenticates a connection; the security manager checks permission for specific operations.

6
New cards

Does successfully logging in authorize a user to perform every database operation?

No. Authentication establishes identity, while authorization determines permitted operations.

7
New cards

A user can log in but cannot delete records. Which component checks the delete permission?

The security manager.

8
New cards

What does the DDL compiler process?

Definitions of database structures, not the business records themselves.

9
New cards

What are the main steps of DDL compilation?

Parse definitions, check syntactical correctness, translate them into an internal format, and register successful definitions in the catalog.

10
New cards

Where does the DDL compiler register successfully compiled definitions?

In the catalog as metadata.

11
New cards

Which models should ideally have DDL support according to the chapter?

External, logical, and internal models.

12
New cards

What does the query processor do?

Processes requests to retrieve, insert, update, or delete data.

13
New cards

What does the storage manager do?

Controls physical file access and the correct, efficient storage of data.

14
New cards

What is procedural DML?

DML that specifies how to navigate and access data, typically using record-at-a-time operations.

15
New cards

What is declarative DML?

DML that specifies what data or changes are wanted, leaving the execution strategy to the DBMS.

16
New cards

What is the key difference between procedural and declarative DML?

Procedural DML specifies how to perform an operation; declarative DML specifies the desired result.

17
New cards

Which processing style is associated with procedural DML?

Record-at-a-time processing.

18
New cards

Which processing style is associated with declarative DML?

Set-at-a-time processing.

19
New cards

Which database models are associated with procedural DML in this chapter?

Hierarchical and network models.

20
New cards

Which database model is associated with declarative SQL?

The relational model.

21
New cards

Do classic hierarchical and network systems use a query processor in the model described by the slides?

No. Their procedural DML specifies record navigation directly.

22
New cards

Why do declarative systems use a query processor?

To determine how to execute requests that specify the desired result rather than the navigation procedure.

23
New cards

Does SQL become procedural DML when embedded in Java?

No. The SQL statement remains declarative even if the surrounding Java code uses loops or other procedural logic.

24
New cards

What does the DML compiler do?

Compiles DML statements, extracts them from a host language where applicable, and coordinates their processing.

25
New cards

What is the central sequence of query-processing stages?

Parse → Rewrite → Optimize → Execute.

26
New cards

What does the query parser do?

Checks syntax and semantics and converts the query into an internal representation.

27
New cards

What is a query syntax check?

A check that the query follows the language’s grammar.

28
New cards

What is a query semantics check?

A check that the query makes sense, such as verifying that referenced tables and columns exist.

29
New cards

A query refers to a nonexistent column. What kind of check detects the problem?

A semantic check performed by the query parser.

30
New cards

A query contains incorrectly ordered SQL keywords. What kind of check detects the problem?

A syntax check performed by the query parser.

31
New cards

What does the query rewriter do?

Transforms the query to improve it independently of the current database state.

32
New cards

What does the query optimizer do?

Evaluates execution plans using database information and estimated costs, then chooses a final execution plan.

33
New cards

What is the key difference between the query rewriter and query optimizer?

The rewriter transforms queries independently of current database state; the optimizer selects an execution strategy using database information.

34
New cards

What information does the optimizer use?

Catalog information, available indexes, statistics, and statistical inference.

35
New cards

What costs may the query optimizer estimate?

The number of I/O operations, CPU processing cost, and execution time.

36
New cards

What is the output of the query optimizer?

A final execution plan.

37
New cards

What does the query executor do?

Runs the chosen execution plan and calls the storage manager for data access.

38
New cards

What is the difference between the optimizer and executor?

The optimizer chooses the execution plan; the executor runs it.

39
New cards

Two plans return the same result, but one scans a table and the other uses an index. Which component compares them?

The query optimizer.

40
New cards

Does an available index guarantee that an index-based plan is best?

No. Its usefulness depends on the query, database information, and estimated costs.

41
New cards

Which query-processing component directly requests data access from the storage manager?

The query executor.

42
New cards

What is impedance mismatch?

A difference between how a programming language represents data and how a database represents it.

43
New cards

How do classes, objects, and object references roughly correspond to relational structures?

Classes correspond to tables, objects to rows, and object references to foreign keys, although the mappings are not always exact.

44
New cards

Is impedance mismatch a network connection problem?

No. It is a data-representation mismatch between a programming language and a database.

45
New cards

What are the two solutions to impedance mismatch described in the chapter?

Use a host language and DBMS with comparable structures, or use middleware to map between their representations.

46
New cards

How can an object-oriented language and an object-oriented DBMS reduce impedance mismatch?

They use comparable object-oriented data structures, reducing the need to translate objects into relational structures.

47
New cards

A Java application uses objects and references, while its database uses rows and foreign keys. What problem can arise?

Impedance mismatch.

48
New cards

What software approach can address object-relational impedance mismatch?

Mapping middleware, such as an object-relational mapping (ORM) layer.

49
New cards

What are the four components of the storage manager?

Transaction manager, buffer manager, lock manager, and recovery manager.

50
New cards

What does the transaction manager do?

Supervises transactions, schedules interleaved operations, and coordinates ACID guarantees.

51
New cards

What is a transaction?

A sequence of read/write operations treated as one atomic unit.

52
New cards

What does COMMIT do?

Successfully completes a transaction and makes its changes permanent.

53
New cards

What does ROLLBACK do?

Undoes a transaction’s changes after failure or cancellation.

54
New cards

What is the difference between COMMIT and ROLLBACK?

COMMIT preserves a successfully completed transaction’s changes; ROLLBACK undoes its changes.

55
New cards

Which ACID property is directly illustrated by undoing a partially completed transaction?

Atomicity, because a transaction must take effect completely or not at all.

56
New cards

What are interleaved transaction operations?

Operations from multiple transactions mixed in a schedule while preserving correct behavior.

57
New cards

What does ACID stand for?

Atomicity, Consistency, Isolation, and Durability.

58
New cards

What is atomicity?

All operations of a transaction take effect, or none do.

59
New cards

What is consistency in ACID?

A transaction moves the database from one valid state to another while respecting integrity rules.

60
New cards

What is isolation in ACID?

Concurrent transactions should have the same effect as if executed in isolation.

61
New cards

What is durability?

Once a transaction succeeds, its changes persist, including through failures.

62
New cards

What does the buffer manager do?

Manages data cached in memory and decides what to replace when the buffer is full.

63
New cards

Why does a DBMS cache data in memory?

To reduce slower access to persistent storage.

64
New cards

What is data locality as described in this chapter?

The tendency for recently accessed data to be accessed again.

65
New cards

What is the 20/80 law in database buffering?

A heuristic suggesting that a large proportion of transactions access a relatively small portion of the data.

66
New cards

Is the 20/80 law guaranteed for every workload?

No. It is a useful heuristic, not a universal rule.

67
New cards

Why do data locality and the 20/80 heuristic support caching?

They suggest that keeping frequently reused data in memory can avoid many slower storage accesses.

68
New cards

What is a buffer replacement strategy?

A method for deciding which cached data to remove when the buffer is full.

69
New cards

Which component chooses what cached data to replace when memory is full?

The buffer manager.

70
New cards

What does the lock manager do?

Coordinates concurrent read/write access by assigning, tracking, and releasing locks.

71
New cards

What types of locks are discussed in this chapter?

Read locks and write locks.

72
New cards

What is a locking protocol?

The rules that govern how locks are acquired, used, and released.

73
New cards

What is a lock table?

A structure that records information about locks.

74
New cards

How does a locking protocol differ from a lock table?

The protocol defines locking rules; the table records lock information.

75
New cards

What does the recovery manager do?

Logs database operations and supports undoing aborted transactions and recovering after crashes.

76
New cards

Where does the recovery manager record database operations?

In a log file.

77
New cards

When is recovery information needed?

When a transaction aborts or a crash occurs.

78
New cards

A transaction modifies several records but fails before completion. Which component uses logged operations to support undo?

The recovery manager.

79
New cards

What is the transaction-level action that undoes a failed transaction’s changes?

ROLLBACK.

80
New cards

How do the transaction manager and recovery manager differ?

The transaction manager coordinates transaction execution; the recovery manager uses logs and recovery information to support undo and crash recovery.

81
New cards

How do the buffer manager and lock manager differ?

The buffer manager manages cached data; the lock manager controls concurrent access through locks.

82
New cards

What are DBMS utilities?

Tools that perform supporting tasks such as loading, reorganization, performance monitoring, user management, backup, and recovery.

83
New cards

What does a loading utility do?

Brings data into the database.

84
New cards

What does a reorganization utility do?

Rearranges stored data.

85
New cards

What does a performance-monitoring utility do?

Tracks database performance.

86
New cards

What does a user-management utility do?

Manages user accounts and privileges.

87
New cards

What are DBMS interfaces?

Ways for people or applications to interact with the database system.

88
New cards

What are examples of DBMS interfaces?

Web-based, stand-alone query language, command-line, forms-based, graphical, natural-language, administrative, and network interfaces.

89
New cards

What is the difference between a utility and an interface?

A utility performs a supporting task; an interface provides a way to interact with the system.

90
New cards

What are the major DBMS data-model categories in this chapter?

Hierarchical, network/CODASYL, relational, object-oriented, object-relational, XML, and NoSQL.

91
New cards

What characterizes a hierarchical DBMS?

A tree-like data model, procedural record-oriented DML, and intertwined logical and internal models.

92
New cards

What is an example of a hierarchical DBMS from the slides?

IBM IMS.

93
New cards

What characterizes a network/CODASYL DBMS?

A network data model, procedural record-oriented DML, and intertwined logical and internal models.

94
New cards

What is an example of a network DBMS from the slides?

CA-IDMS.

95
New cards

What is the main difference between hierarchical and network data models?

Hierarchical models use a tree structure; network models use a network structure.

96
New cards

What characterizes a relational DBMS?

A relational model, declarative set-oriented SQL, a query processor, and separation of logical and internal models.

97
New cards

What are examples of relational DBMSs from the slides?

MySQL, Oracle, DB2, and Microsoft SQL Server.

98
New cards

How do hierarchical/network and relational DBMSs differ in DML style?

Hierarchical/network systems use procedural DML; relational systems use declarative SQL.

99
New cards

How do hierarchical/network and relational DBMSs differ in processing style?

Hierarchical/network systems use record-at-a-time processing; relational systems use set-at-a-time processing.

100
New cards

How do hierarchical/network and relational DBMSs differ in model separation?

Hierarchical/network systems intertwine logical and internal models; relational systems separate them.