0% found this document useful (0 votes)
23 views68 pages

Dbms Chapter 1 (One)

The document provides an introduction to databases, explaining their definition, properties, and the role of Database Management Systems (DBMS) in managing data. It discusses various data management approaches, including manual, file-based, and database approaches, highlighting the limitations of manual and file-based systems while emphasizing the advantages of a centralized database system. Additionally, it addresses the components of a database system environment, including hardware, software, people, procedures, and data.

Uploaded by

hirpaadugna1
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)
23 views68 pages

Dbms Chapter 1 (One)

The document provides an introduction to databases, explaining their definition, properties, and the role of Database Management Systems (DBMS) in managing data. It discusses various data management approaches, including manual, file-based, and database approaches, highlighting the limitations of manual and file-based systems while emphasizing the advantages of a centralized database system. Additionally, it addresses the components of a database system environment, including hardware, software, people, procedures, and data.

Uploaded by

hirpaadugna1
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/ 68

CHAPTER ONE

INTRODUCTION TO DATABASE

1
Introduction
 A database is a collection of related data.
 By data, we mean known facts that can be recorded and that have
implicit meaning.
 For example, consider the names, telephone numbers, and
addresses of the people you know.
 You may have recorded this data in an indexed address book or you
may have stored it on a hard drive, using a personal computer and
software such as Microsoft Access or Excel.
 This collection of related data with an implicit meaning is a
database.
 A database has the following implicit properties:
 A database represents some aspect of the real world, sometimes
called the miniworld or the universe of discourse (UoD).
 Changes to the miniworld are reflected in the database.
2
 A database is a logically coherent collection of data with some
inherent meaning.
 A random assortment of data cannot correctly be referred to as a
database.
 A database is designed, built, and populated with data for a
specific purpose.
 It has an intended group of users and some preconceived
applications in which these users are interested.
 A database may be generated and maintained manually or it may
be computerized.
 For example, a library card catalog is a database that may be
created and maintained manually.
 A computerized database may be created and maintained either by
a group of application programs written specifically for that task
or by a database management system.

3
DBMS (Database Management System)
 A Database Management System (DBMS):
 is a software package designed to store and manage databases.
 is a collection of programs that enables users to create and
maintain a database.
 is a general-purpose software system that facilitates the processes of
defining, constructing, manipulating, and sharing databases among
various users and applications.
 Example: Access, My-SQL, SQL, Oracle etc.
 The DBMS also protect the database and maintaining it over a long
period of time.
 Protection includes system protection against hardware or software
malfunction (or crashes) and security protection against
unauthorized or malicious access.

4
 A typical large database may have a life cycle of many years, so the
DBMS must be able to maintain the database system by allowing
the system to evolve as requirements change over time.
 It is not absolutely necessary to use general-purpose DBMS
software to implement a computerized database.
 We could write our own set of programs to create and maintain the
database, in effect creating our own special-purpose DBMS
software
 In either case whether we use a general-purpose DBMS or not—we
usually have to deploy a considerable amount of complex software.
 In fact, most DBMSs are very complex software systems.
 The database and DBMS software together a Database System.
 The DB Application is simply a program that interacts with the DB
at some point in its execution.

5
 A simplified Database System Environment. 6
Data Management Approaches
 Data Management (keeping your data records)can be
done:
 Manual Approach
 File-Based Approach
 Database Approach

Currently, all methods of data handling are in use to some


extent.

7
1. Manual File Handling Systems
 The primitive and traditional way of information handling
where cards and papers are used for the purpose. This approach:
 requires intensive human labor
 events and objects are written on files (paper)
 files are labeled and stored in one or more cabinets.
 The cabinets could be kept in safe places for security purpose.
 Insertion and retrieval is done by searching first for the right
cabinet then for the right file, then the information.
 One could have indexing system to facilitate access to the
data.

8
 Example , Personal Calendar
 We might start by building a file with the following
structure:

What Day Time with_whom Where

Lunch 10/24 1pm Abebe Bole


