INFORMATION TECHNOLOGY IN BUSINESS AND SOCIETY SESSION 15 – RELATIONAL DATABASES SEAN J. TAYLOR.

Slides:



Advertisements
Similar presentations
Access 2007 ® Use Databases How can Microsoft Access 2007 help you structure your database?
Advertisements

Chapter 10: Designing Databases
ENTITY RELATIONSHIP MODELLING
Ch5: ER Diagrams - Part 1 Much of the material presented in these slides was developed by Dr. Ramon Lawrence at the University of Iowa.
Concepts of Database Management Seventh Edition Chapter 6 Database Design : ERD Model.
Copyright © 2015 Pearson Education, Inc. Database Design Chapters 17 and
Relational Databases Chapter 4.
The Relational Database Model:
1004INT Information Systems Week 10 Databases as Business Tools.
Chapter 4 Relational Databases Copyright © 2012 Pearson Education, Inc. publishing as Prentice Hall 4-1.
Concepts of Database Management Seventh Edition
C Computer-Based Systems for Management Support Kevin Brabazon D atabases : Fundamentals.
Relational Databases What is a relational database? What would we use one for? What do they look like? How can we describe them? How can you create one?
Chapter 4 Relational Databases Copyright © 2012 Pearson Education 4-1.
Entity/Relationship Modelling
INFORMATION TECHNOLOGY IN BUSINESS AND SOCIETY SESSION 16 – SQL SEAN J. TAYLOR.
Page 1 ISMT E-120 Desktop Applications for Managers Introduction to Microsoft Access.
IT 244 Database Management System Data Modeling 1 Ref: A First Course in Database System Jeffrey D Ullman & Jennifer Widom.
Chapter 5 Database Processing.
Using MIS 4e Chapter 5 Database Processing
1 DATABASE TECHNOLOGIES BUS Abdou Illia, Fall 2007 (Week 3, Tuesday 9/4/2007)
Databases From A to Boyce Codd. What is a database? It depends on your point of view. For Manovich, a database is a means of structuring information in.
2.3 Organising Data for Effective Retrieval
Data at the Core of the Enterprise. Objectives  Define of database systems.  Introduce data modeling and SQL.  Discuss emerging requirements of database.
DATABASE MANAGEMENT SYSTEMS BASIC CONCEPTS 1. What is a database? A database is a collection of data which can be used: alone, or alone, or combined /
DATABASE MANAGEMENT SYSTEMS BASIC CONCEPTS 1. What is a database? A database is a collection of data which can be used: alone, or alone, or combined /
Web-Enabled Decision Support Systems
DATABASE. A database is collection of information that is organized so that it can easily be accessed, managed and updated. It is also the collection.
Chapter 1 Overview of Database Concepts Oracle 10g: SQL
1 Chapter 1 Overview of Database Concepts. 2 Chapter Objectives Identify the purpose of a database management system (DBMS) Distinguish a field from a.
Information Systems: Databases Define the role of general information systems Describe the elements of a database management system (DBMS) Describe the.
Concepts and Terminology Introduction to Database.
1 Relational Database Development Alison Taylder Consultant ITC-ILO, Turin 25 th November 2004.
MIS 301 Information Systems in Organizations Dave Salisbury ( )
Lecture 2 An Overview of Relational Database IST 318 – DB Admin.
HNDComputing – DeMontfort University  DeMontfort University 2011 Database Fundamentals wk2 Database Design ConceptsDatabase Design Concepts Database Design.
CSC 240 (Blum)1 Introduction to Database. CSC 240 (Blum)2 Data versus Information When people distinguish between data and information, –Data is simply.
Databases From A to Boyce Codd. What is a database? It depends on your point of view. For Manovich, a database is a means of structuring information in.
Information Systems Today (©2006 Prentice Hall) 3-1 CS3754 Class Note 12 Summery of Relational Database.
I Information Systems Technology Ross Malaga 4 "Part I Understanding Information Systems Technology" Copyright © 2005 Prentice Hall, Inc. 4-1 DATABASE.
DAY 12: DATABASE CONCEPT Tazin Afrin September 26,
Lecture2: Database Environment Prepared by L. Nouf Almujally & Aisha AlArfaj 1 Ref. Chapter2 College of Computer and Information Sciences - Information.
Introduction to Databases Trisha Cummings. What is a database? A database is a tool for collecting and organizing information. Databases can store information.
Organizing Data Revision: pages 8-10, 31 Chapter 3.
Concepts of Database Management Sixth Edition Chapter 6 Database Design 2: Design Method.
Chapter 1Introduction to Oracle9i: SQL1 Chapter 1 Overview of Database Concepts.
Next Back A-1 Management Information Systems for the Information Age Second Canadian Edition Copyright 2004 The McGraw-Hill Companies, Inc. All rights.
C-1 Management Information Systems for the Information Age Copyright 2004 The McGraw-Hill Companies, Inc. All rights reserved Extended Learning Module.
INFO1408 Database Design Concepts Week 15: Introduction to Database Management Systems.
Access 2007 ® Use Databases How can Microsoft Access 2007 help you structure your database?
Advanced Accounting Information Systems Day 10 answers Organizing and Manipulating Data September 16, 2009.
Lesson 2: Designing a Database and Creating Tables.
1 6 Concepts of Database Management, 5 th Edition, Pratt & Adamski Chapter 6 Database Design 2: Design Methodology Spring 2006.
Information Systems Today: Managing in the Digital World TB3-1 3 Technology Briefing Database Management “Modern organizations are said to be drowning.
BSA206 Database Management Systems Lecture 2: Introduction to Oracle / Overview of Database Concepts.
Entity Relationship Diagram (ERD). Objectives Define terms related to entity relationship modeling, including entity, entity instance, attribute, relationship.
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.
Lecture 5 Entity Relationship Modeling
Rationale Databases are an integral part of an organization. Aspiring Database Developers should be able to efficiently design and implement databases.
Database Development Lifecycle
Databases Chapter 16.
and Defining Table Relationships
Basic Concepts in Data Management
Accounting System Design
Data Modelling Introduction
Accounting System Design
Databases and Information Management
Advanced Database Concepts: Reports & Views
Information system analysis and design
Presentation transcript:

INFORMATION TECHNOLOGY IN BUSINESS AND SOCIETY SESSION 15 – RELATIONAL DATABASES SEAN J. TAYLOR

ADMINISTRATIVIA Assignment 3: Due tonight at midnight (AdSense in a week) Midterm back on Thursday Database tutorial led by Varun Assignment 4: Posted Thursday, due Friday 3/30

ADMINISTRATIVIA II Groups: I will a form for you to list up to five classmates and then choose the groups. You can list way feedback: 1. I will send you an anonymous survey. 2. I will send you a brief summary of your current grade.

LEARNING OBJECTIVES 1.Understand what relational databases are (or, why text files and Excel are not enough) 2.Identify and distinguish between the following parts of a relational database: tables, records, fields, field values 3.Understand three types of anomalies that arise from un-normalized data 4.Understand how primary keys and foreign keys are used to link tables.

WHY ARE DATA VALUABLE?

RELATIONAL DATABASES Store data (insert) Retrieve data (query) Software applications Operations Analyze data (reporting capabilities)

WHY NOT STORE DATA LIKE THIS?

RELATIONAL DATABASES Databases that use a series of logically related two- dimensional tables to store their information Tables are comprised of fields/records, which in turn contain field values Last NameSS#DOBMajor Smith /11/84IS Kim /1/85FIN Davis /31/81MKT Pat /3/88ACC Student Table Field Record Field value

Relational Database Tables RecordsFields Field values Bytes, bits Last NameSS#DOBMajor Smith /11/84IS Kim /1/85FIN Davis /31/81MKT Pat /3/88ACC Student Table Field Record Field value RELATIONAL DATABASES

ADVANTAGES 1.Consistency We can restrict the values of certain fields (e.g. dates, integers) We can impose other kinds of constraints (all costs must be positive, last names must be included, orders must have addresses) Data look the same to all users at the same time. 2.Centralization Many different users can edit and view the data simultaneously. Efficient sharing of information. 3.Efficient Querying SQL and other query languages can be used to create complex reports quickly

