A DBMS is a system used to store and manage data in a database. It allows data to be shared and accessed by multiple users simultaneously. It provides features like data security, integrity, concurrency control and recovery from failures. The main components are data, users, procedures and hardware/software. Common DBMS include MySQL, SQL Server and Oracle.
Download as PPTX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
15 views
DBMS
A DBMS is a system used to store and manage data in a database. It allows data to be shared and accessed by multiple users simultaneously. It provides features like data security, integrity, concurrency control and recovery from failures. The main components are data, users, procedures and hardware/software. Common DBMS include MySQL, SQL Server and Oracle.
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 42
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. 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 . 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. 1) Improve data sharing 2) Improve data security 3) Improved data access
ADVANTAGE 4) Improved decision
making
S 5) Increased end user
productivity 6) Better data integration 7) Minimized data inconsistency Disadvantages 1) Database systems are complex, difficult, and time- consuming to design 2) Substantial hardware and software start-up costs 3) Damage to database affects virtually all applications programs 4) Extensive conversion costs in moving from a file- based system to a database system 5) Initial training required for all programmers and users 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 Features of DBMS Support for large amount of data Data concurrency and locking Data Security Data Integrity Fault tolerance and recovery Support for Languages 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. 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. Database Users Administrators − Administrators maintain the DBMS and are responsible for administrating the database. They are responsible to look after its usage and by whom it should be used. They create access profiles for users and apply limitations to maintain isolation and force security. Administrators also look after DBMS resources like system license, required tools, and other software and hardware related maintenance. Designers − Designers are the group of people who actually work on the designing part of the database. They keep a close watch on what data should be kept and in what format. They identify and design the whole set of entities, relations, constraints, and views. End Users − End users are those who actually reap the benefits of having a DBMS. End users can range from simple viewers who pay attention to the logs or market rates to sophisticated users such as business analysts. System Administrator: responsible for the entire computer system of the organisation. Security Officers: responsible for the security of the computer resources of an organisation Network Administrators: Responsible for ensuring that all users of the database have access to the data 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. 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 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 Sorting is the process or arranging items in a set in a specific order. Sorting a table would create a copy of the table in which the rows may have a different order than the original. Storing the new table would require an amount of space similar to that of the original table. Due to this reason sorting is used less frequently; only used when a new copy of the sorted table is required. Indexing is a method that is used to improve the data retrieval speed in a table of a database. An index could be created using a single or more columns in a table and the index is stored in a separate file. This file contains the logical order of rows along with their physical position in the table. The space required by an index file is typically less than the space required to store the table. Unique indices will prevent the table from containing duplicate values of the index. Indexing would make the data retrieval more efficient. Indexing and sorting are two methods that can be used to create an order in a data table. Indexing would create an index file that contains only the logical order of rows along with their physical position in the table whereas with sorting, a copy of the sorted table has to be stored. Usually, the index file requires lesser space than storing a sorted table. Furthermore, some operations like running queries and searching would be faster with a table with indexes. In addition, indexing would not change the original order in the table, while sorting would change the order of rows. Also, operation such as linking tables would require having an index. SORT COMMAND INDEX COMMAND
Creates a new database file Does not create a new file
Slower than index command Faster than sort command