CS123 10/25 9am Seble Room 234
Shop 10/26 9am Ayele Piassa
Dinner 10/26 6PM Elfinesh Café

 This calendar is easy to deal with.

9
 Let us also build our address book
– Abebe A. 0911164743
– Seble K. 0912150844
– Ayele L. 0913170841
– Elfinesh W. 0911169673
– Ermias H. 0912151043
– Worku A. 0911199904
– Worku D. 0912620410
– Abebe D. 0914556768

10
Limitations of Manual File Handling
A) Problem of Data Organization
 Suppose we want to cancel one of our appointments.
 Two conceptual “entities” -- address and calendar -- with
a relationship between them, linking people in the calendar
to their contact information.
B) Problem of Efficiency
 Size of your personal address book is probably less than one
hundred entries, but there are things we'd like to do quickly and
efficiently.
 “Give me all appointments on 10/28”
 “When am I next meeting Dr. Dawit?”
 What would happen if you were using a business calendar
with hundreds of thousands of entries?
11
C) Prone to error
D) Difficult to update, retrieve, integrate
E) You have the data but it is difficult to compile the
information
F) Significant amount of duplication of data
G) Cross referencing is difficult
 What is the solution to overcome the problems or difficulties
inherited in the Manual File Handling Approaches:
 Two computerized approaches evolved to overcome this
limitations
 File Based Approach  Decentralised
 Database Approach Centralised

12
2. File-Based Approach
File based systems were an early attempt to computerize
the manual filing system.
 This approach is a decentralized computerized data
handling method - to develop a program or a number of
programs for each different application.
 Since every application defines and manages its own
data, the system is subjected to serious data duplication
problem

13
Limitations of File-Based systems
 Data Redundancy (Duplication of data)
– Same data is held by different programs
– Wasted space (Uncontrolled duplication of data)
 Separation and isolation of data
– Each program maintains its own set of data. Users of one program may
be unaware of potentially useful data held by other programs.
– Limited data sharing
– Special codes for different queries
 Data Inconsistency and confusion
Eg. Consider an organization
• Personnel Department stores details relating to each member.
• Payroll Department stores salaries of each staff
 There are potentially different values and/or different formats for the same
item.
 Consider the duplication of data between the payroll and personnel
departments.
 If an employee moves house and the change of address is communicated
only to personnel and not to payroll, the person’s pay slip will be sent to
14
the
wrong address.
 Data Dependence
 File structure is defined in the program code and is dependent
on the application programming language.
 Each application program must have its own processing
routines for reading, inserting, updating and deleting data.
 Incompatible file formats (Lack of Data Sharing and
Availability)
 Programs are written in different languages, and so cannot
easily access each others files.
• Eg. personnel writes in C
payroll writes in COBOL
 Suppose payroll wants to know when a certain employee will
be on pension.
 It is difficult to share this information unless we have another
application programmer to write software to convert the files to
some common format.
15
 Poor Security and Administration
 Unauthorized people may change the data.
 Update Anomalies
1) Modification Anomalies:
 A problem experienced when one or more data value is
modified on one application program but not one others
containing the same data set.
2) Deletion Anomalies:
 A problem encountered where one record set is deleted from
one application but remain untouched in other application
programs.
3) Insertion Anomalies:
 A problem experienced whenever there is a new data item to
be recorded, and the recording is not made in all the
applications.

16
3. Database Approach
 The limitation of the file based can be attributed to two
factors:
 Definition of data is embedded in the application
programs, rather than being stored separately and
independently.
 There is no control over the access and manipulation of
data beyond that imposed by the application programs.
 To become more effective, a new approach was required by
the name Database Approach.
 What emerged were the database and database
management systems.
 A single repository of data is maintained

17
 A Database is shared collection of logically related data
designed to meet the information needs of an organization-
(Centralized System).
 Logically related data comprises entities, attributes, and
relationships of an organization's information.
 System Catalog (Data Dictionary or Metadata) provides the
description of the data to enable program–data independence.
 The database contains not only the database itself but also a
