1 The Information School of the University of Washington Nov 27fit100-23-databases © 2006 University of Washington Database Intro INFO/CSE 100, Fall 2006.

Slides:



Advertisements
Similar presentations
Chapter 10: Designing Databases
Advertisements

Chapter 15 A Table with a View: Database Queries.
Concepts of Database Management Seventh Edition
Concepts of Database Management Sixth Edition
Concepts of Database Management Seventh Edition
Management Information Systems, Sixth Edition
Chapter 14 Getting to First Base: Introduction to Database Concepts.
3-1 Chapter 3 Data and Knowledge Management
1 The Information School of the University of Washington Nov 29fit forms © 2006 University of Washington More Forms INFO/CSE 100, Fall 2006 Fluency.
1 The Information School of the University of Washington Nov 20fit spreadsheets © 2006 University of Washington Structured Data INFO/CSE 100, Fall.
Chapter 4 Relational Databases Copyright © 2012 Pearson Education, Inc. publishing as Prentice Hall 4-1.
Mgt 20600: IT Management & Applications Databases Tuesday April 4, 2006.
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.
Chapter 15 Introduction to Database Concepts. Copyright © 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Learning Objectives Explain.
IST Databases and DBMSs Todd S. Bacastow January 2005.
Chapter 4 Relational Databases Copyright © 2012 Pearson Education, Inc. publishing as Prentice Hall 4-1.
2.3 Organising Data for Effective Retrieval
Concepts of Database Management, Fifth Edition
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 /
1 DATABASE TECHNOLOGIES BUS Abdou Illia, Fall 2012 (September 5, 2012)
1 Overview of Databases. 2 Content Databases Example: Access Structure Query language (SQL)
A Guide to SQL, Eighth Edition Chapter Two Database Design Fundamentals.
Chapter 1 Overview of Database Concepts Oracle 10g: SQL
Introduction to SQL Steve Perry
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 of Database Management, Fifth Edition Chapter 1: Introduction to Database Management.
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.
Computer Science 101 Database Concepts. Database Collection of related data Models real world “universe” Reflects changes Specific purposes and audience.
Chapter 2 Adapted from Silberschatz, et al. CHECK SLIDE 16.
Professor Michael J. Losacco CIS 1110 – Using Computers Database Management Chapter 9.
Lecture2: Database Environment Prepared by L. Nouf Almujally & Aisha AlArfaj 1 Ref. Chapter2 College of Computer and Information Sciences - Information.
Concepts of Database Management Seventh Edition
Introduction to Databases Trisha Cummings. What is a database? A database is a tool for collecting and organizing information. Databases can store information.
Information Systems & Databases 2.2) Organisation methods.
Created by, Author Name, School Name—State FLUENCY WITH INFORMATION TECNOLOGY Skills, Concepts, and Capabilities.
Chapter 1Introduction to Oracle9i: SQL1 Chapter 1 Overview of Database Concepts.
3 1 Chapter 3 The Relational Database Model Database Systems: Design, Implementation, and Management, Sixth Edition, Rob and Coronel.
6.1 © 2010 by Prentice Hall 6 Chapter Foundations of Business Intelligence: Databases and Information Management.
1 The Information School of the University of Washington Dec 1fit advdatabases © 2006 University of Washington Advanced Database Concepts INFO/CSE.
+ Information Systems and Databases 2.2 Organisation.
Relational Database. I. Relational Database 1. Introduction 2. Database Models 3. Relational Database 4. Entity-Relationship Models 5. RDB Design Principles.
CPSC 603 Database Systems Lecturer: Laurie Webster II, M.S.S.E., M.S.E.E., M.S.BME, Ph.D., P.E. Lecture 2 Introduction to a First Course in Database Systems.
Database Basics BCIS 3680 Enterprise Programming.
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.
IS2803 Developing Multimedia Applications for Business (Part 2) Lecture 1: Introduction to IS2803 Rob Gleasure
Databases Databases are collections of information; our study repeats a theme: Tell the computer the structure, and it can help you! © 2004, Lawrence Snyder.
CSC314 DAY 9 Intermediate SQL 1. Chapter 6 © 2013 Pearson Education, Inc. Publishing as Prentice Hall USING AND DEFINING VIEWS  Views provide users controlled.
IT 5433 LM3 Relational Data Model. Learning Objectives: List the 5 properties of relations List the properties of a candidate key, primary key and foreign.
Databases Chapter 16.
Chapter 2: Relational Model
Information Systems Today: Managing in the Digital World
A Table with a View: Database Queries
Chapter 4 Relational Databases
Databases and Information Management
INFO/CSE 100, Spring 2005 Fluency in Information Technology
Announcements Project 2’s due date is moved to Tuesday 8/3/04
Databases and Information Management
INFO/CSE 100, Spring 2006 Fluency in Information Technology
A Table with a View: Database Queries
Advanced Database Concepts: Reports & Views
INFO/CSE 100, Spring 2006 Fluency in Information Technology
DATABASE TECHNOLOGIES
A Table with a View: Database Queries
INFO/CSE 100, Spring 2005 Fluency in Information Technology
Information system analysis and design
Presentation transcript:

