Chapter 12.3+ Information Systems Database Management.

Slides:



Advertisements
Similar presentations
Chapter Information Systems Database Management.
Advertisements

Chapter Information Systems Database Management.
Chapter 12 File Processing and Data Management Concepts
Relational Databases Chapter 4.
Chapter 12 Information Systems Chapter Goals Define the role of general information systems Explain how spreadsheets are organized Create spreadsheets.
Oct 31, 2000Database Management -- Fall R. Larson Database Management: Introduction to Terms and Concepts University of California, Berkeley School.
Concepts of Database Management Sixth Edition
Organizing Data & Information
11 3 / 12 CHAPTER Databases MIS105 Lec14 Irfan Ahmed Ilyas.
Chapter 12 Information Systems Nell Dale John Lewis.
Chapter 4 Relational Databases Copyright © 2012 Pearson Education, Inc. publishing as Prentice Hall 4-1.
Getting Started Chapter One DATABASE CONCEPTS, 7th Edition
Mgt 20600: IT Management & Applications Databases Tuesday April 4, 2006.
Chapter 12 Information Systems. 2 Chapter Goals Define the role of general information systems Explain how spreadsheets are organized Create spreadsheets.
Information systems and databases Database information systems Read the textbook: Chapter 2: Information systems and databases FOR MORE INFO...
Chapter 4 Relational Databases Copyright © 2012 Pearson Education 4-1.
Chapter 12 Information Systems. Spreadsheets Databases 12-2.
Chapter 12 Information Systems. 2 Managing Information Information system Software that helps the user organize and analyze data Electronic spreadsheets.
Chapter 12 Information Systems. 2 Chapter Goals Define the role of general information systems Explain how spreadsheets are organized Create spreadsheets.
Chapter 4 Relational Databases Copyright © 2012 Pearson Education, Inc. publishing as Prentice Hall 4-1.
Information storage: Introduction of database 10/7/2004 Xiangming Mu.
CPS120: Introduction to Computer Science Information Systems: Database Management Nell Dale John Lewis.
CS370 Spring 2007 CS 370 Database Systems Lecture 2 Overview of Database Systems.
Chapter 2 CIS Sungchul Hong
Introduction to Accounting Information Systems
Chapter 1 Overview of Database Concepts Oracle 10g: SQL
Database Technical Session By: Prof. Adarsh Patel.
Dr. John P. Abraham, University of Texas Pan American Information Technology Database Dr. John P. Abraham.
Information Systems: Databases Define the role of general information systems Describe the elements of a database management system (DBMS) Describe the.
Concepts of Database Management, Fifth Edition Chapter 1: Introduction to Database Management.
Concepts and Terminology Introduction to Database.
Organizing Data and Information AD660 – Databases, Security, and Web Technologies Marcus Goncalves Spring 2013.
CHAPTER 8: MANAGING DATA RESOURCES. File Organization Terms Field: group of characters that represent something Record: group of related fields File:
Architecture for a Database System
Lecture 2 An Overview of Relational Database IST 318 – DB Admin.
CODD’s 12 RULES OF RELATIONAL DATABASE
Chapter 12 Information Systems. 2 Managing Information Information system Software that helps the user organize and analyze data Electronic spreadsheets.
Chapter 12 Information Systems. 2 Chapter Goals Define the role of general information systems Explain how spreadsheets are organized Create spreadsheets.
Lecture2: Database Environment Prepared by L. Nouf Almujally & Aisha AlArfaj 1 Ref. Chapter2 College of Computer and Information Sciences - Information.
1.file. 2.database. 3.entity. 4.record. 5.attribute. When working with a database, a group of related fields comprises a(n)…
1 Chapter 1 Introduction. 2 Introduction n Definition A database management system (DBMS) is a general-purpose software system that facilitates the process.
Instructor: Dema Alorini Database Fundamentals IS 422 Section: 7|1.
Dimu' Rumpak © 2009 by Prentice Hall 1 Getting Started Didimus Rumpak, M.Si. Database Concepts Chapter 1 1.
1 Relational Databases and SQL. Learning Objectives Understand techniques to model complex accounting phenomena in an E-R diagram Develop E-R diagrams.
Lecture2: Database Environment Prepared by L. Nouf Almujally 1 Ref. Chapter2 Lecture2.
Chapter 1Introduction to Oracle9i: SQL1 Chapter 1 Overview of Database Concepts.
CS 1308 Computer Literacy and the Internet
Dr. John P. Abraham, University of Texas Pan American Information Technology Database Dr. John P. Abraham.
Chapter 9 Database Systems Introduction to CS 1 st Semester, 2014 Sanghyun Park.
CSC Intro. to Computing Lecture 10: Databases.
Chapter 9 Database Systems © 2007 Pearson Addison-Wesley. All rights reserved.
Organizing Data and Information
Programming Logic and Design Fourth Edition, Comprehensive Chapter 16 Using Relational Databases.
Concepts of Database Management Seventh Edition Chapter 1 Introduction to Database Management.
Copyright (c) 2014 Pearson Education, Inc. Introduction to DBMS.
Data The fact and figures that can be recorded in system and that have some special meaning assigned to it. Eg- Data of a customer like name, telephone.
1 Chapter 2 Database Environment Pearson Education © 2009.
SQL Basics Review Reviewing what we’ve learned so far…….
Data Resource Management Data Concepts Database Management Types of Databases Chapter 5 McGraw-Hill/Irwin Copyright © 2007 by The McGraw-Hill Companies,
Chapter 12 Information Systems.
Information Systems Database Management
Chapter 4 Relational Databases
Databases and Information Management
Week 11: Database Management System
Databases.
Data Model.
Databases and Information Management
Chapter 9: Database Systems
DATABASE Purpose of database
Presentation transcript:

Chapter Information Systems Database Management

2 Database Management Systems Database: A structured set of data. Database Management System: (DBMS) A combination of software and data, including:  Physical database: a collection of files that contain the data.  Database engine: software that supports access to and modification of the database contents.  Database schema: a specification of the logical structure of the data stored in the database.

3 Database Management Systems Specialized database languages allow the user to:  specify the structure of data;  add, modify, and delete data;  query the database to retrieve specific stored data.

4 Database Management Systems Figure 12.6 The elements of a database management system

5 Databases Databases are a recent development in the management of large amounts of data. As paper file systems were “computerized” each application was implemented separately with its own data set. These systems were riddled with both corrupt data and redundant data, none of which could be shared.

6 Databases The integration of separate systems into one database resolved these issues, but introduced new ones. With all data shared, control of access to the data becomes a major concern. Payroll doesn’t need to see your grades.

7 Database Management Systems A schema is a description of the entire database structure used by the database software to maintain the database. A subschema is a description of only that part of the database that is particular to a user’s needs.

8 Database Management Systems A layered approach hides the complexities of database implementation.  User sees data in terms of the application.  The application “sees” data in terms of the database model.  The DBMS “sees” data as it is organized.

9 Database Management Systems Advantages of the layered approach include:  Simplification of the design process.  Better control of access.  Data Independence.  Applications can be written in terms of simple, conceptual views of the data – the database model.

10 Database Models A database model is a conceptual view of how to organize and manipulate data. The most popular one is the Relational Model.

11 The Relational Model In a relational DBMS, the data items - and the relationships among them - are organized into rectangular tables. As with spreadsheets, these tables consist of rows and columns.  Each table is called a relation.  The rows are called tuples.  The columns are called attributes.

12 The Relational Model Of course, different authors adopt different terms. There is a commonly used, alternate set of names:  Relations are also called tables.  A tuple can be referred to as a record, and in this terminology  a record is a collection of related fields.

AN EXAMPLE

A Sample Movie Table 14

15 A Database Table We can express the schema for this table as follows: Movie (ID:key, Title, Genre, Rating)

A Partial Customer Table 16

17 A Partial Customer Table We can express the schema for this table as: Customer (ID:key, Name, Address, CreditCardNumber)

Relationships A table can represent relationships between objects. The Rents table relates Customers to the Movies they’ve rented, by their respective IDs. 18

19 Relationships We can also express the schema for a relationship: Rents (CustomerId, MovieId, DateRented, DateDue) Note the absence of a key field.

RELATIONAL OPERATIONS

21 Relational Operations There are 3 fundamental operations that can be used to manipulate the tables in a database:  SELECT Copies rows (tuples) from a table (relation)  PROJECT Copies columns (attributes) from a table (relation)  JOIN Combines 2 tables (relations) into 1

22 Relational Operations The result of any relational operation is a new relation. We can express these operations with a simple syntax. PGmovies ← SELECT from Movie where Rating = “PG” This operation creates a new relation (PGmovies) by copying all the rows from the Movie table that have a Rating of PG.

Relational Operations: SELECT The PGmovies relation. 23

24 Relational Operations The same syntax can be used for the other operations. PGtrimmed ← PROJECT MovieId, Title from PGmovies This operation creates a new relation that copies two attributes from the PGmovies relation.

Relational Operations: PROJECT The PGtrimmed relation. 25

26 Relational Operations A JOIN creates a new relation by combining 2 relations according to some criterion. Rentals ← JOIN Customer and Rents where Customer. Id = Rents.CustomerId

Relational Operations: JOIN The Rentals relation. 27

28 Relational Operations: PROJECT The PROJECT operation can be used to remove the attributes we don’t want… RentalsTrimmed ← PROJECT Name, Address, MovieId from Rentals

Relational Operations The RentalsTrimmed relation. 29

Relational Operations Now, JOINing RentalsTrimmed to PGtrimmed … PGrenters ← JOIN RentalsTrimmed and PGtrimmed where RentalsTrimmed.MovieId = PGtrimmed.MovieId …creates a table of customers who have rented PG movies. 30

STRUCTURED QUERY LANGUAGE

32 Structured Query Language Structured Query Language (SQL) sometimes pronounced “SeQueL” a comprehensive language for managing relational databases. Implements the basic dBase operations, but with a different set of key words.

Structured Query Language SQL includes commands to: create new databases create new tables insert/delete records update records create views set permissions on tables, procedures, and views execute queries

Queries in SQL - PROJECT All SQL queries are created with SELECT. SELECT attribute-list FROM table WHERE attribute meets condition Conditional Operators: =, <>, >, =, <=, BETWEEN, LIKE, IN 34

Queries in SQL - SELECT SELECT * FROM table WHERE attribute meets condition * is a wild card symbol. It represents “all attributes” which means “the whole record”. 35

Queries in SQL - JOIN SELECT * FROM table1 INNER JOIN table2 ON condition The JOIN is performed first, then the SELECT. Types of JOINs: INNER, LEFT, RIGHT, FULL 36

37 Queries in SQL - Examples select Title from MOVIE where Rating = 'PG' select Name, Address from CUSTOMER select * from MOVIE where Genre like '%action%' select * from MOVIE where Rating = 'R' order by Title

38 Modifying Database Content insert into CUSTOMER values (9876, 'John Smith', '602 Greenbriar Court', ' ') update MOVIE set Genre = 'thriller drama' where title = 'Unbreakable‘ delete from MOVIE where Rating = 'R'

DATABASE DESIGN

40 Database Design Entity-relationship (ER) modeling  A popular technique for designing relational databases. ER Diagram  Chief tool used for ER modeling.  Captures the important record types, attributes, and relationships in a graphical form.

41 Database Design These designations show the cardinality constraint of the relationship