complete definition or description of the database.
 This definition is stored in the system catalog, which contains
information such as the structure of each file, type and storage
format of each data item and various constraints on the data..
 The information stored is called metadata and it describes the
structure of the primary database.

18
Advantages of Database Systems
 Data can be shared: two or more users can access and use same
data instead of storing data in redundant manner for each user
 Improved Data Accessibility - By using structured query
languages, the users can easily access data without programming
experience.
 Redundancy can be reduced: Isolated data is integrated in
database to decrease the redundant data stored at different
applications
 Quality data can be maintained: the different integrity
constraints in the database approach will maintain the quality
leading to better decision making.
 Inconsistency can be avoided: controlled data redundancy will
avoid inconsistency of the data in the database to some extent.
 Transaction support can be provided: basic demands of any
transaction support systems are implanted in a full scale DBMS.
 Integrity can be maintained: Data at different applications will be
integrated together with additional constraints to facilitate shared
data resource 19
 Security measures can be enforced: the shared data can be
secured by having different levels of clearance and other data
security mechanisms.
 Improved decision support: the database will provide
information useful for decision making
 Standards can be enforced: the different ways of using and
dealing with data by different units of the organization can be
balanced and standardized by using database approach.
 Less Labor: Unlike the other data handling methods, data
maintenance will not demand much resource
 Centralized information control: Since relevant data in the
organization will be stored at one repository, it can be
controlled and managed at the central level.
 Data Independence - Applications insulated from how data is
structured and stored

20
Limitations and Risk of DB Approach
 Although the database system yields considerable advantages
over previous data management approaches, database systems
do carry significant disadvantages. For example:
1) Increased Costs.
 Database systems require sophisticated hardware and software
and highly skilled personnel.
 The cost of maintaining the hardware, software, and
personnel required to operate and manage a database system
can be substantial.
 Training, licensing, and regulation compliance costs are often
overlooked when database systems are implemented.
2) Management Complexity.
 Database systems interface with many different technologies
and have a significant impact on a company’s resources and
culture.

21
 The changes introduced by the adoption of a database system
must be properly managed to ensure that they help advance the
company’s objectives.
 Given the fact that database systems hold crucial company data
that are accessed from multiple sources, security issues must be
assessed constantly.
3) Maintaining Currency
 To maximize the efficiency of the database system, you must
keep your system current.
 Therefore, you must perform frequent updates and apply the
latest patches and security measures to all components.
 Because database technology advances rapidly, personnel
training costs tend to be significant.
4) Vendor Dependence
 Given the heavy investment in technology and personnel
training, companies might be reluctant to change database
vendors.
22
 As a consequence, vendors are less likely to offer pricing point
advantages to existing customers, and those customers might
be limited in their choice of database system components.
5) Frequent Upgrade/Replacement Cycles
 DBMS vendors frequently upgrade their products by adding
new functionality.
 Such new features often come bundled in new upgrade
versions of the software.
 Some of these versions require hardware upgrades.
 Not only do the upgrades themselves cost money, but it also
costs money to train database users and administrators to
properly use and manage the new features.

23
Database System Environment
 The term database system refers to an organization of
components that define and regulate the collection, storage,
management, and use of data within a database environment.
 From a general management point of view, the database system
is composed of the five major parts: hardware, software,
people, procedures, and data.

24
1) Hardware
 Hardware refers to all of the system’s physical devices; for
example, computers (PCs, workstations, servers, and
supercomputers), storage devices, printers, network devices
(hubs, switches, routers, fiber optics), and other devices
(automated teller machines, ID readers, and so on).
2) Software
 Although the most readily identified software is the DBMS
itself, to make the database system function fully, three types of
software are needed: operating system software, DBMS
software, and application programs and utilities.
 Operating system software manages all hardware components
and makes it possible for all other software to run on the
computers.
 Examples of operating system software include Microsoft
Windows, Linux, Mac OS, UNIX, and MVS.
25
 DBMS software manages the database within the database
