0% found this document useful (0 votes)
17 views34 pages

DBMS Unit-1

Database Management System Notes

Uploaded by

purfun594
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
17 views34 pages

DBMS Unit-1

Database Management System Notes

Uploaded by

purfun594
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 34
UNIT -1 AAARAAAAARARARAAARARITAIALTIAAQAAT Ci UNIT -1 The Worlds of Database Systems INTRODUCTION TO BASIC CONCE: OF DATABASE SYSTEMS: VUEe a What is Data? if = The raw facts are called as data. The word “raw” indicates that they have not been processed. = Ex: For example 89 is the data FYP™ What is information? p> Te Pres datas known as infomation BBP > x: Marks: 89; then it becomes information What is Knowledge? VW BP? 1. Knowledge refers to the practical use of information v Wea 2 Knowledge necessarily involves a personal experience. MATION PROC The process of converting the data (raw facts) into meaningful information is called as data/in formation processing. When Data Processed ‘Note: In business processing knowledge is more useful to make decisions for any organization. WOULD LUT YUL 1 DIFFERENCE BETWEEN DATA AND INFORMATION: TINFORWATION a 2. Itis in unorganized form 2 itis in organized form 3. 3. Data doesn’t Information helps i FILE ORIENTED APPROACH: The earliest business computer systems were used to process business records and produce information. They were generally faster and more accurate than equivalent manual systems. These systems stored groups of records in separate files, and so they were called file Processing systems. 1. File system is a collection of data Any management with the file system, user has to write the procedures 2.File system gives the details of the data representation and Storage of data. 3.In File system storing and retrieving of data cannot be done efficiently. 4. Concurrent access to the data in the file system has many problems like a Reading the file while other deleting some information, updating some information 5 File system doesn’t provide crash recovery mechanism. Eg_ While we are entering some data into the file sf System crashes then content of the file is lost a 6. Protecting a file under file system is very difficult The typical file-oriented system is supported by a conventional operating system. ____ Permanent records are stored in various files and a number of different application programs _ are written to extract records from and add records to the appropriate files. 3 > = = mS a Fee tv EUEVUECV ENE! » bb D IWANTAGES OF FIL! IENTED SYSTEM: The following are the disadvantages of File-Oriented System. Data Redundancy and Inconsistency: Since files and application programs are created by different programmers over 2 long period of time, the files are likely to be having different formats and the programs may be ‘Written in several programming languages. Moreover. the same piece of mformation may be in several places. This redundancy leads to higher storage and access cost In addition, it may lead to data inconsistency." = Difficulty in Accessing Data: The conventional file processing environments do not allow needed data to be retrieved in a convenient and efficient manner Better data retrieval system must be developed for general use Data Isolation: Since data is scattered in various files, and files may be mm different formats, t ts difficult to write new application programs to retrieve the appropriate data. Concurrept Access Anomalies: Oe heck a5, In order to unprove the overall performance of the system and obtaim a faster response ume, many sens allow muluple ers to-wpdne dhe dat semtencowsly_ In ues environment, interaction of concurrent updates may result im mconsistent dat Problems: sy ee oe Not every user of the database system should be able $0 access alll the data For example, in banking system, payroll personnel need only that part of the database that has information about various bank employees. They do not need access to mformation about _cestomer accounts. It is difficult 10 enforce such security constraints Int Problems: The data values stored im the database must satisfy certain types of consistency constraints. For example. the balance of 2 bank account may never fall below 2 prescnbed amount. These constraints are enforced wm the system by addmg appropnate cade in the vanows aes « nee = application programs. When new constraints are added, it is difficult to change the programs to enforce them. The problem is compounded when constraints involve several data items for different files Atomicity Probiem: A computer system like any other mechanical or electrical device is subject to failure. In many applications, it is crucial to ensure that once a failure has occurred and has been detected, the data are restored to the consistent state existed prior to the failure Example; ‘Consider part of a savings-bank enterprise that keeps information about all customers and savings accounts, One way to keep the information on a computer is to store it in operating system files. To allow users to manipulate the information, the system has a number of application programs that manipulate the files, including: * A program to debit or credit an account * A program to add a new account © A program to find the balance of an account Programmers wrote these application programs to meet the needs of the bank. New application programs are added to the system as the need arises. For example, suppose that the savings bank decides to offer checking accounts, As a result, the bank creates new permanent files that contain information about all the checking accounts maintained in the bank, and it may have to write new application programs: to deal with situations that do not arise in savings accounts, such as overdrafts. Thus, as time goes by, the system acquires more files and more application programs. The system stores permanent records in various files, and it needs different Application programs to extract records from, and add records to, the appropriate files. Before-databasemanagement-systems-{DBMS) cane—atong;organizations—usualty—stored information in such systems. Organizational information in a file-processing system has a number of major disadvantages: : consists of savings-account records and in a file that consists of checking-account records. This redundancy leads to higher storage and access cost. In, it may lead to data inconsistency, that is, the various copies of the same data may no longer agree. For example, a changed customer address may be reflected in savings-account records but not elsewhere in the system. 2. Difficulty in Accessing Data: ‘Suppose that one of the bank officers needs to find out the names of all customers who live within a particular postal-code area. The officer asks the data-processing department to generate such a list. Because there is no application program to generate that. The bank officer has now two choices: either obtain the list of all customers and extract the needed information manually or ask a system programmer to write the necessary application program. Both alternatives are obviously unsatisfactory. | Because data are scattered in various files and files may be in different formats, writing -w application programs to retrieve the appropriate data is difficult. z 4 Integrity Problems: CCIVEVUUCELVTVUT TLE ee The balance of « bank account may never fall below a prescribed amount (say, $25). Ge Developers enforce these constraints in the system by adding appropriate code in the various go> “pplication programs. However, when new constraints are added, it is difficult to change the programs to enforce them. The problem is compounded when constraints involve several data items from different files. UW ye S.Atomicity Problems: A computer system, like any other mechanical or electrical device, is subject to failure. 4n-many applications.sts-crvcial that, if afailure-occurs, the data be restored to the consistent - state that existed prior to the failure. Consider a program to transfer $50 from account 4 to account B. If'a system failure occurs during the execution of the program, it is possible that the $50 was removed from account 4 but was not credited to account B, resulting in an inconsistent database state. Clearly, it is essential to database consistency that either both the credit and debit occur, or that neither occur. That is, the funds transfer must be atomic—it must happen in \ its entirety or not at all It is difficult to ensure atomicity in a conventional file-processing ca system i eens =a 6 Concurrent-Access Anomalies: For the sake of overall performance of the system and faster response, many systems allow multiple users to update the data simultaneously. In such an environment, interaction of ‘concurrent updates may result in inconsistent data, Consider bank account 4, containing $500. Iftwo customers withdraw funds (say $50 and $100 respectively) from account 4 at about the same time, the result of the concurrent executions may leave the account in an incorrect (or inconsistent) state. Suppose that the programs executing on behalf of each withdrawal read the old balance, reduce that value by the amount being withdrawn, and write the result back. If the ‘two programs run concurrently, they may both read the value $500, and write back $450 and $400, tespectively. Depending on which one writes the value last, the account may contain ‘$450 of $400, rather than the correct value of $350. To guard against this possibility, the system ‘must maintain some form of supervision. But supervision is difficult to provide because data may be accessed by many different application programs that have not been coordinated previously. i Security Problems: Not every user of the database system should be able to access all the data. For example, in a banking system, payroll personne! need to see only that part of the database that has information about the various bank employees. They do not need access to information about customer accounts. But, since application programs are added to the system in an ad hoc manner, enforcing such security constraints is difficult. These difficulties, among others, prompted the development of database systems. - PS, : Ore eae > fs © Magnetic tapes were developed for data storage © Data processing tasks such as payroll were automated, with data stored on tapes © Data could also be input from putiched card decks, and output to printers. * Late 1960s and 1970s: The use of hard disks in the late 1960s changed the scenano for data —_processing greatly, since hard disks allowed direct access to data * With disks, network and hierarchical databases could be created that allowed data structures such as lists and trees to be stored on disk. Programmers could construct and manipulate these data structures. © With disks, network and hierarchical databases could be created that allowed data structures such as lists and trees to be stored on disk. Programmers could construct and manipulate these data structures, * Inthe 1970°s the EF CODD defined the Relational Model. in the 1980's: «Initial commercial relational database systems, such as IBM DB2, Oracle, Ingress, and DEC Rdb, played a major role in advancing techniques for efficient processing of declarative queries. WECUUevyeevuyvyy J In the early 1980s, relational databases had become competitive with network and hierarchical database systems even in the area of performance. The 1980s also saw much research on parallel and distributed databases, as well as inital work-en- object-oriented databases. ——_——— —_______— Early 1990s: LULULLEUT © The SQL language was designed primarily in the 1990's, «And this is used for the transaction processing applications. © Dectston support Se area for databases —_— ee Ybor * Database vendors also began to add object-relational support to their databases, Late 19905; * The major event was the explosive growih of the World Wide Web, . Databases were deployed much more extensively than ever before. Database systems ‘now had to support very high transaction processing rates, as well as very high reliability and 24 * 7 availability (availability 24 hours a day, 7 days a week, meaning no downtime for scheduled maintenance activities), The Evolution of Database systems: 2 oq = = = a | a ‘The Evolution of Database systems are as follows: 1.File Management System 2. Hierarchical database System 3. Network Database System 4 Relational Database System File Management System: ‘The file management system also called as FMS in short is one in which all data is stored on a single large file. The main disadvantage in this system is searching a record or data takes a long time. This lead to the introduction of the concept, of indexing in this system. Then also the FMS system had lot of drawbacks to name a few like updating or modifications to the data cannot be handled easily, sorting the records took long time and so on. All these drawbacks led to the introduction of the Hierarchical Database System. ‘The previous system FMS drawback of accessing records and sorting records which took a long time was removed in this by the introduction of parent-child relationship between records in database. The origin of the data is called the root from which several branches have data at different levels and the last level is called the | 3 WS Weal, The main drawback in this was if there is any modification or addition made to the Jad Structure then the whole structure needed alteration which made the task a tedious one In order to avoid this next system took its origin which is called as the Network Database Systern Fig: Hierarchical Database System CVEUVeveuie | . In this the main concept of many-many relavonships got introduced. But this also pe followed the same technology of pointers to define relationships with a difference im this made FRY in the introduction if grouping of data items as sets yer oSLOLLELLEEE 1 4 In order to overcome all the drawbacks of the previous systems, the Relational Database System got introduced in which data get organized as tables and each record forms a row with many fields or attributes in it. Relationships between tables are also formed in this system. FE F ie ie A database is a collection of related data (OR) A database is a collection of information that is organized so that it can be easily accessed, managed and updated. Ex les / Applications of Database Systems: The following are the various kinds of applications/organizations uses databases for their business processing activities in their day-to-day life They are 1. Banking: For customer information, accounts, and loans, and banking transactions. irlines: For reservations and schedule information, Ales were among the first to use SUL UVUUUULUUUT TEP EEe reer ery ever eee s in a geographically distributed manner—terminals situated around the world spp trressed the central database system through phone lines and other data networks. $5 Universities: For student information, course registrations. and grades. > qos" Credit Card ‘Transactions: For purchases on credit cards and generation of monthly Ca statements. i>. Telecommunication: For keeping records of calls made, generating monthly bills, jintaining balances on prepaid calling cards, and storing information about the Be communication networks. RRP, Finances For storing inkiemaiion aboct: holdiigs, sales; and purchases of financial WP instruments such as stocks and bonds > oe Sale For customer, product, and purchase information. 5, Manufacturing: For management of supply chain and for tacking production of items in Yr lectories, inventories of items in warchouses/stores, and orders for items. > 9. Human resources: For information about employees, salaries, payroll taxes and benefits, Pron for generation of paychecks. > 10. Railway Reservation Systems: For reservations and schedule information wal ‘Web: For access the Back accounts and to get the balance amount. 12. E-Commerce: For Buying a book or music CD and browse for things like watches, = mobiles from the Internet. CHARACTERISTICS OF DATABAS The database approach has some very characteristic features which are discussed in detail Pe Structured and Described Data: - Fundamental feature of the database approach is that the database system does not only 1 4contain the data but also the complete definition and description of these data. These A escnptions are basically details about the extent. the structure, the type and the format of all © data and. additionally, the relationship between the data. This kind of stored data is called metadata (“data about dat Soe es Modifications at this level are usually to improve performance. Logical Data independence ((_kemicntscneme J toe iwoviiaidteeeeanet ‘ Physical Data Independence Fig: Data lhdependence x The ability to modify the cones schema without causing application programs to be rewritten Usually done when logical structure ol atabase is altered + \ Logical data independence is harder to achieve as the application programs are usually a heavily dependent on the logical structure of the data, =I DATABASE SYSTEM STRUCTURE: \ - . 5 A database system is partitioned into modules that deal with each of the responsibilities | 7. of the overall system. The functional components of a database system can be broadly divided into the storage manager and the query processor components. The storage manager is important because databases typically require a large amount off storage space. Some Big organizations Database ranges from Giga bytes to Tera bytes. So main memory of computers cannot store this much information, the information is stored disks. Data are moved between disk storage and main memory as needed. é The query processor also very important because it helps the database ‘system simplify” and facilitate access to data. So quick processing of updates and queries is imy it. It is the: job of the database system to translate updates and queries written in a nonprocedural language, Application software does not need any knowledge about the physical data storage like encoding, format, storage place, etc. It only communicates with the management system of a database (DBMS) via a standardized interface with the help of a standardized language like SQL. The access to the data and the metadata is entirely done by the DBMS. In this way all the applications can be totally separated from the data. Data Integrity: Data integrity is a byword for the quality and the reliability of the data of a database system. In a broader sense data integrity includes also the protection of the database from Ity) and unauthorized changes Data reflect facts of the real A transaction is a bundle of actions which are done within a database to bring it from one consistent state to a new consistent state. In between the data are inevitable inconsistent. A transaction is atomic what ‘means that it cannot be divided up any further. Within a transaction all or none of the actions need to be carried out. Doing only a part of the actions would lead to an inconsistent database state Example One example of a transaction is the transfer of an amount of money from one bank account to another Data persistence means that in a DBMS all data is maintained as long as it is not deleted explicitly. The life span of data needs to be determined directly or indirectly be the user and must not be dependenton system features-Additionally data once-stored:in-# database: must-not —— be lost. Changes of a database which are done by a transaction sre persistent. When a transaction is finished even a system crash cannot put the data in danger ‘CVPES OF DATABASES: Database can be classified according to the following factors. They are [Number of Users 2 Database Location 3. Expected type 4. Extent of use 1. Baved on number of Users: According to the number of users the databases ean be classified into following types. They are a), Single user b). Multiuser Sins . * Single user database supports only one user at a time Desktop or personal computer database is an example for single user database. Multiuser database: * Multi user database supports multiple users at the same time Workgroup database and ent Wor database: databases are examples for multiuser database If the multiuser database supports relatively small number of users (fewer than 50) within an organization is called as Workgroup database Enterprise database: If the database is used by the entire organization and supports multiple users (more than 50) across many departments is called as Enterprise database According to the location of database the databases can be class NS They ae Ny a) CentralizedDatabase b) Distributed Database Centralized Database: Itisa database that is located, stored, and maintained in a single location This location is most often a central computer or database system, for example a desktop or server CPU. oe a mainframe computer. In most cases, a centralized database would be used by an organization (e.g. a business company) or an institution (c g a university ) Distributed Database: A distributed database 1s a database in which storage devices are not all attached to a common CPU. It may be stored in multiple computers located in the same physical location. or may be dispersed over a network of interconnected computers ‘RODUCTION TO DATABASE-MANAGEMENT SYSTEM: Databaye Management System: A database-management system (DBMS) is a collection of interrelated data and a set of programs to access those data ‘The DBMS 1s a general purpose software system that facilitates the process of defining. constructing and manipulating databases for various applications. UUMAMI UU EMU UU GG Goals of DBMS; The primary goal of a DBMS is to provide a way to store and retrieve database information that is both convenient and effictent 1. Manage large bodies of information 2 Provide convenient and efficient ways to store and access information, 3. Secure information against system failure or tampering 4. Permit data to be shared among multiple users Proncrtics of DBMS: 1A Database represents some aspect of the real world, Changes to the real world reflected in the database. 2.A Database is a logically coherent collection of data with some inherent meaning 3.A Database is designed and populated with data for a specific purpose. Need of DBMS: 1, Before the advent of DBMS, organizations typically stored information using a “File Processing Systems” Example of such systems is File Handling in High Level Languages like C, Basic and COBOL. cele., these systems have Major disadvantages to perform the Data Manipulation. So to ‘overcome those drawbacks now we are using the DBMS. 2.Database systems are designed to manage large bodies of information. 3. In addition to that the database system must ensure the safety of the information stored. despite system crashes or attempts at unauthorized access. If data are to be shared among several users, the system must avoid possible anomalous results Using a DBMS to manage data has many advantages Application programs should be as independent as possible from details of data representation and storage. The DBMS can provide an abstract view of the data to insulate application code from such details. A DBMS utilizes @ variety of sophisticated techniques to store and retrieve data efficiently. This feature is especially important if the data is stored on external storage devices. VU UU Bee eee ee If data is always accessed through the DBMS, the DBMS can enforce imtegrity constraints on the data. For example, before inserting salary information for an employee. the DBMS can check that the department budget ts not exceeded Also. the DBMS can enforce access controls that govern what data is visible to different classes of users Concurrent Ai “ras wv A database system allows several users to access the database concurrently. Answering different questions from different users with the same (base) data is a central aspect of an information system. Such concurrent use of data increases the economy of a system. An example for concurrent use is the travel database of a bigger travel agency. The employees of different branches can access the database concurrently and book journeys for their clients. Each travel agent sees on his interface if there are still seats avatlable for a specific journey or if itis already fully booked. ADBMS also protects data from failures such as power failures and crashes ete. by the recovery schemes such as backup mechanisms and log files etc Data Administration: When several users share the data, centralizing the administration of data can offer significant improvements. Experienced professionals, who understand the nature of the data being managed, and how different groups of users use it, can be responsible for organizing the data representation to minimize redundancy and fine-tuning the storage of the data to make retrieval efficient, ‘Reduced Application Development Time: DBMS supports many important functions that are common to many applications accessing data stored in the DBMS. This, in conjunction with the high-level interface to the data, facilitates quick development of applications. Such applications are also likely to be more robust than applications. developed from scratch because many important tasks are handled by the DBMS instead of being implemented by the application. Danger of a Overkill For small and simple applications for single users a databese system is often not advisable Complexity A database system creates additional complexity and requirements. The supply and ‘operation of a database management system with several users and databases ts quite costly and demanding. Qualified Personnel, The professional operation of a database system requires appropriately trained stall Without a qualified database administrator nothing will work for long Costs ‘Through the use of a database system new costs are generated for the system itself but also for additional hardware and the more complex handling of the system. Lover Efficiency, AA database system is a multi-use software which is oflen Jess efficient than specialized software which is produced and optimized exactly for one problem TORS: People who work with a database can be categorized as database users or datubase administrators. Database Users: There are four different types of database-system users, differentiated by the way they ‘expect to interact. with the system, aa ‘Naive users: Naive users are unsophisticated users who interact with the system by invoking one of the Anfecaet with the system by invoking one of the application programs that have been wnitten previously. psa cn nin All sito For example, a bank teller who needs (0 transfer $50 from account to account invokes a program called iransfer. This program asks the teller for the amount of money to be transferred, the account from which the money is to be transferred, and the account to which the money is to be transferred icati grai Application programmers are computer professionals who white application programs. Application programmers can choose from many tools to develop user interfaces. Rapid “application development (RAD) tools are tools that enable an application programmer to Construct forms and reports without writing a program. Sophisticated users: Sophisticated users interact with the system without writing programs. Instead, they form their requests fi database query language. They submit each such query to a query ro ef 0 DML ction he storage manager crate ‘Analy who submit queries to ocr data in the database fall in this category. "Specialized users: ‘Specialized users are sophisticated users who write specialized database applications that do-not fit into the traditional data-processing framework. ‘One of the main reasons for using DBMSS is to have central control of both the data and the programs that access those data. A person who has such central control over the system is called a database administrator (DBA). Database Administrator Functions/Roles: es The functions of a DBA include: nema cc ip Rate The BBX crete the original database schema by executing a set of data definition statements in the DDI Storage structure and aecess-method definition. Semtemnatts ins DI 6. Eee Le ae dacvtppeify, Ye loonie a Laps Ce ee = ee ‘The DBA carries out changes to the schema and physical organivation to reflect the changing needs of thé organization, or to alter the physical organization to improve performance. ‘Granting of authorization for data access: By granting different types of authorization, the database administrator can regulate which parts of the database various users can access. The authorization information is kept ina cial system structure that the database consults whenever someone attempts to access the data in the system. Routine maintenance, Examples of the database administrator’s routine maintenance activities are: 1 Periodically backing up the database, either onto tapes or onto remote servers, to prevent loss of data in case of disasters Such as ng. 2.Ensuring that enough free disk space is available for normal operations, and upgrading disk space as required. 3. Monitoring \ing on the database and ensuring that performance is not degraded by ensuring that performance is not degraded | very expensive tasks submitted by some users. Ses LEXELS OF ABSTRACTION INA DBMS: Hiding certain details of how the data are stored and maintained. A major purpose of database sysiens is to provide users with an “Abstract View” of the data, tn DI levels of data abstraction. The goal of the abstraction in the DBMS is to separate the users Fequest andthe physical storage of dain RISE Levels of Abstraction: mee : Ssh os " (The lowest Level of Abstraction describes “How” the data are actually stored. _ ‘The physical level describes complex low level data structures in detail. 8 te lu YI AY. | | | Logical Level; This level of data Abstraction describes “What” data are to be stored in the database and Database Administrators use the logical level of abstraction View Level: Itis the highest level of data Abstrac! describes only part of entre database Different users require different types of data elements from each database The system may provide marty views for the some database views For the some database. THREE HEMA ARCHITECTURE: hema: “The overall design of the database is called the “Schema” or "Meta Data” A database schema corresponds to the programming language type definition. The value of a variable in programming language corresponds to an “Instance” of a database Schema Three Schema Architecture: ‘The goal of this architecture is to separate the user applications and the physi database. In this architecture, schemas can be defined at the following three levels |The internal level has an internal schema, which describes the physical storage structure of the database: The internal schema uses a physical data mode! and describes the complete details of data storage and access paths for the database, — Nasco , 2. The conceptual level has a conceptiial schema, which describes the structure of the whole database for a community of users. The conceptual schema hides the details of physical Storage stroctures and concenirates on describing entities, data types, relationships, user operations, and constraints. A high-level data mode! or an implementation data model can be used at this level. 3. The external or view level view eel loclude vrata Shea oar view al external schema describes the part of the database that a particular user group is iabesedie in and hides the rest of the database fom that user group. A high-level data model or an implementation data model can be used at this Jevel eee =e" Hered Larsemrs Carats wees fareneee Dems Fig: Three-Schema Architecture one xh in uneffert chee“ DATAINDEPENDENCE: PR ee ease 4 © Avery important advantage of using DBMS is that it offers Data Independence, "The ability to modify a scheme definition in one level without affecting a scheme definition in a higher level is called data independence. “There are two kinds: 1, Physical Data Independence 2. Logical Data Independence Physical Data Independence: > Se Ae “\. The ability to modify the test icat ae CaUSTAE feared programs to be epee Sea ordiratey Coe be chogcel_ a es ee hanes 7 ite YN - PULAU UU UU u a Modifications at this level are usually to improve performance. Logical Data indepencence (—eentcat Semema J Physical Data Independence Fig: Data Independence BA be © hong Logical Data Independence: “Gmaceptrel sche Were external Achemor - The ability to modify the conceptual schema without causing application programs to be rewntten: Usually done when logical structure of database is altered Logical data independence is harder to achieve as the application programs are usually heavily dependent on the logical structure of the data y shuchre a dalabene is fi DATABASE SYSTEM! STRUCTURE A database system is partitioned into modules that deal with each of the responsibilities of the overall system. The functiorial components of a database system can be broadly divided into the storage manager and the query processor components. ‘The storage manages is important because databases typically require a large amount of storage space. Some Big organizations Database ranges from Giga bytes to Tera bytes. So the main memory of computers cannot store this much information, the information is stored on disks. Data are moved between disk storage and main memory as needed. | a "The query processor also very important because it helps the database system simplify and facilitate access to data. So quick processing of updates and queries is important. It is the job of the database system to translate updates and quenes written in a nonprocedural language, po p i Tw y. vv¥ ULUTUUV YUU w % eo vie A storage manager is a program module that provides the interface between the low level data stored in the database and the application programs and queries submitted to the system, The storage manager is responsible for the interaction with the file manager The storage manager translates the various DML statements into low-level file-system commands Thus, the storage manager is responsible for storing, retrieving, and updating data in the database, rage Manager Components: Authorization and integrity manager which tests for the satisfaction of integrity constraints and checks the authority of users to access data ‘Transaction manager which ensures that the database itself remains in a consistent state despite system failures, and that concutrent transaction executions proceed without conflicting. File manager: which manages the allocation of space on disk storage and the data structures used to represent information stored on disk. Buffer manager which is responsible for fetching data from disk storage into main memory. Storage manager implements several data structures as part of the physical system implementation. Data files are used to store the database itself, Data dictionary 1s used to stores metadata about the structure of the database, in particular the schema of the database, - Query Processor Components: DDL. interpreter: [t interprets DDL statements and records the definitions in the data dictionary. DML compiler; It translates DML statements in a query language into an evaluation plan consisting of low-level instructions that the query evaluation engine understands. —Query-evaluation engine: H-executes low-level instructions generated by the DML-compiler, Application Architectures: Most users of a database system today are not present at the site of the database system, but connect to it through a network, We can therefore differentiate between client machines, on which remote database users’ work, and server machines, on which the database system nuns. Database applications are usually partitioned into two or three parts, They are: LTwo = Tier Architecture 2. Three ~ Tier Architecture. Two-Ther Architecture: ‘The application is partitioned into a component that resides at the client machine, Which invokes database system fancsionaiity at the server machine through query language Statements. Application program interface standards like ODBC and JDBC are used for interaction between the client and the server. ‘Three-Tier Architecture: The client machine acts as merely a front end and does not contain any direct database calls. Instead, the. client end communicates with an application server, usually through forms interface. The application server in tum communicates with a database system to access data, ‘The business logic ‘of the application, which says what actions to carry out under what conditions, is embedded in the application server, instead of being distributed across multiple clients. Three-tier applications are more appropriate for large applications, and for applications that run on the World Wide Web. "DATABASE DESIG! The database design process can be divided into six steps. The ER Model is most _ relevant tothe first three steps. Next three steps are beyond the ER Model. A. Requirements Analysis: The very first step in designing a database application is to understand what data 1s t0 be Stored in the database, what applications must be built on top of it, and what operations are most frequent and subject to performance requirements The database designers collect information of the organization and analyzer, the information to identify the user’s requirements The database designers must find out what the users want from the database. 2. Concentual Database Design: Once the information is gathered in the requirements arazysis step a conceptual database design is developed and 1s used to develop a high level description of the data to be stored in the database, along with the constraints that are known to hold over this data. This step 1s often carried out using the ER model, ora similar high-level data model. 3. Logical Database Design: In this step convert the conceptual database design into a database schema (Logical Database Design) in the data model of the chosen DBMS. We will only consider relational DBMSs, and therefore, the task in the logical design step is to convert an ER schema into a relational database schema. The result is a conceptual schema, sometimes called the logical schema, in the relational data mode! Beyond the ER Design: ‘The first three steps are more relevant to the ER Model. Once the logical scheme 1s defined designer consider the physical level implementation and finally provide certain security measisres. The remaining three steps of database design are briefly described below 4, Schema Refinement: The fourth step in database design is to analyze the collection of relations in our relational database schema to identify potential problems; and to refine it. In contrast to the requirements analysis and conceptual design steps, which are essentially subjective, schema refinement can be guided by some elegant and powerful theory. _ Physical Database Design: In this step we must consider typical expected workloads that our database. must support and further refine the database design to ensure that it meets desired performance criteria, This step may simply involve building indexes on some tables and clustering some tables, or it may involve a substantial redesign of parts of the database schema obtained from. the earlier design steps $. Security Design: The last step of database design is to include security features. This is required to avoid, __liMluthorized access 10 database practice after all the six steps. We required Tuning step in ‘which all the steps are interleaved and repeated until the design is satisfactory. DBMS FUNCTIONS; DBMS performs several important functions that guarantee the integrity and consistency of the data in the database, ‘Those functions transparent to end users and can be accessed only through the use of DBMS. They include: | Data Dictionary Management Data Storage Management ‘Data transformation and Presentation -) Security Management .) Multiple Access Control } Backup and Recovery Management ) Data Integrity Management {) Database Access Languages () Databases Communication Interfaces ‘Data Dictionary Management: DBMS stores definitions of database elements and their relationship (Metadata) in the data Se dictionary, I The DBMS wes the dat dictionary ook up the egies competent strates nd relationships. ‘Any-changs made in database stature is automatically recorded inthe data dictionary Modern DEMS provides storage not sity for date but alto for related dete’ entities ‘Daw Storage Management is also important for database “performance tuning” Perfomance toning neleed to activites that mie data mae stcwemye . Lo LVDLUVIVOVE UYU YOUU OU ee to user's logical make_it_contirms expectations. DBMS also presents the data in the user's expected format ~ DBMS creates a security system that enforces the user security and data privac Security rules determines which users can siccess the latabase, which data items each us user access ie DBA and aut ted user logged to DBMS through usemame and password or through Biometric authentication such as Fingei print and face reorganizatign ele ——— Multiuser Access Control; ‘To provide data integrity and data consistency, BMS uses sophisticated algorithms to ensure that multiple users can access the database concurteily without compromising “The integrity of database. skuy 0) Managemet 7 DBMS provides backup and recovery to ensure data safety and integt | a Recovery management deals with the recovery of database after failure such as bad sector in the disk or power failure, Such capability is critical to preserve database integrity. int M ] DBMS provides and enfotces integrity rules, thus minimizing data redundancy and maximizing data eens: a )_ Ensuring data integrity is especially important in transaction oriented database systems. _ Database Access Languages: Q DBMS provides date access through a query language. emer mrennnmc ae A query language is a non-procedural language i.e. it lets the user specify what -mndst Be done WithoUT SPETH AE Mow ts to Be done 3 SQL is the default query language for data access. Sea eet se tee Databases Communication Interfaces: < Current DBMS’s are accepting end-user requests via different network environments. ig end-user requests ee ee °) For example, DBMS might provide access to database via Internet through the use of web browsers such as Mozilla Firefox or Microsoft Intemet Explorer. | auseeie hoy pF si fe tala: A database schema is the skeleton structure that represents the logical view ofthe entire database. (or) om | The logical structure of the database is called as Database Schema. (or) ‘The overall design of the database is the database schema, It defines how the data is organized and how the relations among them are associated. It formulates all the constraints that are to be applied on the data. pala Mock 1 Hes We alehetecbe “play x “etding. dlp in buideling Cmuphal mock Te oor ipo Data} Whed—system Contry. oes sibabubal nek ababidip— anh'tegtos. t ic WW z $ f gi e m 2 vee oe STUDENT J SID SNAME Te tt Madore in the dake bere at What is Instance®” CaQ0ee bay f° OK pontiertown mumovt is @ an instance - The actual content of the database at a particular a tial 19%? toy point in time. (Or) _ Ly Bt 1s snapshot od a dlokabarn oka cpeesfre rot atrigoy Luo? acer The data stored in the database at any given time is an instance of the database ‘Student a [201 Nenkar ora [07g oraz] In the above table 1201, 1202, Venkat etc are said to be instance of student table ub Schema» at Nan applicahn proqpamme's or useas vsvbot ol TUQUUVUUTUEUT Ter 77777 Hn Oaea Hem ond prs, Wich he or she ued - | proyamrr. {att calurvacws : CrP Ry san [2 codvurn} - oa | bi a uwholgs leq conbake a Concept Contlidate Krys. 4 ot ted we of 1 > verge 2 & plkpeteed Unto [Weeden Robes Phere, ee ported ° piven cay = Lyrae ttle Bopper tT . pene donep el —eecmere - gone Pats [een owe tor Afr ‘ ban bok , . eee —_ = STUDENT ‘What is Instance? The actual content of the database at a particular point in time. (Or) The data stored in the database al any given time is an instance of the database Student Bid [Name Tho i201 _— Venkat ‘901490142 1203 tea 9014774422 In the above table 1201, 1202, Venkat etc are said to be i of student table, a Palalen SY) allen 1S bo andl EE Thafvo hak Speesficl to dustngitth from oncor move akbibubeys Hot allow Gie-cd brary > SG s ? eae nt ye Tew > Ce PK = Pk, BROS . ai) Seemtbyy tay > ee a Ae enh “apne. ID foretym Wy 5 Us a _obtdbube udhose veux, match the Ap Prdms_gabet ek Sable se € Filesystem 1 management Se collection of data” Any| with the file system, user has to write the procedure: File system The 2 data representation and Storage of data In File system stormg and retrieving of data 3 cannot Eves Tens ol be done efficiently. ‘Concurrent access to the data in the file systery| 4.has many problems like : Reading the file while other deleting some information, updating some information Tile system S. recovery ‘mechanism. Eg. While we are entering some data into the file if] System crashes then content of the file is lost doesnt provide crash T DEMS sa collection of data and wer fot required to write the procedurés for managing! the database 2. DBMS provides an abstract view of data that hides the details. 3 DBMS wide varieties and tetrieve the data, is efficient to use since there are] of sophisticated techmques to store 4, DBMS takes care of Concurrent access using some form of locking, 5. DBMS has crash recovery mechanism, DBMS protects user from the effects of system failures 6_ Protecting a file under file system is very difficult © DBMS has a good protection mechanism,

You might also like