1 The Information School of the University of Washington Nov 27fit databases © 2006 University of Washington Database Intro INFO/CSE 100, Fall 2006 Fluency in Information Technology

2 The Information School of the University of Washington Nov 27fit databases © 2006 University of Washington Readings and References Reading »Fluency with Information Technology Chapter 14, Introduction to Database Concepts References »Access Database: Design and Programming by Steve Roman, published by O'Reilly

3 The Information School of the University of Washington Nov 27fit databases © 2006 University of Washington Why Study Databases? Some of us want to compute, but all of us want information … Much of the archived information is in tables Databases enhance applications, e.g. Web Once you know how to create databases, you can use them to personal advantage Databases introduce interesting ideas

4 The Information School of the University of Washington Nov 27fit databases © 2006 University of Washington Relational Databases Information is stored in tables »Tables store information about entities »Entities have characteristics called attributes »Each row in a table represents a single entity Each row is a set of attribute values Every row must be unique, identified by a key »Relationships -- associations among the data values are stored Table structure = schema Table contents = instance

5 The Information School of the University of Washington Nov 27fit databases © 2006 University of Washington Schema for Example table: IDnumberunique number(Key) Lasttextperson’s last name Firsttextperson’s first name JobCodenumbercurrent position Hiredatefirst day on job... A Table in a Database Tables have names, attributes {fields}, entities {rows} instance schema

6 The Information School of the University of Washington Nov 27fit databases © 2006 University of Washington Two tables in a database

7 The Information School of the University of Washington Nov 27fit databases © 2006 University of Washington Redundancy in a database is Very Bad Not every assembly of tables is a good database Repeating data is a bad idea »Replicated data can differ in its different locations, e.g. multiple addresses can differ Inconsistent data is worse than no data Cut down on the typos and mis-keyed entries »Keep a single copy of any data Reduces memory and data processing costs if it is needed in multiple places, associate it with a key and store key rather than the data »Effort to update is high

8 The Information School of the University of Washington Nov 27fit databases © 2006 University of Washington Relationships between tables

9 The Information School of the University of Washington Nov 27fit databases © 2006 University of Washington Query to a database (set of tables) produces a new table “You can look it up” When looking for information, a single item might be the answer, but a table is more likely »Which employees live in Kirkland? Table of employees »Who is taking INFO/CSE 100? Table of students »Whose mile run time  4:00? Table of runners

10 The Information School of the University of Washington Nov 27fit databases © 2006 University of Washington Select Operation Select creates a table from the rows of another table meeting a criterion Select * from Perms Where Hire < 1993

11 The Information School of the University of Washington Nov 27fit databases © 2006 University of Washington More Select Operation Select creates a table from the columns of another table Select Last, First From Perms This is a select from 9 dimensions to 2 dimensions