system.
 Some examples of DBMS software include Microsoft’s SQL
Server, Oracle Corporation’s Oracle, Sun’s MySQL, and
IBM’s DB2.
 Application programs and utility software are used to access
and manipulate data in the DBMS and to manage the
computer environment in which data access and manipulation
take place.
 Application programs are most commonly used to access data
found within the database to generate reports, tabulations,
and other information to facilitate decision making.
 Utilities are the software tools used to help manage the
database system’s computer components.

26
 For example, all of the major DBMS vendors now provide
graphical user interfaces (GUIs) to help create database
structures, control database access, and monitor database
operations.
3) People
 This component includes all users of the database system.
 On the basis of primary job functions, five types of users can
be identified in a database system:
 System Administrators
 Database Administrators
 Database Designers
 System Analysts and Programmers
 End Users
 Each user type, described below, performs both unique and
complementary functions.

27
3.1 System Administrators oversee the database system’s general
operations.
3.2 Database Administrators, also known as DBAs, manage the
DBMS and ensure that the database is functioning properly.
In a database environment, the primary resource is the
database itself, and the secondary resource is the DBMS and
related software.
 Administering these resources is the responsibility of the
database administrator (DBA).
The DBA is responsible for:
 Authorizing access to the database,
 Coordinating and monitoring its use, and
 Acquiring software and hardware resources as needed.
The DBA is accountable for problems such as
 Security breaches and poor system response time

28
3.3 Database Designers design the database structure.
 They are, in effect, the database architects.
 If the database design is poor, even the best application
programmers and the most dedicated DBAs cannot produce a
useful database environment.
 Because organizations strive to optimize their data resources,
the database designer’s job description has expanded to cover
new dimensions and growing responsibilities.
A) Logical Designers
 Concerned with identifying the data, entities and attributes,
relationships and constraints
 Need a complete knowledge of the organization's data and
business rules
B) Physical Designers
 Decide how the logical database design is to be physically
realized
29
 Map the logical database design into a set of tables
 Select specific storage structures and access methods
 Design security measures
3.4 System Analysts and Programmers design and implement the
application programs.
 Design and create the data entry screens, reports, and
procedures through which end users access and manipulate
the database’s data.
 For example work based on the requirement specified by the
system analyst.
 Each program contains statements that request the DBMS to
perform some operation on the database – retrieving,
inserting, updating and deleting data
3.5 End users are the people who use the application programs to
run the organization’s daily operations.
30
 For example, salesclerks, supervisors, managers, and directors
are all classified as end users.
 High-level end users employ the information obtained from the
database to make tactical and strategic business decisions.
 End users are differentiated by the way they expect to interact
with the system.
 End Users can be either Native users or Sophisticated users
 Naive Users
 Unaware of the DBMS and the DB
 Depend on the simplicity of the GUI
 Sophisticated Users
 Familiar with the structure of the database and the facilities
of the DBMS
 May use high-level query languages (SQL) to perform the
required operation
 May even write application program for their own use

31
4) Procedures
 Procedures are the instructions and rules that govern the
design and use of the database system.
Procedures are a critical, although occasionally forgotten,
component of the system.
Procedures play an important role in a company because
they enforce the standards by which business is conducted
within the organization and with customers.
 Procedures are also used to ensure that there is an organized
way to monitor and audit both the data that enter the
database and the information that is generated through the
use of those data.

32
5. Data
 The word data covers the collection of facts stored in
the database.
Because data are the raw material from which
information is generated, the determination of what data
are to be entered into the database and how those data
are to be organized is a vital part of the database
designer’s job.

33
Database Environment
 A major aim of DB is to provide users with an abstract view of
data, hiding certain details of how data is stored and
manipulated.
 Since DB is a shared resources each users may require a
different view of the data.
 To satisfy these needs, the architecture of most commercial
DBMSs available today is based on the so-called ANSI-
SPARC Architecture.(America National Standard Institution
Standard Planning and Requirement committee).
 An early proposal for a standard terminology and general
