Lecture 1- Introduction to Database Flashcards
What is a database?
A database is a very large, integrated collection of data
What are the two parts of databases?
- Entities
- Relationships
What is a database management system (DBMS)?
DBMS is a software package designed to store and manage databases
Describe non-database approach
- One data set per program
- programmer defined (and implements) storage structures, access methods, etc
What are some problems with a non-database approach?
- With more and more applications we get:
- Many files with different structures
- Redundant storage
- Inconsistent copies
- Expensive updates
- Incorrect data
- Data exchange between applications
Describe the idea behind a database approach
- Remove details related to data storage and access from applications programs
- Concentrate those functions in a single system called a database management system
- Have all applications access data through the DBMS
Why use a DBMS?
- Reduced redundancy
- Less risk of inconsistency
- Reduced application development time
- Uniform data administration
- Concurrent access, recovery from crashes
- But most importantly data independence
Describe a three level schema
- External schema = what application programs and users see
- Conceptual schema = description of the logical structure of data
- Physical schema = file structures and indexes being used
What is a schema?
A description of the data contents, structures and other aspects
What is an objective?
Application programs unaffected by changes in storage structure and access strategy
What is logical data independence?
Protection from changes in logical structure of data
What is physical data independence?
Protection from changes in physical structure of data
What is one of the most important benefits of using DBMS?
Data independence
Describe DBMS functionality
- Data definition facilities
- Data manipulation facilities
- Facilities for integrity constraints
- Provides concurrency control
- Supports transactions
- Provides database recovery
- Provides query optimization
What are data definition facilities?
- Provides a data definition language (DDL)
- Stores the definitions in a user accessible catalog (data dictionary)
What are data manipulation facilities?
Provides a query language for storing, retrieving and updating data
What do facilities for integrity constraints do?
- Does the validation check for integrity constraints before updates
- Different kinds of constraints
What are the different types of integrity constraints?
- Primary key constraints (entity integrity)
- Foreign key constraints (no dangling references)
- Check constraints
What is concurrency control?
Multiple users simultaneously access/update a database
What are transactions?
- A sequence of user operations to be performed as an atomic action
- All operations or none are performed
Why is database recovery important in DBMS?
Whatever happens, never lose data
What is query optimization?
Find the best possible plan for executing a query
Where does DBMS place itself in a computer system?
Why this course?
- A paradigm shift from computation to information
- Big data is everywhere
- Many applications need DBMS functionalities
- One size doesn’t fit all
- What are they and why are they useful?
How can I use databases?
- Relational model
- ER model
- Relational query languages
- Database design
How do databases work?
- Secondary storage
- Organizing data in files and indexes
- Physical database design
- Database tuning