Upload
07deeps
View
1.277
Download
1
Tags:
Embed Size (px)
DESCRIPTION
Citation preview
Overview of Database Management Systems
Objectives & Role
Advantages & Disadvantages of DBMS
SQL
Uses of Database for Integration across Functional Areas
Database Applications
• In most organizations the data files tend to grow In most organizations the data files tend to grow independentlyindependently
• Accounting, HR, Marketing, Manufacturing etc, all Accounting, HR, Marketing, Manufacturing etc, all departments end-up developing their own departments end-up developing their own independent systems and data filesindependent systems and data files
e.g. e.g. • HR dept may have a master file containing payroll file, HR dept may have a master file containing payroll file,
employee insurance file, pension fileemployee insurance file, pension file• At the same time Accounting dept may also have the same At the same time Accounting dept may also have the same
filesfilesMany files in organizationMany files in organizationDifficult to manageDifficult to manageWastage of resourcesWastage of resources
• Many businesses often do not haveMany businesses often do not have
- - timelytimely
- accurate- accurate- or relevant information- or relevant information- because of poorly organized data- because of poorly organized data
This is why the database management systems are so This is why the database management systems are so essentialessential
We will be discussing the roles/ benefits of Database We will be discussing the roles/ benefits of Database Management Systems in the later sessionsManagement Systems in the later sessions
Track information Keep consistent standards Allow higher productivity as a
result of better information
A structured collection of related data An filing cabinet, an address book, a
telephone directory, a timetable, etc. Google and your email is a database School Student Information System
Database System
A database, a database management system and appropriate hardware and personnel.
7
number, Designati
onHours
worked, Pay rate
Insurance, Pension
Database Management SystemSystems software that facilitates the
management of a database.
E.g. Oracle, Access, SQL Server
8
DBMS An application software that organises
data into records in one or more databases and allows organising, accessing and sorting of the data in a variety of formats.
9
• Bit
• Byte
• Field▫ Smallest meaningful unit of data▫ Group of one or more characters that has a specific meaning
• Record▫ Set of fields containing all information known about one
entity▫ Each record contains the same fields in the same sequence
• File▫ Collection of related records
TableName: Barry HarrisCollege: MedicineTel: 392-5555
Name: Barry HarrisCollege: MedicineTel: 392-5555
Name: Barry Harris
Field
Record
Records
Fields
Name GatorLink Phone College
Graff rgraff 392-3900 Pharmacy
Harris bharris 392-5555 Medicine
Ipswich zipswich 846-5656 PHHP
Four components: People, H/W, S/W, Data Practitioners (analysts and database
designers) in consultation with users identify data needs and design database structures to accommodate these needs.
The database structures are specified to the DBMS through the data dictionary.
14
•Users enter data into the system by following specified procedures.
•The entered data are maintained on hardware media such as disks and tapes.
•Application programmes that access the database are written by practitioners and users to be run on computers.
15
16
DATABASE
DATA DICTIONAR
Y/ DIRECTORYUSER
PROGRAMMER
Data Dictionary/ Directory
SubsystemSecurity and
Integrity SubsystemDatabase
Access Subsystem
User Query and Reporting
Facilities
Application Program
Development Facilities
DBMS
USER
PROGRAMMER
17
DATABASE
DATA DICTIONAR
Y/ DIRECTORY
Application Program
Application Program
Application Program
DBMS
ComputerTerminals
PRINTER
Analyst
User
Set of physical devices on which a database resides. It consists of one or more computers, disk drives, CRT terminals, printers, tape drives, connecting cables and other auxiliary and connecting hardware.
18
19
Client
Client
Server
TAPETAPEPrinter
A database software includes two types of softwareGeneral-purpose database management
software like operating system.Application software that uses DBMS
facilities to manipulate the database to achieve a specific business function, such as providing reports or documents, which can be used by users.
20
•Application software is generally written standard programming language such as C, or it may be written in a language (commonly called a fourth-generation language) supplied with the DBMS.
•These programs utilise the command language of the DBMS and make use of the information contained in the data dictionary.
21
• User Interface▫ Language, menus and other facilities by which
users interact with various system components, such as application programs, the DBMS
• Computer-aided software engineering (CASE) tools▫ Automated tools used to design databases and
application programs.
22
A subsystem that keeps track of thedefinitions of all data items in the
database. relationships that exists between
various data structures. indexes that are used to access data
quickly.screen and report format definitions that
may be used by various application programs.
23
Definitions of data items in the database includes:
Elementary-level data items (fields), group and record-level data
structures, andfiles or relational tables.
24
25
• Data that describe the properties or characteristics of other data.
• Some of these properties include data definitions, data structures and rules or constraints. Item name, the data type, length, minimum and maximum allowable values (where appropriate) and a brief description of each data item.
• Metadata allow database designers and users to understand what data exist, what the data mean.
• Data without clear meaning can be confusing, misinterpreted or erroneous.
Metadata
26
E.g. Data Item ValueName Type Length Min Max
DescriptionName Character 30 Employee NameID Number 9 Employee No.Dept Character 10 Dept. No.Age Integer 2 18 60 Employee Age
Name Character 15 Dept. NameManager Number 9 Mgr. Emp. No.
Employee No. (ID) uniqueManager is an employee of the organisation
Metadata
Two different types of people (users and practitioners) are concerned with the database.
Userswho need information from the
database to carry out their primary business responsibility
e.g. Executives, managers, staff, clerical personnel
27
Practitioners▫people responsible for the
database system and its associated application software.
e.g. Database administrators, analysts, programmers, database and system designers, information systems managers.
28
Database Applications:Banking: all transactionsAirlines: reservations, schedulesUniversities: registration, gradesSales: customers, products, purchasesManufacturing: production, inventory,
orders, supply chainHuman resources: employee records,
salaries, tax deductions Databases touch all aspects of our lives
The database is a valuable resource needing protection.
The DBMS provides database security by limiting access to the database to authorised personnel.
Authorised users will generally be restricted as to the particular data they can access and whether they can update it.
31
Access is often controlled by passwords and by data views, which are definitions of restricted portions of the database.
32
1
Data items
234
The integrity and consistency of the database are protected via constraints on values that data items can have and by backup and recovery capabilities provided within the DBMS.
Data constraint definitions are maintained in the data dictionary.
33
Backup and recovery are supported by software that automatically logs changes to the database and provides for a means of recovering the current state of the database in case of system failure.
34
One of the chief functions of the DBMS is to support the access, retrieval and update of data in the database.
The DBMS provides the physical mechanisms allowing multiple users to access a variety of related data quickly and efficiently.
35
DBMS provides user-oriented data manipulation tools.
Easy-to-use query languages allow users to formulate queries and request one-time reports directly from the database.
Often query languages will contain facilities to format the results of queries as reports.
36
Capabilities vary considerable, but basic operations are:
Data definition Data entry Data manipulation Data display
37
Database TypesRelationalObject-orientedHierarchical
Each type structures, organizes and uses data differently
Hierarchical relationships among different types of data.
Can be very easy to answer some questions, but very difficult to answer others
If one-to-many relationship is violated (e.g., a patient can have more than one physician) then the hierarchy becomes a network
Root
1st Child
2nd Child
EMPLOYEEoIdoDeptoPositionoAddress
COMPENSATIONADDITIONAL
BENEFITS
HEALTH INSURANCE
PERFORMANCE RATING
SALARY HISTORY
•Data are organized as logically independent tables
•Not so strongly biased towards specific questions
•Expresses relationships by means of shared data rather than explicit pointers
•Theoretical basis: relational algebra, calculus; closure
•Operations on tables (Join, Project, Select) to form new tables
Object-oriented analysis is another way to model the world, involving abstraction, encapsulation, modularity and hierarchy (with inheritance).
An object consists of data and methods. Classes are used to group objects which
have the same types of data and the same methods.
Data Warehouses Data Marts OLAP (Online Analytical Processing)
Data Mining
Data Warehouseso It is hard to gather data from different
departmentso Data Warehouse stores the current and historical
data throughout the companyo This data originates from different TPS such as
Sales, Finance, HR etco Data Warehouse consolidates and standardize the
information gathered from different operations databases
o This information is further used for management analysis and decision making
Data Martso Smaller Data Warehouses or Subset of Data
Warehouseo For specific population of users
OLAPo Supports multidimensional data analysis i.e. enables
users to view the same data in various ways using multiple dimensions
o Enables users to obtain online answers to ad-hoc questions
Data Miningo More discovery-driven i.e. provides insights into
organization data that can not be obtained by OLAPo Patterns and rules are used to guide decision making or
forecasting the effects
Example:A supermarket data tells that Coca-Cola is purchased 65%
of the time, but whenever there is special sale on Coca-Cola, the figure goes to 85%.
How to project or analyze the overall profitability from different types of special sale? (what-if analysis)
How can we analyze the group of items e.g. people buying Coca-Cola and Chips at the same time?
• Data independence
•Application programs should not, ideally, be exposed to details of data representation and storage.
• Efficient Data access
•A DBMS uses several powerful functions to store and retrieve data efficiently
•Data Integrity and Security
•The DBMS enforces integrity constraints to get a kind of protection against prohibited access to data.
• Data Administration
When any users share the data, centralizing the administration of data can offer significant improvements.
• Concurrent Access and Crash Recovery
A DBMS schedules concurrent access to the data in such manner that users can think of the data as being accessed by only one user at a time. DBMS also protects users from the effects of system failures.
• Reduced Application Development Time
DBMS includes several important functions that are common to many applications accessing data in the DBMS. In conjunction with the high-level interface to the data, facilitates quick application development.
a. Complexityb. Sizec. Technical experts are required d. Cost of DBMS development e. Additional hardware costsf. Performance monitoring & maintenance g. Higher impact of a failureh. Centralization: That is use of the same program
at a time by many user sometimes lead to loss of some data
i. Limited Statistical Capabilities: Can not perform sophisticated calculations Security issues
Most of the times managers deal with the databases created by someone else, therefore, as a manager you must know how to retrieve the required data
SQL: is an international standard method for retrieving data from the DBMS
Standard Language: supported by various types of database systems, so the commands will work same in various situations
Readability: easy to read just like ordinary English Reusability: SQL consists of blocks of code which
can be stored in the database and reused Error Handling: contains error handles errors that
track the errors or exceptions during execution. Once an error or exception is caught, specific actions can be taken depending upon the type of the exception or it can be displayed to the user with a message
Better Performance: multiple SQL statements simultaneously as a single block, thereby reducing network traffic
High speed: SQL queries are designed to retrieve large amounts of records from a database quickly and efficiently. With the help of simple SQL queries, you can retrieve even highly complicated combination of data from the database
Security: With the SQL database storage, you get the security of all the data being in one place, which you can manage easier.
Coding: SQL is moderately complex. There are only few commands but each command can have several interweaved components. Therefore, it is difficult to learn
Incapable of performing sophisticated calculations: Can only perform simple calculations
Difficulty in interfacing : Since an SQL database supports many advanced features, interfacing to an SQL database is more difficult than just adding a few lines of code