Dbms

4,633 views

Published on

0 Comments
4 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
4,633
On SlideShare
0
From Embeds
0
Number of Embeds
38
Actions
Shares
0
Downloads
166
Comments
0
Likes
4
Embeds 0
No embeds

No notes for slide

Dbms

  1. 1. Databases and Information Management By: Harleen Mahajan
  2. 2. Organizing Data in a Traditional File Environment <ul><li>File organization concepts </li></ul><ul><ul><li>Computer system uses hierarchies </li></ul></ul><ul><ul><ul><li>Field: Group of characters </li></ul></ul></ul><ul><ul><ul><li>Record: Group of related fields </li></ul></ul></ul><ul><ul><ul><li>File: Group of records of same type </li></ul></ul></ul><ul><ul><ul><li>Database: Group of related files </li></ul></ul></ul><ul><ul><li>Record : Describes an entity </li></ul></ul><ul><ul><li>Entity : Person, place, thing on which we store information </li></ul></ul><ul><ul><ul><li>Attribute: Each characteristic, or quality, describing entity </li></ul></ul></ul><ul><ul><ul><ul><li>E.g. Attributes Date or Grade belong to entity COURSE </li></ul></ul></ul></ul>Management Information Systems Chapter 6 Foundations of Business Intelligence: Databases and Information Management
  3. 3. The Data Hierarchy A computer system organizes data in a hierarchy that starts with the bit, which represents either a 0 or a 1. Bits can be grouped to form a byte to represent one character, number, or symbol. Bytes can be grouped to form a field, and related fields can be grouped to form a record. Related records can be collected to form a file, and related files can be organized into a database. Management Information Systems Chapter 6 Foundations of Business Intelligence: Databases and Information Management Organizing Data in a Traditional File Environment
  4. 4. Organizing Data in a Traditional File Environment <ul><li>Problems with the traditional file processing (files maintained separately by different departments) </li></ul><ul><ul><li>Data redundancy and inconsistency </li></ul></ul><ul><ul><ul><li>Data redundancy: Presence of duplicate data in multiple files </li></ul></ul></ul><ul><ul><ul><li>Data inconsistency: Same attribute has different values </li></ul></ul></ul><ul><ul><li>Program-data dependence: </li></ul></ul><ul><ul><li>Lack of flexibility </li></ul></ul><ul><ul><li>Poor security </li></ul></ul><ul><ul><li>Lack of data sharing and availability </li></ul></ul>
  5. 5. <ul><li>Database: </li></ul><ul><ul><li>Collection of data organized to serve many applications by centralizing data and controlling redundant data </li></ul></ul><ul><li>Database management system: </li></ul><ul><ul><li>Interfaces between application programs and physical data files </li></ul></ul><ul><ul><li>Separates logical and physical views of data </li></ul></ul><ul><ul><li>Solves problems of traditional file environment </li></ul></ul><ul><ul><ul><li>Controls redundancy </li></ul></ul></ul><ul><ul><ul><li>Eliminated inconsistency </li></ul></ul></ul><ul><ul><ul><li>Uncouples programs and data </li></ul></ul></ul><ul><ul><ul><li>Enables central management and security </li></ul></ul></ul>The Database Approach to Data Management Management Information Systems Chapter 6 Foundations of Business Intelligence: Databases and Information Management
  6. 6. Components of a DBS cont. DATABASE DATA DICTIONARY/ DIRECTORY Application Program Application Program Application Program DBMS Computer Terminals PRINTER Analyst User
  7. 7. Components of a Database System <ul><li>Four components: People, H/W, S/W, Data </li></ul><ul><li>Practitioners (analysts and database designers) in consultation with users identify data needs and design database structures to accommodate these needs. </li></ul><ul><li>The database structures are specified to the DBMS through the data dictionary. </li></ul>
  8. 8. Components of a DBS cont. <ul><li>Users enter data into the system by following specified procedures. </li></ul><ul><li>The entered data are maintained on hardware media such as disks and tapes. </li></ul><ul><li>Application programmes that access the database are written by practitioners and users to be run on computers. </li></ul>
  9. 9. Database System: Software <ul><li>A database software includes two types of software </li></ul><ul><ul><li>General-purpose database management software like operating system. </li></ul></ul><ul><ul><li>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. </li></ul></ul>
  10. 10. Database System: Software cont. <ul><li>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. </li></ul><ul><li>These programs utilise the command language of the DBMS and make use of the information contained in the data dictionary. </li></ul>
  11. 11. Database System: Software cont. <ul><li>User Interface </li></ul><ul><ul><li>Language, menus and other facilities by which users interact with various system components, such as application programs, the DBMS </li></ul></ul><ul><li>Computer-aided software engineering (CASE) tools </li></ul><ul><ul><li>Automated tools used to design databases and application programs. </li></ul></ul>
  12. 12. Data Dictionary/Directory (Repository) <ul><li>A subsystem that keeps track of the </li></ul><ul><ul><li>definitions of all data items in the database. </li></ul></ul><ul><ul><li>relationships that exists between various data structures. </li></ul></ul><ul><ul><li>indexes that are used to access data quickly. </li></ul></ul><ul><ul><li>screen and report format definitions that may be used by various application programs. </li></ul></ul>
  13. 13. Data Dictionary <ul><li>Definitions of data items in the database includes: </li></ul><ul><ul><li>Elementary-level data items (fields), </li></ul></ul><ul><ul><li>group and record-level data structures, and </li></ul></ul><ul><ul><li>files or relational tables. </li></ul></ul>
  14. 14. <ul><li>Data that describe the properties or characteristics of other data. </li></ul><ul><li>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. </li></ul><ul><li>Metadata allow database designers and users to understand what data exist, what the data mean. </li></ul><ul><li>Data without clear meaning can be confusing, misinterpreted or erroneous. </li></ul>Metadata
  15. 15. E.g. Data Item Value Name Type Length Min Max Description Name Character 30 Employee Name ID Number 9 Employee No. Dept Character 10 Dept. No. Age Integer 2 18 60 Employee Age Name Character 15 Dept. Name Manager Number 9 Mgr. Emp. No. Employee No. (ID) unique Manager is an employee of the organisation Metadata
  16. 16. Database System: People <ul><li>Two different types of people (users and practitioners) are concerned with the database. </li></ul><ul><li>Users </li></ul><ul><ul><li>who need information from the database to carry out their primary business responsibility </li></ul></ul><ul><ul><li>e.g. Executives, managers, staff, clerical personnel </li></ul></ul>
  17. 17. Database System: People cont. <ul><li>Practitioners </li></ul><ul><ul><li>people responsible for the database system and its associated application software. </li></ul></ul><ul><ul><li>e.g. Database administrators, analysts, programmers, database and system designers, information systems managers. </li></ul></ul>
  18. 18. Components of a Database System <ul><li>Four components: People, H/W, S/W, Data </li></ul><ul><li>Practitioners (analysts and database designers) in consultation with users identify data needs and design database structures to accommodate these needs. </li></ul><ul><li>The database structures are specified to the DBMS through the data dictionary. </li></ul>
  19. 19. The Database Approach to Data Management Management Information Systems Chapter 6 Foundations of Business Intelligence: Databases and Information Management Figure 6-3 A single human resources database provides many different views of data, depending on the information requirements of the user. Illustrated here are two possible views, one of interest to a benefits specialist and one of interest to a member of the company’s payroll department. Human Resources Database with Multiple Views
  20. 20. <ul><li>Relational DBMS </li></ul><ul><ul><li>Represent data as two-dimensional tables called relations or files </li></ul></ul><ul><ul><li>Each table contains data on entity and attributes </li></ul></ul><ul><li>Table : Grid of columns and rows </li></ul><ul><ul><li>Rows (tuples): Records for different entities </li></ul></ul><ul><ul><li>Fields (columns): Represents attribute for entity </li></ul></ul><ul><ul><li>Key field : Field used to uniquely identify each record </li></ul></ul><ul><ul><li>Primary key : Field in table used for key fields </li></ul></ul><ul><ul><li>Foreign key : Primary key used in second table as look-up field to identify records from original table </li></ul></ul>The Database Approach to Data Management Management Information Systems Chapter 6 Foundations of Business Intelligence: Databases and Information Management
  21. 21. The Database Approach to Data Management Management Information Systems Chapter 6 Foundations of Business Intelligence: Databases and Information Management Figure 6-4A A relational database organizes data in the form of two-dimensional tables. Illustrated here are tables for the entities SUPPLIER and PART showing how they represent each entity and its attributes. Supplier_Number is a primary key for the SUPPLIER table and a foreign key for the PART table. Relational Database Tables
  22. 22. The Database Approach to Data Management Management Information Systems Chapter 6 Foundations of Business Intelligence: Databases and Information Management Figure 6-4B Relational Database Tables (cont.)
  23. 23. <ul><li>Is a language used to Operate on a Relational DBMS: Three basic operations used to develop useful sets of data </li></ul><ul><ul><li>SELECT : Creates subset of data of all records that meet stated criteria </li></ul></ul><ul><ul><li>JOIN : Combines relational tables to provide user with more information than available in individual tables </li></ul></ul><ul><ul><li>PROJECT : Creates subset of columns in table, creating tables with only the information specified </li></ul></ul>SQL Management Information Systems Chapter 6 Foundations of Business Intelligence: Databases and Information Management
  24. 24. The Database Approach to Data Management Management Information Systems Chapter 6 Foundations of Business Intelligence: Databases and Information Management Figure 6-5 The select, project, and join operations enable data from two different tables to be combined and only selected attributes to be displayed. The Three Basic Operations of a Relational DBMS
  25. 25. The Database Approach to Data Management Management Information Systems Chapter 6 Foundations of Business Intelligence: Databases and Information Management Figure 6-6 The sample data dictionary report for a human resources database provides helpful information, such as the size of the data element, which programs and reports use it, and which group in the organization is the owner responsible for maintaining it. Sample Data Dictionary Report
  26. 26. The Database Approach to Data Management Management Information Systems Chapter 6 Foundations of Business Intelligence: Databases and Information Management Figure 6-7 Illustrated here are the SQL statements for a query to select suppliers for parts 137 or 150. They produce a list with the same results as Figure 6-5. Example of an SQL Query

×