Lecture 8 - Database Schema
Lecture 8 - Database Schema
DATABASE SCHEMA
Agenda
Data model
ANSI/Spark Data Model
Database schema and instances
Data Models
Data Model:
A set of concepts to describe the structure of
a database, the operations for manipulating
these structures, and certain constraints that
the database should obey.
17
20
22
Database Schemas
The description of a database.
The overall design of the database is
called the database schema
It is a collection of named objects
which provide a logical classification
of objects in the database.
It Includes descriptions of the
database structure, data types, and
the constraints on the database.
24
Database Schemas
A schema is also an object in the
database. It is explicitly created using
the CREATE SCHEMA statement with
the current user recorded as the
schema owner.
Schema Diagram:
An illustrative display of (most aspects
of) a database schema.
Schema Construct:
A component of the schema or an object
within the schema, e.g., STUDENT,
COURSE.
25
Database Schemas
Schema classification
26
27
28
Database Instances
Database State:
The actual data stored in a database at
a particular moment in time. This
includes the collection of all the data in
the database.
Also called database instance (or
occurrence or snapshot).
30
Valid State:
A state that satisfies the structure and
constraints of the database.
31
Distinction
The database schema changes very
infrequently.
The database state changes every
time the database is updated.
32