Database Management System (DBMS)


Database is a collection of data and Database Management System (DBMS) is a collection of programs which manage the database. These programs use to control access to the data and maintain the database structure.

Advantages of DBMS

1.Controlling Data Redundancy
               In DBMS, a data is stored in only one file and it is not duplicated.

2.Sharing of Data

               In DBMS, authorized users can access data in the same time using various devices. The      distance does not a matter and easy to share data simultaneously.

3.Data Consistency

               In DBMS, data cannot be updated simultaneously. Because of this, data does not duplicate.  

4.Integration of Data (Incorporation)

             In DBMS, It is easy to represent and update relationships between data tables. Data can be      having many relationships between multiple tables.

5.Integration Constraints (Limitation)

               In DBMS, we can manage the data type in the database. It is easy to manage database.

6.Data Security

               In DBMS, we can use a strong password to protect our data. The framework of DBMS helps  us for enforcement of privacy and policy.

7.Report Writer

               In DBMS, we can create a report using report writer tool.

8.Backup and Recovery Procedure

               In DBMS, users can create backup file to protect data and it is use to restore data.

9.Data Independence

             In DBMS, application program and database are independence to each other. We can develop  any one without developing other one.



Database Model


We use database model to explain the relationship between the parts of database. This is a logical design of the database which we can get an idea about the database.


1.Hierarchical Model
In this model, an entity has only one parent and several children. (The entity is a table without data.)  The entity that is at the top is known as Root.



2.Network Model
In this model, entities are organized as a network. All the entities are connected with each other and they can access to other’s data easily.




3.Relation Model
In this model, tables are connected two-dimensional and they are known as relations. These relations are related to each other.






Entity Relationship Diagram (ERD)

An entity relationship diagram is a chart that represents the relationship between database entities. In this 
diagram model organization, we can identify three main components.

Entities – people, places, items, events, concepts

Attributes – properties of an entity

Relationship – the link between entities


In 1976, Peter Chen introduced this concept publishing his research paper

.
There are five components that are using in this diagram to represent how information store in a system.


1.

Entity – an object or concept which you want to store information

Weak Entity – this entity cannot identify without using foreign key
 relationship with another entity.


2.

Action – this shows how two entities share information

Recursive Action – in this one action connects with only one entity 
using two links




3.

Attribute – this is characteristic of the entity


Multi-value Attribute – this use for representing attribute that has 
more than one value

Derived Attribute – this is an attribute which depends on another 
attribute




Composite Attributes
Some attributes make from a combination of meaningful components.





4.

Connecting Lines – these use to connect attributes to show 
relationship 





Binary Relationship and Cardinality

A binary relationship is a relation which two entities are participating and cardinality is the number of instance of an entity is associated with the relationship. There are several types of binary relationships categorized by cardinality.


1.One – to – One

In this type, there is only one instance and it is marked as “1:1”.





2.One – to –Many

In this type, there are many instances and it is marked as “1: M”.



3.Many – to - Many

In this type, there are many instances both of entities and it is 
marked as “M: N”.




Participation Constraints

1.Total Participation

This is represented by two lines. In this, each entity is participated 
in the relationship.

2.Partial Participation

This is represented by one line. In this, all entities are not 
participated completely in the relationship.




Inheritance

Generalization and Specialization are very important parts of the 
Inheritance. In this, all the attributes of higher step are going to 
lower step.





Cardinality and Ordinality

In cardinality, we use the maximum number of relationship in the diagram. In Ordinality, we use the absolute minimum number of relationships. Cardinality describes the achievement of a relationship and Ordinality describes the relationship whether it is exactly or optional.


Degree of relationship
The number of relationships which connect in the relationship is called as degree of relationship.

  • Unary Relationship
  • Binary Relationship
  • Ternary Relationship - In this, action becomes an entity and creates a database.


          


Rules of drawing an ER diagram

  • Draw the entities
  • Draw the relationships
  • Map the cardinality
  • Draw attributes
  • Mark special types of entities
  • Mark special types of attributes
  • Finalizing the diagram
Ex:
A university registrar’s office maintains database about the following entities.
  • Course, including number, title, credit, and syllabus
  • Course offering, including course number, year, semester, section number, instructors, timing and class rooms
  • Students, including student-id, name, and program
  • Instructors, including identification number, name, department and title

The enrollment of students in courses and grades awarded to student in each course they are enrolled for must be appropriately modeled.

Ans:





Comments

Popular posts from this blog

C# Analog Clock

Basic Prolog (List)

SOLID Principles