Every problem might not have a solution right now, but don’t forget that but every solution was once a problem.
--Your friends at LectureNotes

Note for Database Management System - DBMS By jayaprakash o v

  • Database Management System - DBMS
  • Note
  • 4 Topics
  • 9 Offline Downloads
  • Uploaded 1 year ago
0 User(s)
Download PDFOrder Printed Copy

Share it with your friends

Leave your Comments

Text from page-2

Database Management System  Airlines: For reservations and schedule information. Airlines were among the first to use databases in a geographically distributed manner.  Telecommunication: For keeping records of calls made, generating monthly bills, maintaining balances on prepaid calling cards, and storing information about the communication networks. Database system vs. File system File System:   This typical file-processing system is supported by a conventional (Standard) operating system. 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 database management systems (DBMSs) were introduced, organizations usually stored information in such systems. File-processing system has a number of major disadvantages, they are as below.  Data redundancy (duplication or repetition) and inconsistency.     Difficulty in accessing (reading or retrieving) data.    Data are scattered in various files, and files may be in different formats, writing new application programs to retrieve the appropriate data is difficult. Integrity (wholeness) problems.   File system not support data accessing flexibility. Need to filter out the data manually or go for accessing programs newly. Data isolation (separation).   The same information may be duplicated in several places (files). The duplication of data results in increase in size of the file and improper updating. The improper updating of data causes in inconsistency. There is need to maintain conditions while storing data, In file system maintaining such conditions results in problem, due to scattered data among different files. Atomicity problems.  A computer system, like any other device, is subject to failure. In many applications, it is crucial that, if a failure occurs, the data be restored to the consistent state that existed prior to the failure.  In file system the atomicity is difficult to achieve, where as in DBMS atomicity is achieved through transaction management. 2 Raghu Gurumurthy, MCA (Site : www.raghug.in, Phone no: 9060130871)

Text from page-3

Database Management System  Concurrent (Simultaneously) access anomalies.    Accessing the data simultaneously results in improper incorrect results. In multi user environment concurrent access is a essential service, need to meet it and DBMS is achieved it properly through. Security problems.   Security is the important for the vital data, since unauthorized accessing of data results in leakage of information. DBMS loaded with good security mechanism with authorization and authentication. View of Data: A major purpose of a database system is to provide users with an abstract view of the data. That is, the system hides certain details of how the data are stored and maintained. Note: Abstraction is hiding the complexity of the system from the end user. The view of data is classified as follows.  Physical level.  The lowest level of abstraction describes how the data are actually stored.  The physical level describes complex low-level data structures in detail.  Logical level.     The next-higher level of abstraction describes what data are stored in the database, and what relationships exist among those data. The logical level thus describes the entire database in terms of a small number of relatively simple structures. The user of the logical level does not need to be aware of this complexity physicallevel structures, this is referred as physical data independence. View level.   This is the highest level of abstraction describes only part of the entire database. The view level of abstraction exists to simplify their interaction with the system. The system may provide many views for the same database. Below diagram shows the different levels of the views. 3 Raghu Gurumurthy, MCA (Site : www.raghug.in, Phone no: 9060130871)

Text from page-4

Database Management System Instances and Schemas    The collection of information stored in the database at a particular moment is called an instance of the database. The overall design of the database is called the database schema. Self description of the database is called schema. The schemas are classified as below.    The physical schema describes the database design at the physical level. The logical schema describes the database design at the logical level. A database may also have several schemas at the view level, sometimes called subschema‟s, that describe different views of the database. Data Models Underlying the structure of a database is the data model. Data models consists of     A collection of conceptual tools for describing data. Data relationships. Data semantics and consistency constraints. A data model provides a way to describe the design of a database at the physical, logical, and view levels. The data models can be classified into four different categories.     Relational Model. Entity-Relationship Model. Object-Based Data Model. Semi structured Data Model. Database Languages   A database system provides a data-definition language to specify the database schema Data-manipulation language to express database queries and updates. Note: The data-definition and data-manipulation languages are not two separate languages, instead they simply form parts of a single database language, such as the widely used SQL language. Data-Manipulation Language (DML) A data-manipulation language (DML) is a language that enables users to access or manipulate data as organized by the appropriate data model. The types of access are: • Retrieval of information stored in the database • Insertion of new information into the database • Deletion of information from the database • Modification of information stored in the database 4 Raghu Gurumurthy, MCA (Site : www.raghug.in, Phone no: 9060130871)

Text from page-5

Database Management System There are basically two types DMLs: • Procedural DMLs require a user to specify what data are needed and how to get those data. • Declarative DMLs (also referred to as nonprocedural DMLs) require a user to specify what data are needed without specifying how to get those data. Ex: SQL query that finds the names of all instructors in the History department select instructor.name from instructor where instructor.dept name = ‟History‟; Query: A query is a statement requesting the retrieval of information from database. Query language: The portion of a DML that involves information retrieval is called a query language. Data-Definition Language (DDL)      We specify a database schema by a set of definitions expressed by a special language called a data-definition language (DDL). The DDL is also used to specify additional properties of the data. Specify the storage structure and access methods used by the database system by a set of statements in a special type of DDL called a data storage and definition language. The statements define the implementation details of the database schemas, which are usually hidden from the users. DDL facilitate data values stored in the database must satisfy certain consistency constraints. Ex: SQL DDL statement defines the department table create table department (dept name char (20), building char (15), budget numeric (12,2)); Type of constraints  Domain Constraints.     A domain of possible values must be associated with every attribute (for example, integer types, character types, date/time types). Declaring an attribute to be of a particular domain acts as a constraint on the values that it can take. Domain constraints are the most elementary form of integrity constraint and they are tested easily by the system.  Referential Constraints.  There are cases where we wish to ensure that a value that appears in one relation for a given set of attributes also appears in a certain set of attributes in another relation. 5 Raghu Gurumurthy, MCA (Site : www.raghug.in, Phone no: 9060130871)

Lecture Notes