12 The Information School of the University of Washington Nov 27fit databases © 2006 University of Washington Union Union combines two tables with same attributes Select * From Perms Union Select * From Temps

Join Combines rows if common field matches Select * From Perms inner join JobCodes on Perms.JobID = JobCodes.JobID

14 The Information School of the University of Washington Nov 27fit databases © 2006 University of Washington DB Operations These various DB Operations can create any table from a given set of tables All modern database systems are built on these relational operations The operations are not usually used directly, but are used indirectly from other languages Structured Query Language (SQL) is the language that we talk to the database in

15 The Information School of the University of Washington Nov 27fit databases © 2006 University of Washington Database Structure A database contains one or more tables »Tables include entities with attributes »There are relationships defined between the entities in the various tables »Retrieve information from the tables using queries »Create GUI front ends (forms and reports) for users First, design the database or create the schema »What are the entities? »What are the attributes of each entity? Are they atomic? »What are the relationships between tables?

16 The Information School of the University of Washington Nov 27fit databases © 2006 University of Washington Build a Library Database Schema What are the entities? What are the attributes of each entity? Are they atomic? What are the relationships between tables?

Books Publishers Authors ISBNTitle Price IDPhone Name IDPhone Name PublisherOf ∞ 1 WrittenBy ∞∞ entity-relationship diagram for Library database

18 The Information School of the University of Washington Nov 27fit databases © 2006 University of Washington Create a new database

19 The Information School of the University of Washington Nov 27fit databases © 2006 University of Washington Create a new table in the database

20 The Information School of the University of Washington Nov 27fit databases © 2006 University of Washington Creating a table in Design view

21 The Information School of the University of Washington Nov 27fit databases © 2006 University of Washington Entering Table Data

22 The Information School of the University of Washington Nov 27fit databases © 2006 University of Washington Build another table

23 The Information School of the University of Washington Nov 27fit databases © 2006 University of Washington Add publisher ID to books

24 The Information School of the University of Washington Nov 27fit databases © 2006 University of Washington Create the link between the tables

Books Publishers Authors ISBNTitle Price IDPhone Name IDPhone Name PublisherOf ∞ 1 WrittenBy ∞∞ Hey presto, we have a database!

26 The Information School of the University of Washington Nov 27fit databases © 2006 University of Washington Two tables with a relationship

27 The Information School of the University of Washington Nov 27fit databases © 2006 University of Washington Create a query

28 The Information School of the University of Washington Nov 27fit databases © 2006 University of Washington The query produces a new (virtual) table

29 The Information School of the University of Washington Nov 27fit databases © 2006 University of Washington Select particular columns

30 The Information School of the University of Washington Nov 27fit databases © 2006 University of Washington Select particular rows

31 The Information School of the University of Washington Nov 27fit databases © 2006 University of Washington SQL behind the scenes

32 The Information School of the University of Washington Nov 27fit databases © 2006 University of Washington Summary Databases : built on tables »Tables represent entities »Tables/Entities have attributes (fields) »Tables have a primary key (unique to that table) Related tables are “linked” using primary keys Structured Query Language (SQL) used to ask questions of database »SQL typically “called” from other programming languages »Can limit rows, columns, and join tables

33 The Information School of the University of Washington Nov 27fit databases © 2006 University of Washington Questions A(n) ______ is a unique identifier for any row in a database table. The ______ operation takes rows from a table to create a new table.

34 The Information School of the University of Washington Nov 27fit databases © 2006 University of Washington Questions For the following, either indicate that the field is atomic or divide the field to make the result atomic. FieldContents StudentNo Phone(206) NameMaria Murray ClassINFO100 : AB CitySeattle, WA DOBSeptember 26, 1983

35 The Information School of the University of Washington Nov 27fit databases © 2006 University of Washington Questions Suppose I wanted a database to run a wine review web site. »What would some entities be? »What would some attributes be of those entities?