Definitions
- Entity: concept/object about which information is stored
- Attribute: property of an entity
- Mini-world: part of the real world about which data is stored
- A database represents only relevant aspects of the mini-world
Database Management System (DBMS)
A software system facilitating the creation/maintenance of a database:
- Database software: DBMS + applications
- Database system: database + software
Functionality:
- Database definition
- Loading the database into memory
- Manipulation: queries/inserts/deletions/updates
- Concurrent processing by users/programs
- Security measures to prevent unauthorized access
Compared to files:
-
Disadvantages: complexity, size, cost, performance
-
Advantages: reduced development time, flexibility, economies of scale
The schema, also known as the database intension, rarely changes, but the state of the database, called the extension changes frequently. The actual data stored in the database at a particular moment in time is called the instance.
Three-Schema Architecture
- Internal schema: deals with the physical level (e.g. path to database), but not the actual physical devices
- Conceptual schema: describes the structure of the database; entities, attributes relationships etc.
- External schema: view visible to end users. It may be a subset of the conceptual schema, allowing the user to access only what is relevant to them
Three-Level Data Model
- Conceptual/high-level/semantic: concepts close to the way users perceive the data
- Physical/low-level/internal: concepts describing details of how data is actually stored
- Implementation/representational: half-way point
DBMS Languages
- Data Definition/Description Language (DDL): specifies the schema of the database (e.g.
CREATE,ALTER) - View Definition Language (VDL): language used to create user views - mapping from the conceptual to the external schema
- Storage Definition Language (SDL): language used to specify the internal schema - how the data is actually stored
- Data Manipulation Language (DML): language used to manipulate the database (e.g.
SELECT,INSERT). They can be high level, non-procedural languages like SQL or low-level procedural languages where records are updated one at a time