0% found this document useful (0 votes)
18 views36 pages

Fundamentals of Database Systems (Cosc2071) : Chapter - 2: Database System Concepts and Architecture

Uploaded by

bekaluaddis18
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views36 pages

Fundamentals of Database Systems (Cosc2071) : Chapter - 2: Database System Concepts and Architecture

Uploaded by

bekaluaddis18
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 36

Fundamentals of Database

Systems(CoSc2071)
Chapter -2: Database System Concepts and
Architecture

12/17/2024 Fundamentals of Database Systems 1


Introduction

• The architecture of DBMS packages has evolved from the


early monolithic systems, where the whole DBMS software
package was one tightly integrated system, to the modern
DBMS packages that are modular in design, with a
client/server system architecture.
• In a basic client/server DBMS architecture, the system
functionality is distributed between two types of modules.
• A client module is typically designed so that it will run on a
user workstation or personal computer. Typically, application
programs and user interfaces that access the database run in
the client module. Hence, the client module handles user
interaction and provides the user-friendly interfaces such as
forms- or menu-based GUIs (graphical user interfaces).
• The other kind of module, called a server module, typically
handles data storage, access, search, and other functions.
12/17/2024 Fundamentals of Database Systems 2
Data Models
• One fundamental characteristic of the database approach is
that it provides some level of data abstraction.
• Data abstraction generally refers to the suppression(prevent
from being published) of details of data organization and
storage, and the highlighting of the essential features for an
improved understanding of data.
• One of the main characteristics of the database approach is to
support data abstraction so that different users can perceive
data at their preferred level of detail.
• A data model—a collection of concepts that can be used to
describe the structure of a database—provides the necessary
means to achieve this abstraction.
• By structure of a database we mean the data types,
relationships, and constraints
12/17/2024
that apply to the data.
Fundamentals of Database Systems 3
Data Models(cont..)
• Most data models also include a set of basic
operations for specifying retrievals and updates on
the database.
• Data model also include concepts to specify dynamic
aspect or behavior of a database application that
allows database designer specify a set of valid user-
defined operations like COMPUTE_GPA, which can be
applied on STUDENT object
• On the other hand, generic operations to insert,
delete, modify, or retrieve any kind of object are often
included in the basic data model operations.
• Concepts to specify behavior are fundamental to
object-oriented data
12/17/2024
models
Fundamentals of Database Systems 4
Data Models(cont..)
• A database model is essentially the architecture
that the DBMS uses to store objects within the
database and relate them to one another.
• The most prevalent of these models in the
order of their evolution are flat file, hierarchical
model, networked model, relational model,
object-oriented model, and object-relational
model

12/17/2024 Fundamentals of Database Systems 5


Data Models: flat file model
• Flat files are “ordinary” operating system files, in
that records in a file contain no information to
communicate the file structure or any relationship
among the records to the application that uses the
file.
• Any information about the structure or meaning of
the data in the file must be included in each
application that uses the file or must be known to
each human who reads the file.
• In essence, flat files are not databases at all
because they do not meet any of the criteria
previously discussed.
12/17/2024 Fundamentals of Database Systems 6
Data Models: flat file model
• Flat files are often used to store meta data(data
about data) that the database stores in its
catalog to describe the data stored in the
database and the relationships among the
data.
• The metadata for a customer, for example,
might include all the data items collected about
the customer (such as name, address, and
account status), along with the length,
minimum and maximum data values, and a
brief description of each data item.
12/17/2024 Fundamentals of Database Systems 7
Data Models: flat file model
• The worst problem with the flat file approach is
that the definition of the contents of each file
and the logic required to correlate the data
from multiple flat files must be included in
every application program that requires those
files, thus adding to the expense and
complexity of the application programs.

12/17/2024 Fundamentals of Database Systems 8


Data Models: Hierarchical Model
• In this case records are arranged in a hierarchy much like an
organization chart. Each file from the flat file system
became a record type, or node in hierarchical terminology
—but the term record is used here for simplicity.
• Records were connected using pointers that contained the
address of the related record. Pointers told the computer
system where the related record was physically located,
much as a street address directs you to a particular building
in a city, a URL directs you to a particular web page on the
Internet, or GPS coordinates point to a particular location
on the planet.
• Each pointer establishes a parent-child relationship, also
called a one-to-many relationship, in which one parent can
have many children,
12/17/2024
but each child can have only one
Fundamentals of Database Systems 9
parent.
Data Models: Hierarchical Model

12/17/2024 Fundamentals of Database Systems 10


Data Models: Hierarchical Model
• The obvious problem with the hierarchical
model is that some data does not exactly fit
this strict hierarchical structure, such as an
order that must have the customer who placed
the order as one parent and the employee who
accepted the order as another.
• The most popular hierarchical database was
Information Management System (IMS) from
IBM.

12/17/2024 Fundamentals of Database Systems 11


