Introduction to DBMS ( Database Management System ) . In this topic, we will discuss the best concept of DBMS (Database Management System) It will be very helpful to all the students of Computer Science, BCA, MCA and other Computer Science Aspirants.
Elementary Concept of DBMS
Database:- Storage of data in Large Quantity
Management:- Database Handling Activities
- Creation of Database
- Adding data to the database
- Modifying data in the Database
- Removing data from the database
- Accessing data from the database
System:- A Complex Program or Software
Database:-
- A Database is a collection of interrelated data stored on a Computer.
- A Database is used to store information related to an organization.
- A Database allows us to retrieve and update data on demand.
- It works as Repository of information for an organization.
- It provides facility to perform various operations such as Searching, Sorting, Recombining and other functions.
- A database System is designed to manage large bodies of information.
- A database is very helpful in Decision making.
DBMS
A Database management system is a software system that allows to create and maintain Database.
Defining Database
Defining database means to specify datatypes structure and constraints for data which to be stored in the database.
Constructing Database
It is a process of storing data in the database.
Manipulating Database
Manipulating a database means to retrieve specific data.
Note;
Database System:- The database and DBMS software together is called database system.
Data Redundancy
Duplication of data is known as Data Redundancy.
Features of Database
- Database reduces the data Redundancy
- Database controls data inconsistency
- Database ensures data security
- Database ensures data integrity
- Database facilitates Sharing of data
Features of DBMS
- Structured data
- Query Language
- Multi user Access
- Data dictionary
- Data Abstraction
Disadvantages of File system or Advantages of Database approach
- In file system approach each user has to maintain a separate copy of the same file that results in redundant information . Where as in Database Approach , a single copy of the file can be accessed by different users.
- In File system approach , the same information is stored in more than one file. so if a record is deleted or updated in one file , the corresponding record should be deleted or updated from all the files. If any file left unchanged then the data in a file becomes inconsistent and may provide wrong information. where as in Case of database approach , when a record is updated or deleted in one file then the files that are related with that records are automatically updated.
- In case of file system approach , we can not implement predefined security and permission for different types of users. Where as the Data base approach provides the facility to set security and access permissions for different types of users. so that unwanted users could not access important files.
- The file system approach does not provide a systematic way for backup and Recovery of data and files. Where as the database approach provides better and organized way to store and recover important files in specific time interval.
- In file system approach, if any new functionality is required then the complete file system and the associative programs have to be modified , which is a time consuming task. Where as in case of database approach , there is no need to modify the complete structure and associated programs of DBMS for implementing additional functionality.
- In file system approach, the accessing of information is slower than the database approach.To access a required information in file system approach the user has to perform manual process where as in database approach user has to write query .
Advantages of DBMS
There are various advantages of DBMS.
- Centralized management of data:- The DBMS helps in placing every data of the enterprise at one place in the form of database. As the data is stored simply at one place handling of it is very easy.
- Preventing data redundancy:- DBMS helps in preventing data redundancy . It helps in saving the physical storage space, processing time.
- Restricting unauthorized access:- Database provides facility to implement security for different types of users. so that unauthorized person could not access data without permission.
- Simultaneous access:- DBMS provides facility to access data simultaneously . it means concurrent access.
- Backup and Recovery:- DBMS provides technique to recover the data stored in the database when system crashes because of some failure(hardware or software) .
- Integrity Constraints:- DBMS allows us to define and implement the constraints . like primary key, unique , not Null etc.
Disadvantages of DBMS
In comparison to the advantages of DBMS the list of disadvantages of DBMS is very small .
- Implementing cost:- The const incurred in the development and purchase of software is much higher in comparison to convention file system.
- Processing overhead to implement security and integrity:- The security and integrity are the major requirements of the DBMS. Implementation of proper security and Integrity involves more processing overhead on the DBMS.
- Backup Requirements:- DBMS forces the organization to prepare a backup of the database., so that in case of failure of the database , the data could be recovered from the backup.
- Downtime and failures:- The data in the enterprise is centralized and placed at one location as database, so the enterprise must aware downtime and failures.
- Change over cost:- When DBMS is new to the Enterprise the people of the enterprise spend much time in adopting .
Database Administrator(DBA)
DBA is a person or professional who is responsible for designing and maintaining a database for an enterprise . The role of DBA is very important for enterprise.
Functions of DBA
- Defining Schema:- DBA Designs the Structure(Schema) of complete database according to need of organization. To Define schema DBA uses data dictionary.
- Defining a Constraints:- DBA designs the constraints on the data items according to the requisition of the enterprise.
- Modification to physical structure of the database:- The function of the DBA is to modify the physical structure when required.The modification is done through the DDL commands or statements. Modification may be required in order to improve performance of the Database.
- Authorization of Grants:- DBA decides what part of the database is accessed by whom. DBA decides the accessing authorization , it is called Grants.
- imposition of security:- The Role of the DBA is to control the data from unauthorized access. The accessing capability of the database is decided by the DBA. Security mechanism is used by DBA to control unwanted user.
- Ensuring Availability of data:- DBA ensures that the correct data from the database is always available to the permitted or authorized users.
Data Dictionary
- The data dictionary contains all the information about the database structures, accessing methods , constraints used etc,
- It provides the definition of every every data item of the database.
- The database Administrator (DBA) uses this dictionary in every phase of database such as preparation, implementation and maintenance .
- It is also used by the Application programmer and other users to know what is available in database.
- The data dictionary acts as a guide map to all the users of the database to move and work with the database to produce proper information.
- The cost of maintaining the data dictionary depends on the size of the enterprise as well as database.
- The other name use for data dictionary is system catalog , directory etc.
Keys in DBMS
A key is an Attribute or a set Attributes that helps as identifier for a record in a Relation(Table). It provides basic mechanism for retrieving tuples within any table of the database.
A Tuple(Row) can be identified in a relation by giving a particular value of an Attribute . If a complete tuple is identified with such attribute then that attribute is called as key attribute of the Relation.
For example, By giving a value of an attribute ‘Roll’ a particular student can be identified.
There are Different types of keys .
Primary key :-
- Primary key is a key(Attribute / Column) that serves as the unique identifier in a Relation(Table).
- A primary key may be a group of one or more Attributes (fields /Column) .
- A primary key does not allow Duplicate or Null(Blank) value.
- Properties:- Unique and Not Null
- Example : Roll , Employee ID, etc..
Alternate Key
- When there are more than one primary key then the keys which are Designated as primary key are called Alternate keys.
- It is also known as Secondary key.
- In a Relation ‘R’, let’s assume that there exists three attributes A1, A2 and A3. If Every tuple of relation ‘R’ is identified uniquely by any of the Attributes A1, A2 and A3. If A1 is designated as primary key then A2 and A3 are Alternate keys. Similarly if A2 is designated as primary key then A1 and A3 are called alternate keys.
Candidate Key
A candidate key is a unique Identifier for a tuple in a relation. It may single Attribute or composite(Two or more Attributes).
- In other words , An Attribute having capability to become Primary key.
- In a Relation ‘R’, let’s assume that there exists three attributes A1, A2 and A3. If Every tuple of relation ‘R’ is identified uniquely by any of the Attributes A1, A2 and A3. then A1, A2 and A3 are called Candidate keys.
Super Key
The Set of one or more attributes that identifies a complete tuple in a relation is called super key.
In a Relation ‘R’, let’s assume that there exists three attributes A1, A2 and A3. If Every tuple of relation ‘R’ is identified uniquely by any of the Attributes A1, A2 and A3. then the set {A1, A2 ,A3} is called as super key.
Foreign Key
A Foreign key is a non key attribute whose value is derived from primary key of another relation. It is a key that represents a relationship between two relations.
Normalization
- Normalization is a process or technique by which a complex database structure is decomposed to smaller manageable Relation.
- Normalization is the process of eliminating redundancy of data in a database.
- A relational table in a database is said to be in normal form if it satisfies certain constraints.
- The normalization process produces good quality relations.
- Whenever a relational database is to be designed two major approaches are considered :
- ER modeling which is based on top down approach
- Normalization which is based on Bottom up approach
Goals of Normalization
- Removing Redundant Data
- Defines Relational constraints
- Prevent data loss by assigning primary and foreign key in relation
- Structuring of data
- Ensures only related data is stored in a table
Types of Normal Form
There are various types of normal form.
- First Normal Form(1NF)
- Second Normal Form(2NF)
- Third Normal Form(3NF)
- Boyce Codd Normal Form(BCNF)
- Fourth Normal Form(4NF)
- Fifth Normal Form(5NF)
First Normal Form (1NF)
- A Relation is said to be in 1NF if it contains only elementary or individual values.
- In other words, no duplicate data exists within the same Row of a table.
Second Normal Form (2NF)
- A Relation is said to be in 2NF if and only if it is in 1NF and non-key attributes are fully functionally dependent on a key Attribute.
Third Normal Form (3NF)
- A Relation is said to be in 3NF if and only if it is in 2NF and all the non-key attributes non-transitively depend on key attribute.
Note:- Transitive Dependency
A transitive dependency occurs when a non-key attribute is uniquely identified by non-key attribute of a relation.
Boyce Codd Normal Form (BCNF)
A relation is said to be in BCNF if and only if each functional dependency involves a candidate key as the determinant.
Fourth Normal Form (4NF)
- A Relation is said to be in 4NF if and only if it is in 3NF and does not have multivalued dependency.
Note : – Multi-valued Dependency
A Multi valued dependency is a full constraint between two set of attribute in a relation.
Fifth Normal Form (5NF)
- A Relation is said to be in 5NF if and only if it is in 4NF and preserves the join dependency.
12th Computer Science Important Program
C++ Programming
C++ Programming Language Tutorial
Translators in Programming languages
Tokens in C++ Programming Language
Operators in C++ Programming Language
Conditional statements in C++ Language
Switch Statement in C++ Language
Loops / Iteration statement in C++ Language
Jump statements in C++ with best example
Arrays in C++ Programming Language
Functions in C++ Programming Language
Passing Arguments in Functions
Method / Function overloading in C++
String Functions in C++ with Example
Boolean Algebra
Introduction to Boolean Algebra- Best concepts
Important Law of Boolean algebra with Best concepts
Logic Gates and their types -Best Concept
De Morgan’s Law and their Applications
Applications of Boolean Algebra in Computer Science
DBMS
Introduction to DBMS | Database Management System
Communication and Network Concept
Introduction to Communication and Networks
11th Computer Science
C++ Basic Program for 11th Computer Science
To be continued… Please check daily for more updates..
Also Read Best concept :