Copyright © 2003 by Prentice Hall Module 4 Database Management Systems 1.What is a database? Data hierarchy and data organization Field, record, file,

Slides:



Advertisements
Similar presentations
Welcome to CMPE003 Personal Computer Concepts: Hardware and Software Winter 2003 UC Santa Cruz Instructor: Guy Cox.
Advertisements

Welcome to CMPE003 Personal Computers: Hardware and Software Dr. Chane Fullmer Fall 2002 UC Santa Cruz.
Objectives Overview Define the term, database, and explain how a database interacts with data and information Define the term, data integrity, and describe.
Your Interactive Guide to the Digital World Discovering Computers 2012 Chapter 10 Managing a Database.
Database Management: Getting Data Together Chapter 14.
3-1 Chapter 3 Data and Knowledge Management
Living in a Digital World Discovering Computers 2010.
Discovering Computers Fundamentals, 2011 Edition Living in a Digital World.
Chapter 4: Database Management. Databases Before the Use of Computers Data kept in books, ledgers, card files, folders, and file cabinets Long response.
Information Technology in Organizations
BUSINESS DRIVEN TECHNOLOGY
Chapter 9 Database Management
Database Design and Introduction to SQL
Discovering Computers 2009 Chapter 10 Database Management.
Databases C HAPTER Chapter 10: Databases2 Databases and Structured Fields  A database is a collection of information –Typically stored as computer.
Your Interactive Guide to the Digital World Discovering Computers 2012.
Discovering Computers Fundamentals, 2012 Edition Your Interactive Guide to the Digital World.
6-1 DATABASE FUNDAMENTALS Information is everywhere in an organization Information is stored in databases –Database – maintains information about various.
Copyright © 2003 by Prentice Hall Computers: Tools for an Information Age Chapter 13 Database Management Systems: Getting Data Together.
ASP.NET Programming with C# and SQL Server First Edition
The University of Akron Dept of Business Technology Computer Information Systems DBMS Functions 2440: 180 Database Concepts Instructor: Enoch E. Damson.
Objectives Overview Define the term, database, and explain how a database interacts with data and information Define the term, data integrity, and describe.
DAY 14: ACCESS CHAPTER 1 Tazin Afrin October 03,
Chapter 1 Overview of Database Concepts Oracle 10g: SQL
STORING ORGANIZATIONAL INFORMATION— DATABASES CIS 429—Chapter 7.
2005 SPRING CSMUIntroduction to Information Management1 Organizing Data John Sum Institute of Technology Management National Chung Hsing University.
Chapter 7: Database Systems Succeeding with Technology: Second Edition.
Microsoft Access 2003 Define some key Access terminology: Field – A single characteristic or attribute of a person, place, object, event, or idea. Record.
CHAPTER 8: MANAGING DATA RESOURCES. File Organization Terms Field: group of characters that represent something Record: group of related fields File:
Lecture 2 An Overview of Relational Database IST 318 – DB Admin.
6 Chapter Databases and Information Management. File Organization Terms and Concepts Bit: Smallest unit of data; binary digit (0,1) Byte: Group of bits.
Discovering Computers Fundamentals Fifth Edition Chapter 9 Database Management.
Chapter 10 Database Management. Chapter 10 Objectives Discuss the functions common to most DBMSs Identify the qualities of valuable information Explain.
Professor Michael J. Losacco CIS 1110 – Using Computers Database Management Chapter 9.
Objectives Overview Define the term, database, and explain how a database interacts with data and information Describe the qualities of valuable information.
Chapter 9 Database Management. Chapter 9 Objectives Discuss the functions common to most DBMSs Identify the qualities of valuable information Discuss.
Storing Organizational Information - Databases
Chapter 13 Databases and Information Management. Explain why data and information are important to an organization Identify file maintenance techniques.
“INTRODUCTION TO DATABASE AND SQL”. Outlines 2  Introduction To Database  Database Concepts  Database Properties  What is Database Management System.
Introduction to Computers Lesson 10B. home Database A collection of related data or facts.
C6 Databases. 2 Traditional file environment Data Redundancy and Inconsistency: –Data redundancy: The presence of duplicate data in multiple data files.
1 Database Concepts 2 Definition of a Database An organized Collection Of related records.
Lecture # 3 & 4 Chapter # 2 Database System Concepts and Architecture Muhammad Emran Database Systems 1.
McGraw-Hill/Irwin © 2008 The McGraw-Hill Companies, All Rights Reserved Chapter 7 Storing Organizational Information - Databases.
Chapter 4c, Database H Definition H Structure H Parts H Types.
Database Management Systems.  Database management system (DBMS)  Store large collections of data  Organize the data  Becomes a data storage system.
6.1 © 2010 by Prentice Hall 6 Chapter Foundations of Business Intelligence: Databases and Information Management.
Copyright © Prentice Hall Database Management Systems Chapter 13 Getting Data Together.
1 CSE 2337 Introduction to Data Management Access Book – Ch 1.
Module 5 Part 2 Introduction To Database. Module Objectives At the end of the module, students should be able to: –Describe the process of creating a.
UNIVERSITI TENAGA NASIONAL “Generates Professionals” MODULE 5 : Part 2 INTRODUCTION TO DATABASE.
Data resource management
Programming Logic and Design Fourth Edition, Comprehensive Chapter 16 Using Relational Databases.
Database Management Supplement 1. 2 I. The Hierarchy of Data Database File (Entity, Table) Record (info for a specific entity, Row) Field (Attribute,
Access Chapter 1: Intro to Access Objectives Navigate among objects in Access database Difference between working in storage and memory Good database file.
Chapter 10 Database Management. Data and Information How are data and information related? p Fig Next processing data stored on disk Step.
0 / Database Management. 1 / Identify file maintenance techniques Discuss the terms character, field, record, and table Describe characteristics.
1 Chapter 9 Database Management. Objectives Overview Define the term, database, and explain how a database interacts with data and information Describe.
UNIVERSITI TENAGA NASIONAL “Generates Professionals” MODULE 5 : Part 1 INTRODUCTION TO DATABASE.
Introduction to Databases Dr. Osama AL Rababah. Objectives In this capture you will learn: Some common uses of database systems. The characteristics of.
Presentation on Database management Submitted To: Prof: Rutvi Sarang Submitted By: Dharmishtha A. Baria Roll:No:1(sem-3)
CSCI-235 Micro-Computers in Science Databases. Database Concepts Data is any unorganized text, graphics, sounds, or videos A database is a collection.
Computers: Tools for an Information Age
CSCI-100 Introduction to Computing
Database Management Systems
Computers: Tools for an Information Age
MANAGING DATA RESOURCES
Database.
DATABASES WHAT IS A DATABASE?
Database & Information Systems
Presentation transcript:

Copyright © 2003 by Prentice Hall Module 4 Database Management Systems 1.What is a database? Data hierarchy and data organization Field, record, file, databases, data warehouse 2.Database models Relational databases, Hierarchical, Network, Object-oriented Data integrity 3.Database management systems and database features Creating a database, Data dictionary, Data maintenance, Data retrieval: Queries, Reports, Concurrency control, Security, Backup and recovery 4.Using database Creating the database, Determining the table structure, Setting up the file structure, Entering the data, Using the database

2Module 4: database The Hierarchy of Data Field – The smallest meaningful unit of data E.g. LAST NAME, FIRST NAME, STREET, CITY, STATE, ZIPCODE E.g. LAST NAME, FIRST NAME, STREET, CITY, STATE, ZIPCODE Record – the set of fields containing data E.g. AKERS, TED, 4302 LEMON AVE. OAKLAND, CA, E.g. AKERS, TED, 4302 LEMON AVE. OAKLAND, CA, File – a collection of related records

3Module 4: database Files and Databases Traditionally, information systems were developed with a file processing approach A database is an organized collection of information or data. Database approach creates separate files for each entity

4Module 4: database File System Approach Each application had its own file Data was not shared among applications Data was not shared among applications Resulted in a great deal of data redundancy, the repetition of the same data values Increased the risk of inaccurate data Increased the risk of inaccurate data Increased the amount of storage space needed Increased the amount of storage space needed

5Module 4: database The Database Approach A collection of related tables In database technology, a file is called a table In database technology, a file is called a table Each entity is stored in a separate table Each entity is stored in a separate table Tables are linked by a relationship between primary and foreign keys Tables are linked by a relationship between primary and foreign keys

6Module 4: database Primary Key A field that uniquely identifies a record SalesID can be a primary key for the Salesperson table SalesID can be a primary key for the Salesperson table Once a SalesID appears in the table, no other salesperson can have that ID Once a SalesID appears in the table, no other salesperson can have that ID

7Module 4: database Foreign Key A field in one table that is a primary key in another table SalesID can be used in the Customer table to identify the salesperson who serves that customer SalesID can be used in the Customer table to identify the salesperson who serves that customer The same SalesID can appear in many customer records (a salesperson can serve many customers) The same SalesID can appear in many customer records (a salesperson can serve many customers)

8Module 4: database Database Models Define the way a database organizes data Four main models Relational Relational Hierarchical Hierarchical Network Network Object-oriented Object-oriented

9Module 4: database Relational Model Data organized in table format Columns represent fields Columns represent fields Rows represent records Rows represent records Tables related by primary/foreign key relationship Most current database development uses this model

10Module 4: database Hierarchical Model Arranges data in hierarchical “parent-child” relationship, i.e. in a tree structure: Each parent record can have many child records Each parent record can have many child records Each child record has only one parent record Each child record has only one parent record Complex and inflexible

11Module 4: database Network Model Arranges data in complex network of “parent-child” relationships Each parent record can have many child records Each parent record can have many child records Each child record can have many parent records Each child record can have many parent records Complex and inflexible

12Module 4: database Object-Oriented Model Designed to deal with complex data types Focuses on the object An object represents an entity An object represents an entity Represents data about that entity and the types of operations that change that entity Represents data about that entity and the types of operations that change that entity

13Module 4: database Data Integrity Refers to the degree to which data is accurate and reliable Integrity constraints – rules all data must follow If integrity constraints are not followed, the data is unreliable If integrity constraints are not followed, the data is unreliable

14Module 4: database Integrity Constraints Define acceptable values for a field For example, the value of a month cannot be greater than 12 For example, the value of a month cannot be greater than 12 Primary keys cannot be duplicated Foreign keys cannot be used unless they exist as a primary key A SalesID that is used in the customer table must exist as a primary key in the salesperson table A SalesID that is used in the customer table must exist as a primary key in the salesperson table

15Module 4: database Database Management Database Management System (DBMS) – A software allows you to create a database and enter, modify, and retrieve data as needed Available at all levels Sophisticated systems for a mainframe environment. E.g. Oracle, IBM DB2 Sophisticated systems for a mainframe environment. E.g. Oracle, IBM DB2 Inexpensive, easy-to-use personal computer systems. MySql, MS Access, MS SQL Server Database Inexpensive, easy-to-use personal computer systems. MySql, MS Access, MS SQL Server Database Access through Web

16Module 4: database Database Features Data dictionary Data maintenance Data retrieval Concurrency control Security Backup and recovery

17Module 4: database Data Dictionary Stores data about the tables and fields within the database For each table, it stores the table name and relationships to other tables For each table, it stores the table name and relationships to other tables For each field, it records information about that field For each field, it records information about that field Also called a catalog

18Module 4: database Data Maintenance Three basic operations Adding new data Adding new data Modifying existing data Modifying existing data Deleting data Deleting data Two methods for performing operations Interacting directly with the DBMS working on table Interacting directly with the DBMS working on table Using programs to access the data using special commands e.g., working on database forms, web forms Using programs to access the data using special commands e.g., working on database forms, web forms

19Module 4: database Data Retrieval Involves extracting the desired data Two primary forms of data retrieval Queries Queries Reports Reports

20Module 4: database Queries You present a set of criteria; the DBMS selects matching data from the database Use a query language Structured Query Language (SQL) is supported by most relational databases Structured Query Language (SQL) is supported by most relational databases Query-by-example (QBE) uses a graphical interface to generate the SQL Query-by-example (QBE) uses a graphical interface to generate the SQL Display results in a table-like grid Display results in a table-like grid

21Module 4: database SQL Uses English-like statements SELECT specifies the field(s) to be selected SELECT specifies the field(s) to be selected FROM specifies the table(s) containing the fields FROM specifies the table(s) containing the fields JOIN specifies the relationship between tables JOIN specifies the relationship between tables WHERE specifies the criteria that must be met WHERE specifies the criteria that must be met

22Module 4: database Query by Example User adds tables to query User drags fields down into grid at bottom of window User drags fields down into grid at bottom of window Criteria can be added by typing them in the Criteria row of the grid Criteria can be added by typing them in the Criteria row of the grid Use can execute the query by clicking an icon on a toolbar

23Module 4: database Query Results Retrieved records are displayed as rows Fields specified in the select clause are displayed as columns

24Module 4: database Reports Provide a formatted presentation of data from the database Allow you to group reports and total by group, if desired Allow you to group reports and total by group, if desired Normally contain more data than queries Normally contain more data than queries Reports are designed with a report generator

25Module 4: database Concurrency Control Manages simultaneous database users If several users tried to update the same record at the same time, updates might not be processed correctly If several users tried to update the same record at the same time, updates might not be processed correctly Employs a record-locking scheme Once a user accesses a record, it is locked until the first update is complete Once a user accesses a record, it is locked until the first update is complete

26Module 4: database Security Many security features are built into most DBMS software Users can be required to enter a user ID and password Users can be required to enter a user ID and password Each user ID may have different access to the data Each user ID may have different access to the data Read-only – permits the user to look at the data but not change it Update – permits the user to make changes to the data No privileges – user can not read or update the data

27Module 4: database Backup and Recovery Backup – a copy of the database Backups should be made periodically Backups should be made periodically Recovery – replaces a damaged database with the good backup

28Module 4: database Creating and Using a Database Creating the database Determining the table structure Setting up the file structure Entering the data Using the database

29Module 4: database Creating the Database Consider your needs Reports you will need Reports you will need Inquiries you will want to make Inquiries you will want to make

30Module 4: database Determining the Table Structure Sketch the table structure – what kind of data is needed in each column Determine characteristics of field Field name Field name Each field must have a unique field name Field type Field type Field width Field width The maximum number of characters, including decimal places

31Module 4: database Field Types Character fields – contain descriptive data Numeric fields – contain numbers used for calculation Specify the number of decimal places Specify the number of decimal places Date fields Logical fields – keep track of true/false or yes/no conditions

32Module 4: database Setting Up the File Structure Design the structure for each table Define the table Define the table Define each field in the table Define each field in the table Define primary key Define primary key Set up the table in design view

33Module 4: database Entering the Data Enter data into the tables in datasheet view Enter data into the tables by using a graphical form

34Module 4: database Using the Database Many operations can be performed to view and modify the data List the records List the records List specific fields List specific fields Make a query Make a query Modify the data Modify the data

35Module 4: database List the Records Displays the table in datasheet view Displays all rows and all columns Displays all rows and all columns Can be displayed on monitor or printed

36Module 4: database List Specific Fields Displays only the fields you want to view Use SQL to select the desired fields

37Module 4: database Query Use SQL or query-by- example to produce a query Use relational operator to define criteria Use relational operator to define criteria Can be displayed on monitor or printed Can be displayed on monitor or printed Can be formatted into a report Can be formatted into a report

38Module 4: database Modify the Data Add new records Update (make changes to) an existing record Delete records