Waqar Ul Hassan FALL-19/BSCS-017 Dbms

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 4

WAQAR UL HASSAN

FALL-19/BSCS-017
DBMS

Assignment#1

Database Model:

A database model shows the logical structure of a database,


including the relationships and constraints that determine
how data can be stored and accessed. Individual database
models are designed based on the rules and concepts of
whichever broader data model the designers adopt. Most data
models can be represented by an accompanying database
diagram.

Types of database models:

There are many kinds of data models. Some of the most


common ones include:
 Hierarchical database model
 Relational model
 Network model
 Object-oriented database model
 Entity-relationship model
 Document model
 Entity-attribute-value model
 Star schema
 The object-relational model, which combines the two that
make up its name

Hierarchical Model
This database model organises data into a tree-like-structure, with a single root, to
which all the other data is linked. The heirarchy starts from the Root data, and expands
like a tree, adding child nodes to the parent nodes.
In this model, a child node will only have a single parent node.
This model efficiently describes many real-world relationships like index of a book,
recipes etc.

Network Model
This is an extension of the Hierarchical model. In this model data is organised more like
a graph, and are allowed to have more than one parent node.
In this database model data is more related as more relationships are established in this
database model. Also, as the data is more related, hence accessing the data is also
easier and fast. This database model was used to map many-to-many data
relationships.
Entity-relationship Model
In this database model, relationships are created by dividing object of interest into entity
and its characteristics into attributes.
Different entities are related using relationships.
E-R Models are defined to represent the relationships into pictorial form to make it
easier for different stakeholders to understand.

ER Model: Attributes
If a Student is an Entity, then student's roll no., student's name, student's age,
student's gender etc will be its attributes.
An attribute can be of many types, here are different types of attributes defined in ER
database model:

1. Simple attribute: The attributes with values that are atomic and cannot be
broken down further are simple attributes. For example, student's age.
2. Composite attribute: A composite attribute is made up of more than one simple
attribute. For example, student's address will contain, house no., street
name, pincode etc.
3. Derived attribute: These are the attributes which are not present in the whole
database management system, but are derived using other attributes. For
example, average age of students in a class.
4. Single-valued attribute: As the name suggests, they have a single value.
5. Multi-valued attribute: And, they can have multiple values.

ER Model: Entity and Entity Set


Considering the above example, Student is an entity, Teacher is an entity,
similarly, Class, Subject etc are also entities.
An Entity is generally a real-world object which has characteristics and holds
relationships in a DBMS.
If a Student is an Entity, then the complete dataset of all the students will be the Entity
Set

Relational Model:

In this model, data is organised in two-dimensional tables and the relationship is


maintained by storing a common field.
This model was introduced by E.F Codd in 1970, and since then it has been the most
widely used database model, infact, we can say the only database model used around
the world.
The basic structure of data in the relational model is tables. All the information related to
a particular type is stored in rows of that table.

You might also like