Data Models: Network Model
• As with the hierarchical model, record types (or
simply records) depict what would be separate
files in a flat file system, and those records are
related using one-to-many relationships, called
owner-member relationships or sets in network
model terminology.
• We’ll stick with the terms parent and child, again
for simplicity. As with the hierarchical model,
physical address pointers are used to connect
related records, and any identification of the
parent record(s) is removed from each child record
to avoid possible inconsistencies.
12/17/2024 Fundamentals of Database Systems 12
Data Models: Network Model
• The most popular database based on the network model
was the Integrated Database Management System
(IDMS), originally developed by Cullinane (later renamed
Cullinet).
• The network model provided greater flexibility, but—as is
often the case with computer systems—with a loss of
simplicity.
• In the network model contents, example, as shown in
Figure below, each parent-child relationship is depicted
with a different type of line, illustrating that each
relationship has a different name. This difference is
important because it points out the largest downside of
the network model— complexity.
12/17/2024 Fundamentals of Database Systems 13
Data Models: Network Model

12/17/2024 Fundamentals of Database Systems 14


Data Models: Relational Model
• In addition to complexity, the network and
hierarchical database models share another
common problem—they are inflexible.
• The relational model allows users to relate
records as needed rather than as predefined when
the records are first stored in the database.
• Moreover, the relational model is constructed such
that queries work with sets of data (for example,
all the customers who have an outstanding
balance) rather than one record at a time, as with
the network and hierarchical models.
12/17/2024 Fundamentals of Database Systems 15
Data Models: Relational Model
• The relational model presents data in familiar two-
dimensional tables, much like a spreadsheet does.
Unlike a spreadsheet, the data is not necessarily
stored in tabular form and the model also permits
combining (joining in relational terminology)
tables to form views, which are also presented as
two-dimensional tables.
• Instead of linking related records together with
physical address pointers, as is done in the
hierarchical and network models, a common data
item is stored in each table, just as was done in flat
file systems.
12/17/2024 Fundamentals of Database Systems 16
Data Models: Relational Model
• Relational data model is depicted using entity
relationship diagram(ERD)

• Reading assignment(object-oriented model&


object relational model)
12/17/2024 Fundamentals of Database Systems 17
Categories of Data Models
• Many data models have been proposed, which we can
categorize according to the types of concepts they use to
describe the database structure.
• High-level or conceptual data models provide concepts
that are close to the way many users perceive data,
whereas
• low-level or physical data models provide concepts that
describe the details of how data is stored on the
computer storage media, typically magnetic disks.
• Between these two extremes is a class of
representational (or implementation) data models,
which provide concepts that may be easily understood by
end users but that are not too far removed from the way
data is organized inFundamentals
12/17/2024
computer storage.
of Database Systems 18
Categories of Data Models
• Conceptual data models use concepts such as
entities, attributes, and relationships.
• An entity represents a real-world object or concept,
such as an employee or a project from the
miniworld that is described in the database
• An attribute represents some property of interest
that further describes an entity, such as the
employee’s name or salary.
• A relationship among two or more entities
represents an association among the entities, for
example, a works-on relationship between an
employee and a project
12/17/2024 Fundamentals of Database Systems 19
Categories of Data Models
• Representational data models represent data by using
record structures and hence are sometimes called record-
based data models.
• Representational or implementation data models are the
models used most frequently in traditional commercial
DBMSs. These include the widely used relational data
model, as well as the so-called legacy data models—the
network and hierarchical models—that have been widely
used in the past.
• We can regard the object data model as an example of a
new family of higher-level implementation data models
that are closer to conceptual data models. A standard for
object databases called the ODMG object model has been
proposed by the Object
12/17/2024
Data Management Group (ODMG).
Fundamentals of Database Systems 20
Categories of Data Models
• Physical data models describe how data is stored
as files in the computer by representing
information such as record formats, record
orderings, and access paths. An access path is a
structure that makes the search for particular
database records efficient.
• An index is an example of an access path that
allows direct access to data using an index term or
a keyword. It is similar to the index at the end of
this book, except that it may be organized in a
linear, hierarchical (tree-structured),or some other
fashion.
12/17/2024 Fundamentals of Database Systems 21
Schemas, Instances, and Database State
• In any data model, it is important to distinguish
between the description of the database and
the database itself. The description of a
database is called the database schema, which
is specified during database design and is not
expected to change frequently.
• Most data models have certain conventions for
displaying schemas as diagrams. A displayed
schema is called a schema diagram.

12/17/2024 Fundamentals of Database Systems 22


Schemas, Instances, and Database State
• We call each object in the schema—such as
STUDENT or COURSE—a schema construct.

12/17/2024 Fundamentals of Database Systems 23


