CSC 675 Review 1 - Introduction and Overview Flashcards
Data
Known facts that can be recorded
Database *
Collection of related data
DBMS, Database Management System *
a collection of programs that enables users to create, access, and maintain a database
Database Catalog / Meta-Data
structure of file
storage format of data items
constraints on the data
program-data independence
allow the data file structure to be changed without modifying the application code
a layer in between
What are the three major types of operations supported by database systems?
Create - define data
Access - query + update
Maintain - enforce integrity constrains
Why are database applications considered to be easier to implement that traditional file based applications?
Because much of the functionality that you need is already defined.
What is a database query?
Read and return all data which satisfy some search criteria.
How do read-only queries differ from update queries?
update queries insert, delete or modify data values in the database, read-only queries don’t.
Discuss how file based applications are different from database applications.
Databases are
- self describing
- insulation between programs and data
- data abstraction
- support multiple views of the data
- sharing data and multiuser transaction processing
In traditional file systems,
- files are part of each program.
Why is it difficult for application programers to provide integrity constraint enforcement in their application code?
all in one place
collecting the integrity constraints into the database makes updating the integrity constraints themselves possible without rewriting application programs.
What is concurrency control?
coordinate many simultaneous transactions
Why is concurrency control important?
insure that simultaneous transactions work with a consistent database and leave the database in a consistent state (consistent- > as if transactions were executed in some sequential order)
What is recovery?
Insure that no data from committed transactions is lost, regardless of any failures.
Why is recovery important?
All systems are prone to failures, and handling recovery from failure is a must.
Why is redundant data a problem? *
The redundant data problem concerns a piece of data or data fields that is stored in one or more table locations. If the data is updated in one location is must also be updated in tall other locations, so that we know that we’re accessing the correct data. We need to ensure the integrity of the data.
How do database systems make it easier to avoid storing redundant data? *
A database system makes it easier to avoid storing redundant data by keeping all the dat in one easily update able location and providing an easy mechanism to do this.
What is a data model?
A collection of concepts that can be used to describe the structure of a database.
How is a data model used?
Data models are the practical tools used for specifying data abstraction.
Define the term database schema.
description of the database
specified during the database design
Define the term database state.
The data in the database at a particular moment in time.
Define the term data dictionary.
In addition to storing catalog information about schemas and constraints, the data dictionary stores other information, such as design decisions, usage standards, application program descriptions, and user information.
Describe the main categories of data models and the differences between them.
High level - ER model - close to the way many users perceive data
implementation data model - Relational Model
low level - physical data models - how data is stored in the computer
What is the difference between a database schema and a database state?
- Database schema - the description of the database
- Database state - the data in the database at a particular moment in time
What is a database view?
A virtual relation defined as the result of any legal SQL query. The view behaves as if it is not materialized until a query against it is executed.
How is a database view used?
Views are used just like other tables. Limits the possible update operations that can be applied to views, but it does not provide any limitations on querying a view.
Under what conditions is it NOT a good idea to use a database system for application development?
not likely to change
real time processing requirements
does not require concurrent data access
Describe four types of program-data independence and give an example of each.
representation of numeric data: int -> float
representation of character data: fixed length string -> variable length string
units for numeric data: inches -> meters
data materialization (virtual fields): age stored directly or derived from birthdate or current date
structure of stored records: (student, sno, course, coursename_ -> (student, sno, course), (course, coursename)
structure of stored file -> ordered on sno, hashed on sno
What are the five major components of the DB implementation architecture?
Scanning & Parsing
Query Optimizaion
Run-Time Environment
Transaction Manager
Access Methods
File System / OS Disk
Explain what functions are performed by the scanning & parsing module of a DBS.
translate SQL request into an internal representation (and check syntax & type compatibility)
Explain what functions are performed by the query optimization module of a DBS.
select “optimal” access strategy and generate query execution plan
Explain what functions are performed by the run-time environment of a DBS.
interprets query execution plan, transactions
query processing
authorization & integrity checks
Explain what functions are performed by the access methods of a DBS.
organize information on the disk & retrieve individual records when requested by the run-time environment
Explain what functions are performed by the file system, OS & disk of a DBS.
organize disk storage
coordinate transfer of blocks of data to/from memory buffers
What is a transaction?
atomic unit of database
processing (commits or aborts)!
How does a transaction differ from an execution plan?
execution plan - static
transaction - executing code
Explain what functions are performed by the transaction manager.
part of run- time environment
concurrency control: coordinate many simultaneous transactions
recovery: insure that no data from committed transactions is lost, regardless of any failures
Why are the functions performed by the transaction manager important?
To ensure data isn’t lost.