architecture for DB was produced in 1971 by DBTG
(Database task force).
– Two – level architecture (Schema, subschema)
34
 The ANSI/SPARC produced a similar terminology and
architecture in 1975.
 But a three level approach (external, conceptual, internal)
 External is the way users are perceiving the data.
 Internal is the way DBMS and OS perceiving the data.
 Conceptual level provide the mapping and the desired
independence b/n external and internal level.

35
Below the internal level there is physical level that must
be managed by the OS under the direction of DBMS.

36
The three Level ANSI-SPARC
 The objective of the 3 level Architecture is to separate each user’s view of
the database from the way the database is physically represented.
 What are the reasons for the desirability of the separation?
 Each user should be able to access the same data, but have a different
customized view of the data.
 Since a database is a shared resource, each user may require a
different view of the data held in the database.
 Each user should be able to change the way he or she views the data,
with out affecting other users.
 Users should not have to deal directly with physical database storage
details.
 The DBA should be able to change the database storage structures without
37
affecting the user’s views.
A) External level :
 users’ view of the database has an external schema that:
 describes that part of the database that is relevant to each user.
 It includes a number of external schemas or user views.
 Each of these views or external schemas describes a part of the
database of interest to a particular group of users.
 This allows the users to see only those parts of the database that
are relevant to them.
 For example, one user may view dates in the form (day,month,
year), while another may view dates as (year,month,day), some
views may include derived or calculated data, data not actually
stored in the database,
 Entities, attributes or relationships that are not of interest to the
users may still be represented in the database, but the users will be
unaware of them.

38
B) Conceptual level
 The community view of the database, has conceptual schema:
 describes what data is stored in the database and the
relationships among the data.
 The conceptual level represents:
 All entities, attributes and their relationships,
 The constraints on the data,
 semantic information about the data;
 Security and integrity information.
– It is a complete view of the data requirements of the
organization.
– Any data available to a user must be contained in, or
derivable from conceptual level.

39
C) Internal level :
 describes the physical storage structure of the database in the
computer.
 It has an internal schema which defines the storage of data.
 It uses a physical data model which shows how data is organized
on the machine.
 The internal level is concerned with such things as:
 Storage space allocation for data
 Record description for storage
 Record placement
 From the three level architecture, conceptual modeling/conceptual
db design is the “heart” of the database.
 Because it is independent of target DBMS or applications
programs.
 The following figure describes clearly the three level of Database
Architecture.

40
ANSI-SPARC Architecture and Database Design
Phases

41
DBMS Functions
 A DBMS performs several important functions that guarantee
the integrity and consistency of the data in the database.
 Most of those functions are transparent to end users, and most
can be achieved only through the use of a DBMS.
 They include:
 Data Dictionary Management
 Data Storage Management
 Data Transformation and Presentation
 Security Management
 Multiuser Access Control
 Backup and Recovery Management
 Data Integrity Management
 Database Access Languages and Application Programming
Interfaces
 Database Communication Interfaces
42
1. Data Dictionary Management
 The DBMS stores definitions of the data elements and
their relationships (metadata) in a data dictionary.
 In turn, all programs that access the data in the database
work through the DBMS.
 The DBMS uses the data dictionary to look up the
required data component structures and relationships.
 Additionally, any changes made in a database structure
are automatically recorded in the data dictionary.
 In other words, the DBMS provides data abstraction, and
it removes structural and data dependence from the
system.

43
 A useful data dictionary system should store and manage the
following types of information:
 Descriptions of the schemas of the database system.
 Detailed information on physical database design, such as
storage structures, access paths, and file and record sizes.
 Descriptions of the types of database users, their
responsibilities, and their access rights.
 High-level descriptions of the database transactions and
applications and of the relationships of users to transactions.
 The relationship between database transactions and the data
items referenced by them.
 Usage statistics such as frequencies of queries and
transactions and access counts to different portions of the
database.

44
2. Data Storage Management
 The DBMS creates and manages the complex structures
required for data storage.
 A modern DBMS provides storage not only for the data, but
