Database System Concepts and Architecture
Database System Concepts and Architecture
1.1 Introduction
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.
Data Model Structure and Constraints
• Constructs are used to define the database structure
• Constructs typically include elements (and their data types) as well as groups
of elements (e.g. entity, record, table), and relationships among such groups
• Constraints specify some restrictions on valid data; these
constraints must be enforced at all times
Provide concepts that fall between the above two, used by many commercial
DBMS implementations (e.g. relational data models used in many commercial
systems).
1.2 Classification of Data Models
Data Models
When the database is organized in some fixed format of records of several than the
model is called record-based data model. A fixed number of fields, or attributes in
each record type and each field is usually of a fixed length. The three most popular
record-based data models are,
➢ Hierarchical Approach
• It represents relationship between two entities by means of links.
• The data is represented by a simple tree structure
• Data storage is in the form of a parent child relationship
• The origin of a data tree is root
• A tree can grow in size like a generations i.e father becomes
grandfather and so on..
• The last node in the tree is called root node
• This model supports one to many relationships
Problems with hierarchical model
• Redundancy, Complexity, many to many Relationship cannot be
represented
• Network Approach
o In the network data model, data model data are represented by
collections of records.
o Relationships among data are represented by links.
o In this data model, graph data structure is used. It permits a record to
have more than one parent. i.e many to many relationships can be
established.
o This approach uses pointer to locate the record.
Problems with network model
o Redundancy can be eliminated, complexity increases as the database
grows up
➢ Relational Approach
o The relational data model uses tables to represent the data and the
relationships among these data.
o Each table has multiple columns(attributes) and each column is
identified by a unique name.
The entity relational data model based on the perception of the real world that
consist of a collection of basics objects and relationships between them. It is
an object-based logical model. It is also high-level data model.
• Database Schema
➢ The description of a database.
Schema Diagram
Student
regno name dob Age class
Student
12345 Asha 11/06/1978 42 V Sem CSE
Three-Schema Architecture
Defines DBMS schemas at three levels
▪ Internal schema at the internal level to describe physical storage structures
and access paths (e.g indexes). Typically uses a physical data model.
▪ Conceptual schema at the conceptual level to describe the structure and
constraints for the whole database for a community of users. Uses a
conceptual or an implementation data model.
▪ External schemas at the external level to describe thevarious user views.
Usually uses the same data model as the conceptual schema.
Mappings among schema levels are needed to transform requests and data.
Programs refer to an external schema, and are mapped by the DBMS to the internal
schema for execution. Data extracted from the internal DBMS level is reformatted to
match the user’s external view (e.g. formatting the results of an SQL query for display
in a Web page)
Types of DML
High Level or Non-procedural Language:
▪ For example, the SQL relational language
▪ Are “set”-oriented and specify what data to retrieve
rather than how to retrieve it.
▪ Also called declarative languages.
Other Tools
Data dictionary / repository
▪ Used to store schema descriptions and other information such as design
decisions, application program descriptions, user information, usage
standards, etc.
▪ Active data dictionary is accessed by DBMS software and users/DBA.
▪ Passive data dictionary is accessed by users/DBA only.
Clients
▪ Provide appropriate interfaces through a client
software module to access and utilize the various
server resources.
▪ Clients may be diskless machines or PCs or Workstations with disks with only
the client software installed.
▪ Connected to the servers via some form of a network.
o (LAN: local area network, wireless network, etc.)
DBMS Server
▪ Provides database query and transaction services to the clients
▪ Relational DBMS servers are often called SQL servers, query servers, or
transaction servers
▪ Applications running on clients utilize an Application Program Interface
(API) to access server databases via standard interface such as:
o ODBC: Open Database Connectivity standard
o JDBC: for Java programming access
▪ Client and server must install appropriate client module
and server module software for ODBC or JDBC
▪ Other classifications
o Single-user (typically used with personal computers) vs. multi-user
(most DBMSs).
o Centralized (uses a single computer with one database) vs. distributed
(uses multiple computers, multiple databases)
Variations of Distributed DBMSs (DDBMSs)
▪ Homogeneous DDBMS
▪ Heterogeneous DDBMS
▪ Federated or Multidatabase Systems
▪ Distributed Database Systems have now come to be known as client-server
based database systems because:
o They do not support a totally distributed environment, but rather a set of
database servers supporting a set of clients.
Cost considerations for DBMSs
▪ Cost Range: from free open-source systems to configurations costing millions
of dollars
▪ Examples of free relational DBMSs: MySQL, PostgreSQL, others
▪ Commercial DBMS offer additional specialized modules,
e.g. time-series module, spatial data module, document module, XML module
o These offer additional specialized functionality when purchased
separately
o Sometimes called cartridges (e.g., in Oracle) or blades
▪ Different licensing options: site license, maximum number of concurrent users
(seat license), single user, etc.
1.8 History of Data Models
▪ Network Model
▪ Hierarchical Model
▪ Relational Model
▪ Object-oriented Data Models
▪ Object-Relational Models
Network Model
▪ The first network DBMS was implemented by Honeywell in 1964-65 (IDS
System).
Advantages
▪ Network Model is able to model complex relationships and represents
semantics of add/delete on the relationships .
▪ Can 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.
o Programmers can do optimal navigation through the database.
Disadvantages:
▪ Navigational and procedural nature of processing
▪ Database contains a complex array of pointers that thread through a set of
records.
o Little scope for automated “query optimization”
Object-Relational Models
▪ Most Recent Trend. Started with Informix Universal Server.
▪ Relational systems incorporate concepts from object databases leading to
object-relational.
▪ Exemplified in the latest versions of Oracle-10i, DB2, and SQL Server and
other DBMSs.
▪ Standards included in SQL-99 and expected to be enhanced in future SQL
standards.
Summary
Data Models and Their Categories
History of Data Models
Schemas, Instances, and States
Three-Schema Architecture
Data Independence
DBMS Languages and Interfaces
Database System Utilities and Tools
Centralized and Client-Server Architectures
Classification of DBMSs
History of Data Models