Você está na página 1de 19

Database Management Systems

Text Books
(1) DBMS by Raghu Ramakrishnan (2) DBMS by Sudarshan and Korth

Material Source
www.jntuworld.com & edited accordingly by Aditya faculty

Email IDs of Faculty:


Dr. Giri Tiruvuri (girit@aec.edu.in) Mr. Suresh Mudunuri (sureshm@aec.edu.in) Mr. Ramsekhar (ramsekharg@aec.edu.in) Ms. Devi Priya (devipriya.k@aec.edu.in) Ms. Shanti (shanti.g@aec.edu.in) Mr. Rajendra (rajendra.d@aec.edu.in) Mr. Sudheer (sudheer.s@aec.edu.in)

Database System Applications


Database Management System (DBMS) contains information about a particular enterprise Collection of interrelated data Set of programs to access the data An environment that is both convenient and efficient to use Database Applications: Banking: all transactions Airlines: reservations, schedules Universities: registration, grades Sales: customers, products, purchases Online retailers: order tracking, customized recommendations Manufacturing: production, inventory, orders, supply chain Human resources: employee records, salaries, tax deductions Databases touch all aspects of our lives

Unit 1 (2010-2011)

Aditya Engineering College

DBMS Is Every Where

Unit 1 (2010-2011)

Aditya Engineering College

Database Management Systems

Resources are the assets of an organization, which are used to produce an output. Eg.: People, machines, finance etc.

Resources are either physical (Eg.: people, machines) or conceptual (Eg.: data, information)
A Business organization is composed of resources that flow into the organization from its environment and then return to the environment. For example, students are the resources of a college. As organizations grow bigger, handling of the physical resources by observation becomes difficult and conceptual resources like information become necessary. Information is a major resource that must be managed.

Unit 1 (2010-2011)

Aditya Engineering College

Steps in resource management


Resource management includes 1. Acquisition prior to the time they are needed, 2. Store and Maintain the resources

3. Security measures to protect them from destruction and misuse.


4. Removal procedures (to clean up when they are no longer needed or pertinent).
Data and Information: Data: Facts concerning things such as people, object, events etc. e.g. students, the courses they are taking and their grades etc.
Information: Data that have been processed and presented in a form suitable for human interpretation, often with the purpose of revealing trends or patterns e.g. percentage enrollment in various courses, enrollment projections, top rankers etc.
Unit 1 (2010-2011) Aditya Engineering College

Steps in tranforming Data into Information


1. Acquisition: Acquiring data from the environment. This data acquired will be in an unorganized form. 2. Storage: It is at this level the data starts transforming into information and stored on a medium. 3. Manipulation: The stored information is manipulated according to the requirements. 4. Retrieval: The information is retrieved from the storage medium. 5. Distribution: The retrieved information is distributed/presented to the users.

Unit 1 (2010-2011)

Aditya Engineering College

Manual Information Systems


Disadvantages: A constant stream of intra-organizational paperwork may lead to communication gap. Duplicate data throughout the organization results in wastage of medium and inconsistency. It is not easy to answer complex queries. Managers cannot obtain summary information required for decision making. In order to overcome the disadvantages of manual information systems, organizations have automated the management of information. But it did not promise to eradicate all the disadvantages. The early information systems on computers started as file processing systems that consisted of applications and sets of files. An application is developed for each business process and for each application a set of files is maintained.
Unit 1 (2010-2011) Aditya Engineering College

Drawbacks of file systems


Data redundancy and inconsistency - Multiple file formats, duplication of information in different files. Difficulty in accessing data - Need to write a new program to carry out each new task Data isolation - multiple files and formats Integrity problems - Integrity constraints (e.g. account balance > 0) become buried in program code rather than being stated explicitly; Hard to add new constraints or change existing ones Atomicity of updates - Failures may leave database in an inconsistent state with partial updates carried out; Example: Transfer of funds from one account to another should either complete or not happen at all
Unit 1 (2010-2011) Aditya Engineering College

Drawbacks of file systems (Cont.)


Concurrent access by multiple users - Concurrent accessed needed for performance; Uncontrolled concurrent accesses can lead to inconsistencies. Example: Two people reading a balance and updating it at the same time Security problems - Hard to provide user access to some, but not all, data Database systems offer solutions to all the above problems DB System Applications:

Banking, Airlines, Credit Card, Universities / colleges, Telecom, Finance, Sales, Manufacturing, Human Resources
From Indirect usage to direct usage

Internet, on-line access bank accounts, books, order - everything in life


Big companies Oracle, Microsoft, IBM
Unit 1 (2010-2011) Aditya Engineering College

Database Approach
Many of the above mentioned disadvantages are a result of a paradigm which concentrates on the systems processes first (process-driven approach) and treats the data as inputs and outputs to those processes. The database approach instead considers the systems data first (data-driven approach) and then identifies the processes that interact with the data. Designers have discovered that a combination of the two approaches is usually the most appropriate. One reason for this is that there are always new processes in organizations that require new data and the structure of such data will be driven by the processes that use it.

DBMS consists of a collection of interrelated data and a set of programs to access those data. The primary goal of a DBMS is to provide an environment that makes it both convenient and efficient to retrieve and store the database information.
Unit 1 (2010-2011) Aditya Engineering College

DATA BASE LANGUAGE


Data Manipulation Language (DML)
Language for accessing and manipulating the data organized by the appropriate data model
DML also known as query language Two classes of languages Procedural user specifies what data is required and how to get those data Declarative (nonprocedural) user specifies what data is required without specifying how to get those data

SQL is the most widely used query language


Unit 1 (2010-2011) Aditya Engineering College

Data Definition Language (DDL)


Specification notation for defining the database schema Example: create table account ( account_number char(10), branch_name char(10), balance integer) DDL compiler generates a set of tables stored in a data dictionary Data dictionary contains metadata (i.e., data about data) Database schema Data storage and definition language Specifies the storage structure and access methods used Integrity constraints Domain constraints Referential integrity (e.g. branch_name must correspond to a valid branch in the branch table) Authorization Aditya Engineering College

Data Modelling
It is a methodology of translating Environment into data, which results in a data model. Data Model is a collection of constructs, operators and integrity rules, which together support a dynamic representation of real world objects and events. Constructs: Building blocks e.g. tables Operators: Means to maintain and retrieve data e.g. add, change, delete, select Integrity rules: Serve to maintain order and consistency in a data model e.g. no duplicates

It is important to view: 1. Tables not as files or inputs on the way to becoming outputs, but as miniature replicas of persons, places and things that are of interest to user community 2. Operators not as `report programs ' or `file updates, but as means whereby users view their model world and keep it synchronized with the real ones 3. Integrity rules not as edits, but physical laws in the environment
Aditya Engineering College

Data Models
A collection of tools for describing - Data , Data relationships, Data semantics and Data constraints Relational model Entity-Relationship data model (mainly for database design) Object-based data models (Object-oriented and Object-relational) Semi structured data model (XML) Other older models: Network model & Hierarchical model A data model is a collection of concepts for describing data. A schema is a description of a particular collection of data, using the a given data model. The relational model of data is the most widely used model today. Main concept: relation, basically a table with rows and columns. Every relation has a schema, which describes the columns, or fields.
Aditya Engineering College

What Is a DBMS?
A very large, integrated collection of data. Models real-world enterprise. Entities (e.g., students, courses) Relationships (e.g., Ravi is taking DBMS) A Database Management System (DBMS) is a software package designed to store and manage databases.

Why Use a DBMS?


Data independence and efficient access. Reduced application development time. Data integrity and security. Uniform data administration. Concurrent access, recovery from crashes.
Aditya Engineering College

Why Study Databases??


Shift from computation to information at the low end: scramble to web-space (a mess!) at the high end: scientific applications Datasets increasing in diversity and volume. Digital libraries, interactive video, Human Genome project, Internet data ... need for DBMS exploding DBMS encompasses most of CS OS, languages, theory, AI, multimedia, logic

Aditya Engineering College

Files vs. DBMS


Application must stage large datasets between main memory and secondary storage (e.g., buffering, page-oriented access, 32-bit addressing, etc.) Special code for different queries Must protect data from inconsistency due to multiple concurrent users Crash recovery Security and access control

Aditya Engineering College

Aditya Engineering College

Unit 1 (2010-2011)

Aditya Engineering College

Você também pode gostar