also for related data entry forms or screen definitions, report
definitions, data validation rules, procedural code, structures
to handle video and picture formats, and so on.
 Data storage management is also important for database
performance tuning.
 Performance tuning relates to the activities that make the
database perform more efficiently in terms of storage and
access speed.
 Although the user sees the database as a single data storage
unit, the DBMS actually stores the database in multiple
physical data files.
45
 Such data files may even be stored on different storage media.
 Therefore, the DBMS doesn’t have to wait for one disk
request to finish before the next one starts.
 In other words, the DBMS can fulfill database requests
concurrently.

46
3. Multiuser Access Control
 To provide data integrity and data consistency, the DBMS uses
sophisticated algorithms to ensure that multiple users can access
the database concurrently without compromising the integrity
of the database.
4. Backup and Recovery Management
 The DBMS provides backup and data recovery to ensure data
safety and integrity.
 Current DBMS systems provide special utilities that allow the
DBA to perform routine and special backup and restore
procedures.
 Recovery Management deals with the recovery of the database
after a failure, such as a bad sector in the disk or a power
failure.
 Such capability is critical to preserving the database’s integrity.
47
5. Data Integrity Management
 The DBMS promotes and enforces integrity rules, thus
minimizing data redundancy and maximizing data
consistency.
 The data relationships stored in the data dictionary are used to
enforce data integrity.
 Ensuring data integrity is especially important in transaction-
oriented database systems.
6. Database Access Languages and Application Programming
Interfaces
 The DBMS provides data access through a query language.
 A query language is a nonprocedural language—one that lets
the user specify what must be done without having to specify
how it is to be done.

48
 Structured Query Language (SQL) is the de facto query
language and data access standard supported by the majority of
DBMS vendors.
 The DBMS also provides application programming interfaces
to procedural languages such as COBOL, C, Java, Visual
Basic.NET, and C#.
 The DBMS also provides administrative utilities used by the
DBA and the database designer to create, implement, monitor,
and maintain the database.
7. Database Communication Interfaces
 Current-generation DBMSs accept end-user requests via
multiple, different network environments.
 For example, the DBMS might provide access to the database
via the Internet through the use of Web browsers such as
Mozilla Firefox or Microsoft Internet Explorer.
49
 In this environment, communications can be accomplished in
several ways:
 End users can generate answers to queries by filling in screen
forms through their preferred Web browser.
 The DBMS can automatically publish predefined reports on a
Website.
 The DBMS can connect to third-party systems to distribute
information via e-mail or other productivity applications.

50
Schemas, Instances and Data Models
 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.
 The following figure, shows a schema diagram for the
database.
 The diagram displays the structure of each record type but
not the actual instances of records.
 We call each object in the schema—such as STUDENT or
COURSE—a schema construct
51
Figure: Schema Diagram

52
 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 another state.
 The distinction between database schema and database state is
very important.

53
 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

54
Data Models
 is a collection of concepts that can be used to describe the
structure of a database or
 is a relatively simple representation, usually graphical, of more
complex real-world data structures.
 By structure of a database we mean the data types, relationships,
and constraints that apply to the data.
 In general terms, a model is an abstraction of a more complex
real-world object or event.
 A model’s main function is to help you understand the
complexities of the real-world environment.
 Within the database environment, a data model represents:
 data structures and their characteristics,
 relationships, constraints,
 transformations, and
 other constructs with the purpose of supporting a specific problem
domain.
55
 Note:-The terms data model and database model are
often used interchangeably.
 Data modeling is an iterative, progressive process.
 You start with a simple understanding of the problem
domain, and as your understanding of the problem
domain increases, so does the level of detail of the data
model.
 The final data model is in effect a “blueprint” containing
all the instructions to build a database that will meet all
end-user requirements.
 This blueprint is narrative and graphical in nature,
meaning that it contains both text descriptions in plain,
unambiguous language and clear, useful diagrams
depicting the main data elements.

56
 An implementation-ready data model should contain at least
the following components:
 A description of the data structure that will store the end-
