Data Environment
Data Environment
Data Environment
Database Environment
Chapter 2 - Objectives
4
Objectives of Three-Level
Architecture
DBA should be able to change database
storage structures without affecting the
users’ views.
Conceptual Level
Community view of the database.
Describes what data is stored in database
and relationships among the data.
19
Here's how DDL achieves this:
CREATE TABLE
Employees ( EmployeeID INT PRIMARY KEY,
FirstName VARCHAR(50),
LastName VARCHAR(50),
DepartmentID INT,
FOREIGN KEY (DepartmentID) REFERENCES Departments(DepartmentID) );
In this example, a table named Employees is created with columns
Employee ID, FirstName, Last Name, and Department ID.
Relationships between tables can be established using foreign key
constraints.
2. Defining Attributes (Columns):
3. Establishing Relationships:
DDL allows users to define relationships between entities using foreign key
constraints. This is crucial for maintaining data integrity and enforcing
referential integrity rules.
Creating Indexes:
25
Data Model
Integrated collection of concepts for
describing data, relationships between
data, and constraints on the data in an
organization.
A User-Accessible Catalog.
Transaction Support.
Recovery Services.
Pearson Education © 2014 33
Functions of a DBMS
Authorization Services.
Integrity Services.
Utility Services.
Pearson Education © 2014 34
System Catalog
Repository of information (metadata)
describing the data in the database.
One of the fundamental components of
DBMS.
Typically stores:
names, types, and sizes of data items;
constraints on the data;
names of authorized users;
data items accessible by a user and the type of
access;
usage statistics.
File-server
Client-server
Disadvantages include:
Significant network traffic.
Copy of DBMS on each workstation.
Concurrency, recovery and integrity control more
Pearson Education © 2014 40
complex.
File-Server Architecture
Advantages include:
wider access to existing databases;
increased performance;
possible reduction in hardware costs;
reduction in communication costs;
increased consistency.