Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

CMPT 454 Q1 - Introduction, Memory, & HDD: Exercises and Questions, Exams of Database Management Systems (DBMS)

A series of true/false questions and short answer exercises related to the first quarter of cmpt 454, covering topics such as database management systems, memory, and hard disk drives. It explores concepts like transactions, acid properties, database schemas, dbms architecture, secondary storage, and disk access mechanisms. The exercises are designed to test understanding of these fundamental database concepts.

Typology: Exams

2024/2025

Available from 02/14/2025

lyudmila-hanae
lyudmila-hanae šŸ‡ŗšŸ‡ø

1

(2)

7.8K documents

1 / 7

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CMPT 454 Q1 - Introduction, Memory, & HDD 100% Verified
T or F: Single queries can either be on one or more tables - Answer T
Instead of reading all records in a table and returning all those that match, what can we do? -
Answer Use an index
Multiple table queries generally entails _________ - Answer joins
What is the time complexity of the naive algorithm of a join? - Answer O(n^2)
What is a transaction? - Answer A single logical unit of work
Transactions are often composed of multiple ___________. - Answer actions
T or F: An OLTP usually is accessed by only one user at a time - Answer False. Multiple users
concurrently
What is a benefit of concurrent transactions? - Answer 1. Increases throughput (number of
transactions processed over time)
What is a disadvantage of concurrent transactions? - Answer Can leave database in an
inconsistent state
What does ACID stand for and what is it? - Answer Atomic, Consistent, Isolated, Durable.
Transactions should maintain these properties.
pf3
pf4
pf5

Partial preview of the text

Download CMPT 454 Q1 - Introduction, Memory, & HDD: Exercises and Questions and more Exams Database Management Systems (DBMS) in PDF only on Docsity!

CMPT 454 Q1 - Introduction, Memory, & HDD 100% Verified

T or F: Single queries can either be on one or more tables - Answer T Instead of reading all records in a table and returning all those that match, what can we do? -Answer Use an index

Multiple table queries generally entails _________ - Answer joins What is the time complexity of the naive algorithm of a join? - Answer O(n^2) What is a transaction? - Answer A single logical unit of work Transactions are often composed of multiple ___________. - Answer actions T or F: An OLTP usually is accessed by only one user at a time - Answer False. Multiple usersconcurrently

What is a benefit of concurrent transactions? - Answer 1. Increases throughput (number oftransactions processed over time)

What is a disadvantage of concurrent transactions? - Answer Can leave database in aninconsistent state

What does ACID stand for and what is it? - Answer Atomic, Consistent, Isolated, Durable. Transactions should maintain these properties.

What a system failure occurs, what must happen to a database? - Answer 1. Must recover

  1. Must be guaranteed to be in a consistent state after recovery Where is processing performed? - Answer Main memory A transaction completed in main memory is lost if ...? - Answer It has not been written to disc What makes a database inconsistent? - Answer When some of a transactions' actions arewritten to disk before the transaction is complete. These transactions must be rolled back.

Where are schemas defined? - Answer In the database How are schemas created? - Answer Running a CREATE A TABLE statement or using the DBMSGUI

A schema is associated with one or more constraints. Which are they? - Answer 1. Primary key

  1. Foreign key
  2. Other constraints What does a DBMS do? - Answer 1. Facilitates access to DBs
  3. Maps the conceptual to the physical view (data stored in main memory or secondary storage)
  4. Responsible for accessing data from storage devices What are the two major alternatives for the interface between DBMS and application? - Answer1. Embedded
  • Application accesses the DB directly via API call
  • Linked to the application at compile time
  1. Tiered client-server

Disadvantage:

  • Expensive Tertiary storage should have ________ and _________. - Answer Large capacity, low cost What are some examples of tertiary storage devices? - Answer 1. Cloud storage
  1. Optical drives (CDs and DVDs)
  2. Magnetic tape What is a major advantage of persistent memory? - Answer It is non-volatile: retains data evenif there is a break in power supply

T or F: Main memory is bigger than persistent storage - Answer F. Much smaller thanpersistent storage

Database data must be transferred between ______________ and ______________. - Answer Mainmemory and storage

What does transient memory mean? - Answer Memory that is both persistent and working Where are operations like read, update, write performed? - Answer Main memory What are cylinders in an HDD? - Answer Set of tracks with same diameter on all surfaces Where is control information located? - Answer In the fixed-sized gaps that separate blocks How can blocks be addressed? - Answer By cylinder number

What do blocks map to? - Answer Pages T or F: When data from a disk is read into the main memory, only the desired record is read intothe main memory. - Answer F. The block in which the record resides gets written into main memory What must happen before most writes? - Answer An initial read of a disk block How many disk heads can read or write at a time? - Answer One If there are 3 platters in an HDD, how many disk heads are there? - Answer 6, one for eachsurface

What are the steps to access a block on a disk? - Answer 1. Disk head pivots over the desiredtrack (seek time)

  1. Wait for leading edge of block to reach the disk head (rotational delay)
  2. The desired block is read as it passes underneath the disk head (transfer time) What is a disk controller? - Answer The processor that controls the drive How do you calculate maximum rotational delay? - Answer 1/RPM * 60s How do you find average rotational delay? - Answer 1/2 * max rotational delay What is the minimum seek time? - Answer 0 - the disk head is on the desired track What is maximum seek time? - Answer The time it takes for disk head to move from innermostto outermost track
  1. Write failure
  • sector cannot be written to or retrieved (caused by a power failure)
  1. Disk crash
  • entire disk unreadable