user data.
 A set of enforceable rules to guarantee the integrity of the
data.
 A data manipulation methodology to support the real-world
data transformations.
 Keep in mind that a house blueprint is an abstraction; you
cannot live in the blueprint.
 Similarly, the data model is an abstraction; you cannot draw
the required data out of the data model.
 Just as you are not likely to build a good house without a
blueprint, you are equally unlikely to create a good database
without first creating an appropriate data model.

57
Categories of Data Models
 Data models can be 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.
 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.
 Concepts provided by low-level data models are generally meant for
computer specialists, not for end users.
 Between these two extremes is a class of representational (or
implementation) data models.
 This model provide concepts that may be easily understood by end users
but that are not too far removed from the way data is organized in
computer storage.
 Representational data models hide many details of data storage on disk
but can be implemented on a computer system directly.
58
 A data model is a description of the way that data is stored in
a database.
 Data model helps to understand the relationship between
entities and to create the most effective structure to hold
data.
 Data Model is a collection of tools or concepts for describing
 Data
 Data relationships
 Data semantics
 Data constraints
 The main purpose of Data Model is to represent the data in
an understandable way.
 Categories of data models include:
 Record-based
 Object-based
 Physical
59
 Record-based Data Models:
 Consist of a number of fixed format records.
 Each record type defines a fixed number of fields,
 Each field is typically of a fixed length.
Hierarchical Data Model
Network Data Model
Relational Data Model

60
1. Hierarchical Data Model
 simplest data model
 record type is referred to as node or segment
 The top node is the root node
 Nodes are arranged in a hierarchical structure as sort of
upside-down tree
 A parent node can have more than one child node
 A child node can only have one parent node
 The relationship between parent and child is one-to-many
 Relation is established by creating physical link between
stored records (each is stored with a predefined access path to
other records)
 To add new record type or relationship, the database must be
redefined and then stored in a new form.
61
ADVANTAGES of Hierarchical Data Model:
simple to construct and operate on
Corresponds to a number of natural hierarchically organized
domains - e.g., assemblies in manufacturing, personnel organization in
companies
construct using simple language- uses constructs like GET, GET
UNIQUE, GET NEXT, GET NEXT WITHIN PARENT etc.
62
DISADVANTAGES of Hierarchical Data Model:
Navigational and procedural nature of processing
Database is visualized as a linear arrangement of records
Little scope for "query optimization"
2. Network Model
 Allows record types to have more than one parent unlike
hierarchical model
 A network data models sees records as set members
 Each set has an owner and one or more members
 Allow no many to many relationship between entities
 Like hierarchical model network model is a collection of
physically linked records.
 Allow member records to have more than one owner

63
ADVANTAGES of Network Data Model:
• Able to model complex relationships and represents semantics of
add/delete on the relationships.
• Handle most situations for modeling using record types and relationship
types.
• Language is navigational- uses constructs like FIND, FIND member,
FIND owner, FIND NEXT within set, GET etc.
• Programmers can do optimal navigation through the database.
64
DISADVANTAGES of Network Data Model:
Navigational and procedural nature of processing
Database contains a complex array of pointers that thread
through a set of records.
Little scope for automated "query optimization”
3. Relational Data Model
Terminologies originates from the branch of mathematics
called set theory and relation
Can define more flexible and complex relationship
Viewed as a collection of tables called “Relations” equivalent
to collection of record types
Relation: Two dimensional table
represent information or data in the form of tables  rows and
columns

65
 A row of the table is called tuple equivalent to record
 A column of a table is called attribute equivalent to fields
 Data value is the value of the Attribute
 Records are related by the data stored jointly in the fields of
records in two tables or files.
 The related tables contain information that creates the relation
 The tables seem to be independent but are related some how.
 No physical consideration of the storage is required by the
user
 Many tables are merged together to come up with a new
virtual view of the relationship
 The rows represent records (collections of information about
separate items)
 The columns represent fields (particular attributes of a record)

66
67
END !!!

68

You might also like