Schemas, Instances, and Database State
• The data in the database at a particular moment in
time is called a database state or snapshot. It is also
called the current set of occurrences or instances in
the database.
• In a given database state, each schema construct has
its own current set of instances; for example, the
STUDENT construct will contain the set of individual
student entities (records) as its instances.
• Many database states can be constructed to
correspond to a particular database schema.
• Every time we insert or delete a record or change the
value of a data item in a record, we change one state
of the database into
12/17/2024
another state.
Fundamentals of Database Systems 24
Schemas, Instances, and Database State
• The distinction between database schema and database
state is very important.
• When we define a new database, we specify its
database schema only to the DBMS. At this point, the
corresponding database state is the empty state with no
data. We get the initial state of the database when the
database is first populated or loaded with the initial
data. From then on, every time an update operation is
applied to the database, we get another database state.
At any point in time, the database has a current state.
• The DBMS is partly responsible for ensuring that every
state of the database is a valid state—that is, a state
that satisfies the structure and constraints specified in
the schema.
12/17/2024 Fundamentals of Database Systems 25
Schemas, Instances, and Database State
• The DBMS stores the descriptions of the schema
constructs and constraints—also called the meta-data—in
the DBMS catalog so that DBMS software can refer to the
schema whenever it needs to.
• The schema is sometimes called the intension, and a
database state is called an extension of the schema.
• Although, as mentioned earlier, the schema is not
supposed to change frequently, it is not uncommon that
changes occasionally need to be applied to the schema as
the application requirements change. For example, we
may decide that another data item needs to be stored for
each record in a file, such as adding the Date_of_birth to
the STUDENT schema. This is known as schema
evolution.
12/17/2024 Fundamentals of Database Systems 26
Three-Schema Architecture and Data
Independence
• The goal of the three-schema architecture, is to
separate the user applications from the physical
database. In this architecture, schemas can be
defined at the following three levels:
• The internal level has an internal schema,
which describes the physical storage structure
of the database. The internal schema uses a
physical data model and describes the complete
details of data storage and access paths for the
database.
12/17/2024 Fundamentals of Database Systems 27
Three-Schema Architecture and Data
Independence
• The conceptual level has a conceptual schema, which
describes the structure of the whole database for a
community of users. The conceptual schema hides the
details of physical storage structures and concentrates on
describing entities, data types, relationships, user
operations, and constraints.
• Usually, a representational data model is used to describe
the conceptual schema when a database system is
implemented.
• This implementation conceptual schema is often based
on a conceptual schema design in a high-level data
model.
12/17/2024 Fundamentals of Database Systems 28
Three-Schema Architecture and Data
Independence
• The external or view level includes a number of
external schemas or user views. 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.
• As in the previous level, each external schema is
typically implemented using a representational
data model, possibly based on an external
schema design in a high-level data model.

12/17/2024 Fundamentals of Database Systems 29


Three-Schema Architecture and Data
Independence

12/17/2024 Fundamentals of Database Systems 30


Three-Schema Architecture and Data
Independence
• Notice that the three schemas are only descriptions of
data; the stored data that actually exists is at the physical
level only.
• In a DBMS based on the three-schema architecture, each
user group refers to its own external schema. Hence, the
DBMS must transform a request specified on an external
schema into a request against the conceptual schema, and
then into a request on the internal schema for processing
over the stored database. If the request is a database
retrieval, the data extracted from the stored database
must be reformatted to match the user’s external view.
• The processes of transforming requests and results
between levels are Fundamentals
12/17/2024
called ofmappings.
Database Systems 31
Data Independence
• The three-schema architecture can be used to
further explain the concept of data
independence, which can be defined as the
capacity to change the schema at one level of a
database system without having to change the
schema at the next higher level.
• We can define two types of data independence:
– Logical data independence and
– Physical data independence

12/17/2024 Fundamentals of Database Systems 32


Data Independence(cont..)
• Logical data independence is the capacity to
change the conceptual schema without having
to change external schemas or application
programs. We may change the conceptual
schema to expand the database (by adding a
record type or data item),to change
constraints, or to reduce the database(by
removing a record type or data item).In the last
case, external schemas that refer only to the
remaining data should not be affected.
12/17/2024 Fundamentals of Database Systems 33
Data Independence(cont..)
• Physical data independence is the capacity to change the
internal schema without having to change the conceptual
schema. Hence, the external schemas need not be changed as
well.
• Changes to the internal schema may be needed because some
physical files were reorganized—for example, by creating
additional access structures—to improve the performance of
retrieval or update. If the same data as before remains in the
database, we should not have to change the conceptual
schema.
• For example, providing an access path to improve retrieval
speed of section records by semester and year should not
require a query such as list all sections offered in fall 2008 to
be changed, although the query would be executed more
efficiently by the DBMS
12/17/2024 by utilizing
Fundamentals the new access path. 34
of Database Systems
Thank you!!

12/17/2024 Fundamentals of Database Systems 35


Quiz-(15 min)
1. What is the difference between
data,DB,DBMS,DBS?
2. What are the two type of modules? Explain
them.
3. What is the difference between file system and
database system?
4. What is the role of DBA,database desinger and
system analyst?

12/17/2024 Fundamentals of Database Systems 36

You might also like