DBMS (Database Management System) is a system used to store and manage data in a database. It allows for collection of interrelated data and provides programs to access, manipulate, and manage the data. Some key functions of a DBMS include transaction management, concurrency control, recovery management, security management, and storage management. A DBMS ensures data integrity and provides features for large data storage, data sharing between users, and data security.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
35 views38 pages
7 DBMS
DBMS (Database Management System) is a system used to store and manage data in a database. It allows for collection of interrelated data and provides programs to access, manipulate, and manage the data. Some key functions of a DBMS include transaction management, concurrency control, recovery management, security management, and storage management. A DBMS ensures data integrity and provides features for large data storage, data sharing between users, and data security.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 38
DBMS
What Is DBMS?
Data is one of the most important assets of a company.
It is very important to make sure data is stored and maintained accurately and quickly. DBMS (Database Management System) is a system that is used to store and manage data.
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 A DBMS is a set of programs that is used to store and manipulate data. Manipulation of data include the following: Adding new data, for example adding details of new student. Deleting unwanted data, for example deleting the details of students who have completed course. Changing existing data, for example modifying the fee paid by the student. Examples My sql Microsoft sql Microsoft Access dBase Filemaker pro Database managements systems like Oracle, DB2 are more powerful and meant for bigger companies. Whereas, database management systems like MS- Access are meant for small companies. So one has to choose the DBMS depending upon the requirement. Purpose of Database Systems Database management systems were developed to handle the following difficulties of typical file-processing systems supported by conventional operating systems. Data redundancy and inconsistency Difficulty in accessing data Data isolation – multiple files and formats Integrity problems Atomicity of updates Concurrent access by multiple users Security problems Advantages of DBMS Improved data sharing. The DBMS helps create an environment in which end users have better access to more and better-managed data. Such access makes it possible for end users to respond quickly to changes in their environment. Improved data security. The more users access the data, the greater the risks of data security breaches. Corporations invest considerable amounts of time, effort, and money to ensure that corporate data are used properly. A DBMS provides a framework for better enforcement of data privacy and security policies. Improved data access. The DBMS makes it possible to produce quick answers to ad hoc queries. From a database perspective, a query is a specific request issued to the DBMS for data manipulation —for example, to read or update the data. Improved decision making. Better-managed data and improved data access make it possible to generate better-quality information, on which better decisions are based. Increased end-user productivity. The availability of data, combined with the tools that transform data into usable information, empowers end users to make quick, informed decisions that can make the difference between success and failure in the global economy. Better data integration Wider access to well-managed data promotes an integrated view of the organization’s operations and a clearer view of the big picture. It becomes much easier to see how actions in one segment of the company affect other segments Minimized data inconsistency. Data inconsistency exists when different versions of the same data appear in different places. For example, data inconsistency exists when a company’s sales department stores a sales representative’s name as “Bill Brown” and the company’s personnel department stores that same person’s name as “William G. Brown . Disadvantages Database systems are complex, difficult, and time- consuming to design Substantial hardware and software start-up costs Damage to database affects virtually all applications programs Extensive conversion costs in moving from a file- based system to a database system Initial training required for all programmers and users An architecture for a database system Physical level: describes how a record (e.g., customer) is stored. Logical level: describes data stored in database, and the relationships among the data. type customer = record name : string; street : string; end; View level: application programs hide details of data types. Views can also hide information (e.g. salary) for security purposes. Features of DBMS Apart from these features different database management systems may offer different features. For instance, Oracle is increasingly being fine-tuned to be the database for Internet applications. This may not be found in other database management systems.
Each DBMS has its own way of implementing it. A
DBMS may have more features and may also enhance these features. Features of DBMS Support for large amount of data Data concurrency and locking Data Security Data Integrity Fault tolerance and recovery Support for Languages Support for large amount of data Each DBMS is designed to support large amount of data. They provide special ways and means to store and manipulate large amount of data. Companies are trying to store more and more amount of data. Some of this data will have to be online In most of the cases the amount of data that can be stored is not actually constrained by DBMS and instead constrained by the availability of the hardware. For example, Oracle can store terabytes of data. Data concurrency and locking DBMS also allows data to be shared by two or more users. The same data can be accessed by multiple users at the same time – data concurrency. However when same data is being manipulated at the same time by multiple users certain problems arise. To avoid these problems, DBMS locks data that is being manipulated to avoid two users from modifying the same data at the same time. The locking mechanism is transparent and automatic. Neither we have to inform to DBMS about locking nor we need to know how and when DBMS is locking the data. Data Security While DBMS allows data to be shared, it also ensures that data is only accessed by authorized users. DBMS provides features needed to implement security at the enterprise level. By default, the data of a user cannot be accessed by other users unless the owner gives explicit permissions to other users to do so. Data Integrity Maintaining integrity of the data is an import process. If data loses integrity, it becomes unusable and garbage. DBMS provides means to implement rules to maintain integrity of the data. Once we specify which rules are to be implemented, then DBMS can make sure that these rules are implemented always. Fault tolerance and recovery DBMS provides great deal of fault tolerance. They continue to run in spite of errors, if possible, allowing users to rectify the mistake in the mean time. DBMS also allows recovery in the event of failure to a certain extend. Support for Languages DBMS supports a data access and manipulation language. The most widely used data access language for RDBMS (relational database management systems) is SQL. Functions of DBMS Transaction Management: This refers to how a DBMS must supply a method that will guarantee that all the updates in a given transaction are made or not made.All transactions must follow what is called the ACID properties. A-Atomicity,C-Consistency,I-Isolation,D-Durability Concurrency control: Ensures that correct results for concurrent operations are generated, while getting those results as quickly as possible. Recovery Management- Backup and recovery is brought to mind whenever there is potential outside threats to a database. For example if there is a power outage, recovery management is how long it takes to recover the database after the outage. Security Management: Language Interface: Storage management: This particular function is used for the storage of data and any related data entry forms or screen definitions, report definitions, data validation rules, procedural code, and structures that can handle video and picture formats. Users do not need to know how data is stored or manipulated. Data Catalog management: A catalog describes data set attributes and indicates the volumes on which a data set is located. When a data set is cataloged, it can be referred to by name without the user needing to specify where the data set is stored. Various components in DBMS 1.Data 2.User 3.Procedure 4.Hardware 5.Software Database Users Database Administrator Database Designers End-users System Administrator Security Officers Network Administrators Entity and Attribute An entity is any object that is stored in the database. Each entity is associated with a collection of attributes. For example, if you take a data of an educational institution, student is an entity as we store information about each student in the database. Each student is associated with certain values such as roll number, name, course etc., which are called as attributes of the entity. There will be relationship among entities. The relationship between entities may be one-to-one, one- to-many or many-to-many. Primary Key A table contains the data related entities. If you take STUDETNS table, it contains data related to students. For each student there will be one row in the table. Each student’s data in the table must be uniquely identified. In order to identify each entity uniquely in the table, we use a column in the table. That column, which is used to uniquely identify entities (students) in the table is called as primary key. So a primary key can be defined as a set of columns used to uniquely identify rows of a table. Some other examples for primary keys are account number in bank, employee number of an employee. Composite Primary Key In some tables a single column cannot be used to uniquely identify entities (rows). In that case we have to use two or more columns to uniquely identify rows of the table. When a primary key contains two or more columns it is called as composite primary key. In PAYMENTS table, which contains the details of payments made by the students. Each row in the table contains roll number of the student, payment date and amount paid. Neither of the columns can uniquely identify rows. So we have to combine ROLLNO and DP to uniquely identify rows in the table. As primary key is consisting of two columns it is called as composite primary key. Foreign Key In relational model, we often store data in different tables and put them together to get complete information. For example, in PAYMENTS table we have only ROLLNO of the student. To get remaining information about the student we have to use STUDETNS table. Roll number in PAYMENTS table can be used to obtain remaining information about the student. The relationship between entities student and payment is one-to-many. One student may make payment for many times. As we already have ROLLNO column in PAYMENTS table, it is possible to join with STUDENTS table and get information about parent entity (student). Roll number column of PAYMENTS table is called as foreign key as it is used to join PAYMENTS table with STUDENTS table. So foreign key is the key on the many side of the relationship. Sorting & Indexing Organizing a database means arranging individual records so that they appear in a sequence that makes a proper sense and helps you to work with database efficiently. The concept can be appreciated by taking an example of telephone directory. Imagine a situation where names in the directory are not arranged alphabetically. This will create a mess and take much longer time to find a particular name in the directory Sorting & Indexing Information must be organized before you can make much sense of it. The elements of a database structure - field name, type, and size are all intended to organize within each record. There are two ways to organize records in database. One is INDEXING and the other is SORTING. Before sorting a database you make sure that the database you want to sort is current: Indexing:an index is a systematic arrangement of entries designed to enable users to locate information in a document Sorting:any process of arranging items in some sequence This SORT command creates a new database file. But the new file contains records of the original database file only the order is different The index command does not create a new database file. It creates an index file for the database with a default extension Sorting Indexing Creates a new database file Does not create a new file
File extension is .DBF File extension is .NDX
Slower than index command Faster than sort command