Skip to main content

Introduction to DBMS

 Database Management System (DBMS)

• Collection of interrelated data 

• Set of programs to access the data 

• DBMS contains information about a particular enterprise 

• DBMS provides an environment that is both convenient and efficient to use. 

• Database Applications: • Banking: all transactions 

                                             • Airlines: reservations, schedules 

                                            • Universities: registration, grades 

                                            • Sales: customers, products, purchases 

                                          • Manufacturing: production, inventory, orders, supply chain



Difference between File System and DBMS

FILE SYSTEMDBMS
Used to manage and organise the files stored in the hard disk of the computerA software to store and retrieve the user’s data
Redundant data is presentNo presence of redundant data
Query processing is not so efficientQuery processing is efficient
Data consistency is lowDue to the process of normalisation, the data consistency is high
Less complex, does not support complicated transactionsMore complexity in managing the data, easier to implement complicated transactions
Less securitySupports more security mechanisms
Less expensive in comparison to DBMSHigher cost than the File system
Does not support crash recoveryCrash recovery mechanism is highly supported




Data models - relational, hierarchical, network


1. Hierarchical Data Model: 


Hierarchical data model is the oldest type of the data model. It was developed by IBM in 1968. It organizes data in the tree-like structure. Hierarchical model consists of the following :

  • It contains nodes which are connected by branches.
  • The topmost node is called the root node.
  • If there are multiple nodes appear at the top level, then these can be called as root segments.
  • Each node has exactly one parent.
  • One parent may have many child.


2. Network Data Model: 

It is the advance version of the hierarchical data model. To organize data it uses directed graphs instead of the tree-structure. In this child can have more than one parent. It uses the concept of the two data structures i.e. Records and Sets.






3. Relational Data Model: 


The relational data model was developed by E.F. Codd in 1970. There are no physical links as they are in the hierarchical data model. Following are the properties of the relational data model :

  • Data is represented in the form of table only.
  • It deals only with the data not with the physical structure.
  • It provides information regarding metadata.
  • At the intersection of row and column there will be only one value for the tuple.
  • It provides a way to handle the queries with ease.



Difference between Hierarchical, Network and Relational Data Model:

S. No.Hierarchical Data ModelNetwork Data ModelRelational Data Model
1.In this model, to store data hierarchy method is used. It is the oldest method and not in use today.It organizes records to one another through links or pointers.It organizes records in the form of table and relationship between tables are set using common fields.
2.To organize records, it uses tree structure.It organizes records in the form of directed graphs.It organizes records in the form of tables.
3.It implements 1:1 and 1:n relations.In addition to 1:1 and 1:n it also implements many to many relationships.In addition to 1:1 and 1:n it also implements many to many relationships.
4.Pointers are used to establish relationships among records physically.A linked list is used to establish a relationship among records physically.The logical representation is used with rows and columns to depict relationship among records.
5.Insertion anomaly exits in this model i.e. child node cannot be inserted without the parent node.There is no insertion anomaly.There is no insertion anomaly.


Schema – the logical structure of the database 
    • e.g., the database consists of information about a set of customers and accounts and the relationship     between them) 
    • Analogous to type information of a variable in a program 
            Physical schema: database design at the physical level 
            Logical schema: database design at the logical level 


Instance – the actual content of the database at a particular point in time 
    • Analogous to the value of a variable


 Levels of abstraction: There are mainly levels of data abstraction: 

Physical level – it will contains block of storages (bytes,GB,TB,etc)

Logical level –  it will contain the fields and the attributes of data.

View level – it works with CLI or GUI access of database




Data Independence

A database system normally contains a lot of data in addition to users’ data. For example, it stores data about data, known as metadata, to locate and retrieve data easily. It is rather difficult to modify or update a set of metadata once it is stored in the database.

Logical Data Independence

Logical data is data about database, that is, it stores information about how data is managed inside. For example, a table (relation) stored in the database and all its constraints, applied on that relation. Logical data independence is a kind of mechanism, which liberalizes itself from actual data stored on the disk. If we do some changes on table format, it should not change the data residing on the disk. 



Physical Data Independence 

All the schemas are logical, and the actual data is stored in bit format on the disk. Physical data independence is the power to change the physical data without impacting the schema or logical data. For example, in case we want to change or upgrade the storage system itself − suppose we want to replace hard-disks with SSD − it should not have any impact on the logical data or schemas.




Structure of DBMS






Database Users 


Users are differentiated by the way they expect to interact with the system 

• Application programmers – interact with system through DML calls 

• Sophisticated users – form requests in a database query language 

• Specialized users – write specialized database applications that do not fit into the traditional data processing framework 

• Naïve users – invoke one of the permanent application programs that have been written previously 

• E.g. people accessing database over the web, bank tellers, clerical staff
















Comments

Popular posts from this blog

Structure of Relational Databases

STRUCTURE OF RELATIONAL DATABASE What is Relational Model? Relational Model represents how data is stored in Relational Databases. A relational database stores data in the form of relations (tables). Consider a relation STUDENT with attributes ROLL_NO, NAME, ADDRESS, PHONE and AGE. Table : 2-Dimensional structure .(rows and columns) Attribute : Attributes are the properties that define a relation. e.g.; ROLL_NO, NAME  Relation Schema : A relation schema represents name of the relation with its attributes. e.g.; STUDENT (ROLL_NO, NAME, ADDRESS, PHONE and AGE) is relation schema for STUDENT. If a schema has more than 1 relation, it is called Relational Schema.  Tuple : Each row in the relation is known as tuple.  Relation Instance : The set of tuples of a relation at a particular instance of time is called as relation instance. Table 1 shows the relation instance of STUDENT at a particular time. It can change whenever there is insertion, deletion or updation in the databa...