CSE 301- Database Systems
Chapter-1
Biplab Debnath
biplab@cse.green.edu.bd
© Biplab C. Debnath CSE 301 Database Lecturer, CSE
DATABASE SYSTEM CONCEPTS (6th Edition)-Abraham Silberschatz
Chapter 1: Introduction
Biplab C. Debnath
Lecturer
Dept. of Computer Science and Engineering
© Biplab C. Debnath CSE 301 Database Lecturer, CSE
Review of the previous class
© Biplab C. Debnath CSE 301 Database Lecturer, CSE
Levels of Abstraction
Physical level: describes how a record (e.g., instructor) is stored.
Logical level: describes data stored in database, and the
relationships among the data.
type instructor = record
ID : string;
name : string;
dept_name : string;
salary : integer;
end;
View level: application programs hide details of data types.
Views can also hide information (such as an employee’s salary)
for security purposes.
© Biplab C. Debnath CSE 301 Database Lecturer, CSE
View of Data
An architecture for a database system
© Biplab C. Debnath CSE 301 Database Lecturer, CSE
Instances and Schemas
Instance:
The collection of information stored in the database at a particular moment is
called an instance of the database.
Schemas:
The overall design of the database is called the database schema.
Physical Internal Schema:
The physical schema, describes the physical storage structure of the database.
Internal level is concerned with the following activities :
Storage space allocation for data and storage.
Record descriptions for storage with stored size for data items.
Record Placement.
Data compression and data encryption techniques.
© Biplab C. Debnath CSE 301 Database Lecturer, CSE
The conceptual or logical schema :
Logical schema or logical schema: The logical schema describes
the structure of the whole database for a community of users. The
conceptual schema describes the entities, data types, relationships, user
operations and constraints and hides the details of physical storage
structure.
The conceptual level is concerned with the following activities :
All entities, their attributes and their relationships.
Constraint on the data.
Semantic information about the data.
Security information.
Checks to retain data consistency and integrity.
© Biplab C. Debnath CSE 301 Database Lecturer, CSE
External Schema:
Each external schema describes the part of the database that a
particular user group is interested in and hides the rest of the
database from that user group.
© Biplab C. Debnath CSE 301 Database Lecturer, CSE
© Biplab C. Debnath CSE 301 Database Lecturer, CSE
Instances and Schemas
© Biplab C. Debnath CSE 301 Database Lecturer, CSE
The conceptual or logical schema
© Biplab C. Debnath CSE 301 Database Lecturer, CSE
Data Models
A collection of tools for describing
– Data
– Data relationships
– Data semantics
– Data constraints
Relational model
Entity-Relationship data model (mainly for database design)
Object-based data models (Object-oriented and Object-relational)
Semi structured data model (XML)
Other older models:
– Network model
– Hierarchical model
© Biplab C. Debnath CSE 301 Database Lecturer, CSE
The Entity-Relationship Model
The E-R data model is based on a perception of a real world that consists
of a collection of basic objects called entities and relationship among these
objects.
The overall logical structure of a database can be represented graphically
by E-R diagram. The E-R diagram is build up from the following
components.
Rectangle: which represent entity sets
Ellipses: which represent attributes
Diamonds: which represent relationship among entity sets.
Lines: which link attributes to entity sets and entity sets to
relationships.
Double ellipses : which represent multivalued attributes.
Dashed Ellipses : which denote derived attributes.
Double Lines : which represent total participates of an entity
in a relationship set.
Double Rectangle : which represent weak entity sets.
© Biplab C. Debnath CSE 301 Database Lecturer, CSE
The Entity-Relationship Model
© Biplab C. Debnath CSE 301 Database Lecturer, CSE
The Entity-Relationship Model
© Biplab C. Debnath CSE 301 Database Lecturer, CSE
Relational Model
The relational model uses a collection of tables to represent both
data and the relationships among those data.
A table is a collection of rows and columns. Each column has a
unique name. Each row in the table represents a collection of related
data values. In the relational model, a row is called a tuple, a column
header is called an attribute and the table is called a relation.
© Biplab C. Debnath CSE 301 Database Lecturer, CSE
Advantages of Relational Model
Simplicity: A relational data model is even simpler than
hierarchical and network models. It frees the designers from the
actual physical data storage details, thereby allowing them to
concentrate on the logical view of the database.
Structural independence : The relational data model does not
depend on the navigational data access system. Changes in the
database structure do not affect the data access.
Ease of design, implementation, maintenance and uses.
Flexible and powerful query capability.
© Biplab C. Debnath CSE 301 Database Lecturer, CSE
Disadvantages of Relational Model
Hardware overheads: The relational data models need more
powerful computing hardware and data storage devices to perform
RDBMS-assigned tasks.
Easy to design capability leading to bad design.
© Biplab C. Debnath CSE 301 Database Lecturer, CSE
A Sample Relational Database
© Biplab C. Debnath CSE 301 Database Lecturer, CSE
TYPES OF DATABASE SYSTEMS
The DMBS can be classified according to the number of users, the
database site locations.
On the basis of the number of users :
Single-user DBMS
Multi-user DBMS
On the basis of the site location :
Centralized DBMS
Distributed DBMS
Parallel DBMS
Client/Server DBMS
© Biplab C. Debnath CSE 301 Database Lecturer, CSE
Centralized Database System
The centralized database system consists of a single processor
together with its associated data storage devices and other
peripherals. It is physically confined to a single location. The
management of the system and its data are controlled centrally form
anyone or central site.
A DBMS is centralized if the data is stored at a single computer site. A
centralized DBMS can support multiple users, but the DBMS and the
database themselves reside totally at a single computer site.
© Biplab C. Debnath CSE 301 Database Lecturer, CSE
Centralized Database System
© Biplab C. Debnath CSE 301 Database Lecturer, CSE
Distributed Database System
A distributed database is a collection of multiple logically interrelated
database distributed over a Computer Network.
A distributed database management system is a software system that manages
a distributed database while making the distribution transparent to the user.
In distributed database system, data is distributed across a variety of different
databases.
These are managed by a variety of different DBMS software's running on a
variety of different computing machines supported by a variety of different
operating systems. These machines are distributed geographically and
connected together by a variety of communication networks. In distributed
database system, one application can operate on data that is distributed
geographically on different machines.
© Biplab C. Debnath CSE 301 Database Lecturer, CSE
Distributed Database System
© Biplab C. Debnath CSE 301 Database Lecturer, CSE
Parallel Database System
Parallel database systems architecture consists of a multiple CPUs and data
storage disks in parallel. Hence, they improve processing and input/output
speeds. Parallel database systems are used in the applications that have to
query extremely large databases or that have to process an extremely large
number of transactions per second.
Several different architectures can be used for parallel database systems,
which are as follows:
Shared Memory: All the processors share a common memory.
Shared data storage disk: All the processors share a common set of disks.
Shared disk systems are sometimes called clusters.
Independent Resources : The processors share neither a common memory
nor common disk.
Hierarchical: This model is a hybrid of the preceding three architectures.
© Biplab C. Debnath CSE 301 Database Lecturer, CSE
Parallel Database System
© Biplab C. Debnath CSE 301 Database Lecturer, CSE
Parallel Database System
© Biplab C. Debnath CSE 301 Database Lecturer, CSE
Parallel Database System
© Biplab C. Debnath CSE 301 Database Lecturer, CSE
Client/Server Database System
Client/Server architecture of database system has two logical
components namely client and server. Clients are generally personal
computer or workstations whereas server is large workstations.
The applications and tools of DBMS run on one or more client
platforms, while the DBMS software reside on the sever. The server
computer is called backend and the client's computer is called
frontend.
These server and client computers are connected via a computer
network. The applications and tools act as clients of the DBMS,
making requests for its services.
© Biplab C. Debnath CSE 301 Database Lecturer, CSE
Client/Server Database System
© Biplab C. Debnath CSE 301 Database Lecturer, CSE
Advantages of Client/Server Database System
1. Client/server environment facilitates in more productive work by
the users and making better use of existing data.
2. Client/server database system is more flexible as compared to the
centralized system.
3. A single database (on server) can be shared across several distinct
client (application) systems.
4. Client/server architecture provide a better DBMS performance.
5. Client/server system has less expensive platforms to support
applications that had previously been running only on mainframe
computers.
© Biplab C. Debnath CSE 301 Database Lecturer, CSE
Disadvantages of Client/Server Database System
1. Labor or programming cost is high in client/server environments,
particularly in initial phases.
2. There is a lack of management tools for performance monitoring
and tuning and security control, for the DBMS, client and
operating systems and networking environments.
© Biplab C. Debnath CSE 301 Database Lecturer, CSE
What you have learn from this
lecture?
Discuss with your Learning Partner.
© Biplab C. Debnath CSE 301 Database Lecturer, CSE
Exercise: Sample Question
© Biplab C. Debnath CSE 301 Database Lecturer, CSE