PROBLEMS WITH EXCEL? When should you use a database instead of Excel? –Insertion anomalies –Deletion anomalies –Update anomalies } Data Quality Problems Should we just create multiple workbooks in Excel? –The real power of a database: Querying –How would you answer the following question in Excel? –Find customers that spend on average $50 per book order, that live on West Coast or on the East Coast (but not in Midwest) and whose annual income is at least $150K

INSERTION ANOMALIES Inability to insert a piece of information about an object without having to insert a (bogus) piece of information about something else Example: Adding a new customer/book before it is ordered How can you add the book “Harry Potter” in the file below?

DELETION ANOMALIES The loss of a piece of information about one object when a piece of information about a different object is deleted Example: Deleting order 2 => deleting customer Lee Sproull Example: Deleting order 1 => deleting book “Code…”

UPDATE ANOMALIES A need to change the same piece of information about an object multiple times Example: Changing Jeff Bezos address in order 1 leaves orders 6 and 8 unchanged…

ENTITY- RELATIONSHIP DIAGRAMS MODELING DATA WITH

ENTITY RELATIONSHIP DIAGRAM The aim of an ERD is to model the data within the Information System. Provides a CONCEPTUAL DATA MODEL: a concept of the system, independent of implementation 1.What data should be stored? 2.What relationships exist between items of data?

ENTITIES An entity can be uniquely identified. Organizations collect and store data about entities: if a bank stores data about you - you are an entity if a business stores a piece of paper called an invoice - the invoice is an entity a library stores data about a particular book - the book is an entity An actual, real thing or person about which data might be stored is referred to as an entity. An actual, real thing or person about which data might be stored is referred to as an entity.

RELATIONSHIPS Entities are associated with each other via relationships. A relationship is a named association between two or more entity types: PlayerTeam Plays for

DEFINING RELATIONSHIPS Entity-relationship (E-R) diagram: a graphic method of representing entity classes and their relationships. Rectangle – entity class Dotted line – relationship | – single relationship O – zero or optional relationship Crow’s foot (  ) – multiple relationship The types of relationships reflect the business rules applicable to the entities

SIMPLE HOSPITAL EXAMPLE In a hospital system, each ward has many patients who are cared for by nurses assigned to the specific ward. Patients may require treatment by more than one specialist doctor. A patient belongs to only one ward.

SIMPLE HOSPITAL EXAMPLE In a hospital system, each ward has many patients who are cared for by nurses assigned to the specific ward. Patients may require treatment by more than one specialist doctor. A patient belongs to only one ward.

SIMPLE HOSPITAL SYSTEM Ward has many patients (1:N) Patients are cared for by nurses (N:M) Ward has assigned many nurses (1:N) Patients require treatment by one or more doctor (N:M)

SIMPLE HOSPITAL SYSTEM ERD WARD NURSEPATIENT DOCTOR treats accommodates has assigned cares for

UNIVERSITY DATABASE EXAMPLE A department has many Professors. A Professor belongs to only one department. The department offers many different courses, and many Professors can teach a single course. A Professor can also teach more than one course. Students enroll for many courses and courses have many students. A course belongs to only one department.

UNIVERSITY DATABASE ERD DEPARTMENT PROFESSOR STUDENT COURSE is_in enrolls teaches_on offers

NORMALIZATION FITTING DATA INTO THE RELATIONAL MODEL

NORMALIZING AMAZON’S DATA The process of assuring that a database can be implemented effectively as a set of two-dimensional tables Unlike Excel though, the tables are connected Prevents insertion, deletion and update anomalies

CONNECTING TABLES TOGETHER Primary keys –A field (or group of fields in some cases) that uniquely describes each record in a table –Examples: Customer ID, ISBN, Order# Foreign keys –A field that is a primary key in one table and appears in a different table (though not as the primary key) –Examples: Customer ID in Orders Integrity constraints –Rules that help ensure data quality Each record should have a unique primary key

DATABASE SCHEMA Summary of the logical structure of your database –The tables in your database, along with each of their fields, keys –The relationships between the tables Primary key Foreign key

NEXT CLASS: SQL Do the SQL tutorial at (at least sections 0-3) Download the “Facebook” database from Blackboard and make sure you can open it in MS Access Interest in OSS databases? Bring a laptop if you want.