DBMS Unit 1
DBMS Unit 1
Only one user can access data at Multiple users can access
User Access a time. data at a time.
Basics File System DBMS
The description of various types of data models in dbms is given with suitable examples.
1. Hierarchical Model
The hierarchical model is one of the types among many data models in dbms used in early
database systems that organize data into a tree-like structure, similar to a computer file
system. In a hierarchical model, data is organized into a series of levels or layers, with each
layer representing a particular type of data. The data is stored as records, which are linked
together through parent-child relationships.
In a hierarchical model, each record has only one parent, except for the root record, which
cannot have any parent being alone at the top. Child records can have multiple parents, but
they are typically organized in a way that ensures a strict hierarchy is maintained. For
example, in a company organizational chart, the CEO might be at the top of the hierarchy,
followed by senior executives, managers, and individual contributors.
This structure is efficient for representing one-to-many relationships, where a single parent
record can have many child records, but it can be less flexible than other data models for
more complex relationships.
2. Network Model
It is another of the many types of data models in dbms. It was introduced in the 1960s by
the Database Task Group. Being one of the early data models in dbms, it organizes data
into a more flexible, complex structure than the hierarchical model. In a network model, data
is organized into a graph-like structure, where each record can have multiple parent or child
records, forming a network of relationships.
In a network model, records are organized into sets called "types," which are similar to
tables in the relational model. Each type can have multiple records, and each record can
have multiple "owners" and "members." Owners are the parent records that own or connect
to the child records (members) through "sets" that define the relationships between records.
The network model is based on the concept of many-to-many relationships, where each
record can have multiple parents and children, allowing for more complex and flexible data
relationships than the hierarchical model. This structure is efficient for representing complex
relationships, such as in large manufacturing or scientific applications.
3. Relational Model
The relational model is a type of data model used in database systems that organizes data
into tables, with each table representing a specific entity or relationship between entities. In
a relational model, data is organized into rows and columns, with each row representing a
unique record or instance of the entity, and each column representing a specific attribute or
characteristic of the entity.
In a relational model, relationships between entities are represented using foreign keys,
which link records in different tables based on a common attribute. For example, in a
database for a company, the customer table might have a foreign key linking to the
orderDetail table based on the customerID attribute.
This relational model is efficient for representing one-to-many and many-to-many
relationships, where multiple records can be associated with a single record in another
table. It is based on the concept of set theory where each table maintains records and each
column has a value for its attribute.
4. Object-Oriented Model
One of the various types of data models in dbms follows the paradigms of object-oriented
programming. The data is in form of objects, which are instances of a certain class with
each having its own methods and attributes.
In an object-oriented model, objects can inherit attributes and methods from parent objects,
allowing for the hierarchical organization of the data. For example, in a database for a
company, the Employee object might inherit attributes and methods from the Person object,
which might inherit from the Object object.
A schema diagram can display only some aspects of a schema like the name of record type,
data type, and constraints. Other aspects can't be specified through the schema diagram.
For example, the given figure neither show the data type of each data item nor the
relationship among various files.
In the database, actual data changes quite frequently. For example, in the given figure, the
database changes whenever we add a new grade or add a student. The data at a particular
moment of time is called the instance of the database.
Difference between Physical and Logical Data Independence :
It mainly concern about how the data is It mainly concerned about the structure or the
stored into the system. changing data definition.
Any change at the physical level, does not The change in the logical level requires a
require to change at the application level. change at the application level.
The modifications made at the internal The modifications made at the logical level is
Physical Data Independence Logical Data Independence
level may or may not be needed to improve significant whenever the logical structure of
the performance of the structure. the database is to be changed.
It is concerned with the internal schema. It is concerned with the conceptual schema.