Download as PPTX, PDF, TXT or read online from Scribd
Download as pptx, pdf, or txt
You are on page 1of 18
Unit 1
Introduction to Database Management System (DBMS)
Basic Terminologies • Data – Data are raw facts that can be recorded in some media such as paper media, digital media, human brain, etc. • Information – Information are the processed data. • Database – Database is an organized collection of logically related data stored in a standard format. • Database System – A database system is an integrated collection of logically related data along with the details. – Some of the commonly used DBMS are MySQL, Microsoft Access, Oracle. Concept of Database Management System (DBMS) • Database Management System (DBMS) is the collection of software programs that is used to manage the database effectively and conveniently. • DBMS provides an interface to perform various operations such as I. Defining the database II. Inserting data records into the database III. Deleting data records IV. Retrieving data from database V. Providing security to the database Applications of DBMS 1. Banking For storing customer information, tracking day to day credit and debit transactions, generating bank statements etc. All these work has been done with the help of database management systems. 2. Sales To store customer information, product information and invoice details. 3. Airlines To store the early reservation information along with flight schedule. 4. Telecom : Telecom uses the database systems to keeps track of information regarding calls made, network usage, customer details etc. 5. Healthcare: DBMS is used in healthcare to manage patient data, medical records, and billing information. 6. Reporting and analysis: DBMS provides tools to generate reports and analyze data to gain insights and make informed decisions. 7. Online Shopping: Online shopping websites like amazon, flipkart, store the product information, credit details and also provide the relevant list of products based on the query. Objectives of DBMS • Provide for mass storage of relevant data • Making easy access to data for the authorized user. • Providing quick response to user’s requests for data. • Eliminate redundant (Duplicate) data. • Allow multiple users to be active at one time. • Allow the growth of the database system • Provide data integrity. • Protect the data from physical harm and unauthorized access. • Provide multiple views for the same data. Evolution • The chronological order of the development of DBMS is as follows • 1. Flat Files (1970s-1990s) • 2. Hierarchical (1970s-1990s) • 3. Network (1970s- 1990s) • 4. Relational (1980s-present) • 5. Object-Oriented (1990s- present) • 6. Object-Relational (1990s-present) • 7. Web enabled (1990s-present) • 1.Flat Files (1970s-1990s) : Flat files database is a database that stores information in a single file or table. • 2.Hierarchical (1970s-1990s) : As the name indicates, hierarchical database contains data in a hierarchically- arranged data. Parent can have many children but one child can only have one parent i. e.,; one-to-many relationship. • 3.Network database (1970s -1990s) : The inventor of network model is Charles Bachmann. Unlike hierarchical database model, network database allows multiple parent and child relationships i. e., it maintains many-to many relationship. • 4.Relationl database (1980s-present) : Relationship database model was proposed by E. F. Codd. After the hierarchical and network model the birth of this model was huge step ahead. It allows the entities to be related through a common attribute. • 5.Object – oriented database (1990s -present) : Object-Oriented database management system is that database system in which the data or information is presented in the form of objects and class, much like in object-Oriented programming language. • 6. Object- relationship database (1990s-present) : An object relationship database management system displays a modified object- oriented user- display over the already implemented relationship database management system. Need of database Data Abstraction • Data Abstraction is a process of hiding unwanted or irrelevant details from the end user. Data Abstraction • There are three levels of abstraction for DBMS, which are as follows − • Physical or Internal Level • Logical or Conceptual Level • View or External Level Levels of abstraction I. Physical or Internal Level – It is the lowest level of abstraction. – It describe how the data are actually stored. II. Logical or Conceptual Level – Logical level is the intermediate level. – It describes what data is stored in the database and what relationship exists among those data. III. View or External Level – View or External Level is the highest level of data abstraction. – Application programs hides details of the datatype. – View level can be used by all users . This level is the least complex and easy to understand. Data Independence • The ability to modify the lower level, without affecting the schema definition of the next higher level is called data independence. • Upper level are unaffected by changing in lower level.
1. Physical data independence
• It indicates that the physical storage structures or devices could be changed without affecting the conceptual schema. • The ability to modify physical schema without changing the logical schema. 2. Logical Data Independence • Logical data independence is the ability to modify logical schema without causing any unwanted modifications to the external schema or the application programs to be rewritten. • It is the capacity to change the conceptual schema without having to change the external schema. Schema and Instances • The data which is stored in the database at a particular moment of time is called an instance of database. • The overall design of the database is called schema. • A database schema is the skeleton structure of the database. It represents the logical structure of the entire database. A schema contains the objects like table, foreign key, primary key, views, column etc. • A database schema can be represented by using the visual diagram. The diagram shows the database objects and relationship with each other. • Physical schema : Database design at the physical level • Logical schema : Database design at the logical level Concept of DDL, DML, DCL • DDL (Data Definition Language) • DDL or Data Definition Language actually consists of the SQL commands that can be used to define the database schema. • List of DDL commands: • CREATE: This command is used to create the database or its objects (like table, index, function, views, store procedure, and triggers). • DROP: This command is used to delete objects from the database. • ALTER: This is used to alter the structure of the database. • TRUNCATE: This is used to remove all records from a table, including all spaces allocated for the records are removed. • COMMENT: This is used to add comments to the data dictionary. • RENAME: This is used to rename an object existing in the database. • DML(Data Manipulation Language) • The SQL commands that deal with the manipulation of data present in the database belong to DML or Data Manipulation Language and this includes most of the SQL statements. • List of DML commands: • INSERT: It is used to insert data into a table. • UPDATE: It is used to update existing data within a table. • DELETE: It is used to delete records from a database table. • DCL (Data Control Language) • DCL includes commands such as GRANT and REVOKE which mainly deal with the rights, permissions, and other controls of the database system. • List of DCL commands: • GRANT: This command gives users access privileges to the database. • REVOKE: This command withdraws the user’s access privileges given by using the GRANT command.