CH 1: Introduction Flashcards
Physical Data Independence
Implementation of
simple data structures at the Logical Level
may depend on
complex structures at the Physical Level
But a user at the Logical Level doesn’t have to be aware of the complex physical structures
Definition:
“Instance” of a Database
The collection of information stored in a database at a particular moment
Levels of
Data Abstraction
View Level
Logical Level
Physical Level
Levels of Data Abstraction:
View Level
View Level
- The highest level
- Describes only part of the database
- Exists to simplify user interaction with the system
- There may be many views for the same database
Levels of Data Abstraction:
Logical Level
Logical Level
- Describes :
- What data are stored
- What relationships exist between data
- Describes the entire database in terms of simple structures
Levels of Data Abstraction:
Physical Level
Physical Level
- Lowest Level
- Describes how data is actually stored
- Describes low-level data structures in detail.
DBMS
Overview
Database Management System
- A collection of interrelated data, and
- A set of programs to access the data
- The Primary Goal of a DBMS is to provide a way to store and retrieve database information that is both convenient and efficient
Definition:
Query
Query
A statement requesting the retrieval of information
Definition:
Query Language
Query Language
The portion of a Database Manipulation Language(DML) that involves information retrieval
Definition
Data Manipulation Language (DML)
Data Manipulation Language (DML)
A language that enables users to access or manipulate data
Data Manipulation Languages:
Two Types
- Procedural DMLs
- Require user to specify what data is needed
- Also how data should be retrieved
- Declarative DMLs
- Only requires user to specify what data is needed
- Does NOT require user to specify how to get it
- Easier to learn than Procedural DMLs
- Also called “Nonprocedural” DMLs
Two Language Types
in a Database System
- Data Definition Language
- Specifies the database schema
- Data Manipulation Language:
- To express database queries and updates
- In practice, these are combined into a single database language, such as SQL
Relational Data Model
Overview
- Uses a collection of tables to represent both
- data
- relationships among the data
- Each column(attribute) has a unique name (“name”, “phone”, “student_id”, etc)
- Tables are also known as Relations
- Is an example of a Record-Based Model
- This is the most widely used Data Model
Definition:
Data Model
Data Model
A collection of conceptual tools for describing:
- data
- data relationships
- data semantics
- consistency constraints
Provides a way to describe the design of a database at each level:
- physical
- logical
- view
Entity-Relationship(ER)
Data Model
Overview
- Uses a collection of basic objects:
- Entities
- Relationships
- An Entity is a thing or object in the real world, distinguishable from other object
- Entities have Relationships with other Entities
- Widely used model in database design
Object-Based Data Model
and
Object-Relational Model
- Extends the E-R model with notions of:
- Encapsulation
- Methods(functions)
- Object Identity
- Works with principles of Object-Oriented Programming
- There is also the Object-Relational Data Model, which combines features of the Object-Oriented and Object-Relational data models
Semi-Structured Data Model
- Permits the specification of data where individual data items of the same type may have different sets of attributes
- This is in contrast to the other data models, where all objects of a type have the same attributes
- Widely uses Extensible Markup Language(XML) or similar to represent semistructured data
Data Models:
4 Categories
- Relational Model
- Entity-Relationship Model
- Object-Based Data Model
- Semi-Structured Data Model
Types of Schemas in a Database
- Schema:
- The overall design of the database
- Subschemas:
- Designs of different views at the View Level
- Logical Schema:
- Design of the database at the logical level
- Physical Schema:
- Design of the database at the physical level
Disadvantages of
Conventional
File Processing Systems
-
Data Redundancy/Inconsistency
- Over time, various files will be used with different structures, same data will be stored, etc
-
Difficulty Accessing Data
- Unanticipated forms of data request require new programs or manual sorting
-
Data Isolation
- Data gets scattered in different files or formats
-
Integrity Problems
- Difficult to integrate new constraints
-
Atomicity Problems
- hard to implement atomic transactions
-
Concurrent Access Anomalies
- Multiple users may be able to access data simultaneously
-
Security Problems
- Not every user should have access to all data