Databases Databases are collections of information; our study repeats a theme: Tell the computer the structure, and it can help you! © 2004, Lawrence Snyder.

Slides:



Advertisements
Similar presentations
Chapter 15 A Table with a View: Database Queries.
Advertisements

The Relational Database Model
Chapter Information Systems Database Management.
Final Review Sunday March 13th. Databases –Entities/Rows –Attributes/Columns –Keys –Relationships –Schema –Instance.
1 The Information School of the University of Washington Nov 27fit databases © 2006 University of Washington Database Intro INFO/CSE 100, Fall 2006.
The Relational Database Model
Chapter 14 Getting to First Base: Introduction to Database Concepts.
1 The Information School of the University of Washington Nov 20fit spreadsheets © 2006 University of Washington Structured Data INFO/CSE 100, Fall.
Introduction to Database Systems 1 Relational Algebra Relational Model: Topic 3.
The Relational Database Model. 2 Objectives How relational database model takes a logical view of data Understand how the relational model’s basic components.
Learning Objectives Explain the differences between everyday tables and database tables Use XML to describe the metadata for a table of information,
Chapter 4 Relational Databases Copyright © 2012 Pearson Education, Inc. publishing as Prentice Hall 4-1.
3 1 Chapter 3 The Relational Database Model Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel.
The Relational Model Codd (1970): based on set theory Relational model: represents the database as a collection of relations (a table of values --> file)
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.
DATA, DATABASES, AND QUERIES Managing Data in Relational Databases CS1100Microsoft Access - Introduction1.
DATA, DATABASES, AND QUERIES Managing Data in Relational Databases CS1100Microsoft Access - Introduction1 Created By Martin Schedlbauer
3 The Relational Model MIS 304 Winter Class Objectives That the relational database model takes a logical view of data That the relational model’s.
Introduction –All information systems create, read, update and delete data. This data is stored in files and databases. Files are collections of similar.
Copyright © 2003 by Prentice Hall Module 4 Database Management Systems 1.What is a database? Data hierarchy and data organization Field, record, file,
Introduction to Accounting Information Systems
CHAPTER 8: MANAGING DATA RESOURCES. File Organization Terms Field: group of characters that represent something Record: group of related fields File:
MIS 301 Information Systems in Organizations Dave Salisbury ( )
DBSQL 3-1 Copyright © Genetic Computer School 2009 Chapter 3 Relational Database Model.
Banner and the SQL Select Statement: Part Three (Joins) Mark Holliday Department of Mathematics and Computer Science Western Carolina University 4 November.
1 The Relational Database Model. 2 Learning Objectives Terminology of relational model. How tables are used to represent data. Connection between mathematical.
9/7/2012ISC329 Isabelle Bichindaritz1 The Relational Database Model.
3 1 Chapter 3 The Relational Database Model Database Systems: Design, Implementation, and Management, Sixth Edition, Rob and Coronel.
CS 1308 Computer Literacy and the Internet
Component 4: Introduction to Information and Computer Science Unit 6a Databases and SQL.
Chapter 15 Introduction to Database Concepts. Learning Objectives Explain the differences between everyday tables and database tables Use XML to describe.
+ Information Systems and Databases 2.2 Organisation.
3 1 Chapter 3 The Relational Database Model Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel.
The University of Akron Dept of Business Technology Computer Information Systems The Relational Model: Concepts 2440: 180 Database Concepts Instructor:
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Fluency with Information Technology Third Edition by Lawrence Snyder Chapter.
Quiz questions. 1 A data structure that is made up of fields and records? Table.
Database Management Supplement 1. 2 I. The Hierarchy of Data Database File (Entity, Table) Record (info for a specific entity, Row) Field (Attribute,
Database Basics BCIS 3680 Enterprise Programming.
3 1 Database Systems The Relational Database Model.
Fluency with Information Technology INFO100 and CSE100 Katherine Deibel Katherine Deibel, Fluency in Information Technology1.
3 1 Chapter 3 The Relational Database Model Database Systems: Design, Implementation, and Management, Sixth Edition, Rob and Coronel.
Jennifer Widom Relational Databases The Relational Model.
SHAKEELA Databases = Fun..Fun..Fun. Databases are……UBIQUITOUS EVERYWHERE...Ever Present…used all over the world  Online Movie Store  Airlines  Grades.
Week 2 Lecture The Relational Database Model Samuel ConnSamuel Conn, Faculty Suggestions for using the Lecture Slides.
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 Relational Algebra Chapter 4, Part A.
DATA SCIENCE MIS0855 | Spring 2016 Designing Data
Database (Microsoft Access). Database A database is an organized collection of related data about a specific topic or purpose. Examples of databases include:
Databases That's no moon. It's a base of data... in space
Revised: 2 April 2004 Fred Swartz
Learning Objectives Explain the differences between everyday tables and database tables Use XML to describe the metadata for a table of information, and.
Databases Chapter 16.
Chapter 2: Relational Model
Chapter 12 Information Systems.
A Table with a View: Database Queries
CIS 207 The Relational Database Model
Information Systems Database Management
Chapter 4 Relational Databases
INFO/CSE 100, Spring 2006 Fluency in Information Technology
Relational Databases The Relational Model.
Relational Databases The Relational Model.
Announcements Project 2’s due date is moved to Tuesday 8/3/04
Getting to First Base: Introduction to Database Concepts
A Table with a View: Database Queries
INFO/CSE 100, Spring 2006 Fluency in Information Technology
Getting to First Base: Introduction to Database Concepts
Getting to First Base: Introduction to Database Concepts
A Table with a View: Database Queries
INFO/CSE 100, Spring 2005 Fluency in Information Technology
Presentation transcript:

Databases Databases are collections of information; our study repeats a theme: Tell the computer the structure, and it can help you! © 2004, Lawrence Snyder

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 How much of your information can be in a table?

Stone Age Databases Before relational databases (the kind we study) there were only “flat files” Structural information was difficult to express All processing of information was “special cased” -- custom programs were needed Information repeated; difficult to combine Changes in format of one file means all programs that ever process that file must be changed … adding ZIP codes E.F. Codd of IBM invented relational databases

Relational Databases Information is stored in tables Tables store information about entities -- things or stuff … keep entities of one kind Entities have characteristics called attributes Tables are tuples (rows or records) of attributes (columns or fields ) Every row must be unique, identified by a key Relationships -- associations among the data values are stored Table structure = schema Table contents = instance

A Table Tables have names, attributes, tuples Example: IDnumber unique number(Key) Lasttext person’s last name Firsttext person’s first name Hiredate first day on job Addrtext street address Instance Schema

Redundancy Is Very Bad Not every assembly of tables is a good database -- repeating data is bad Replicated data can differ in its different locations, e.g. multiple addresses can differ Inconsistent data is worse than no data Keep a single copy of any data, and if it is needed in multiple places, associate it with a key, and store key rather than the data

“You can look it up” When looking for information, a single item might be the answer, but a table is more likely “Who is taking CSIS1”? Table of students “Whose mile run time  4:00?” Runner table “Who won 2003 Grammy for ‘Best New Artist?” A table containing only a single row Queries to a DB (set of tables) produces tables

Tables From Tables There are five fundamental operations on tables to create tables: Select -- pick rows from a table Project -- pick columns from a table Union -- combine two tables w/like columns Difference -- remove one table from another Product -- create “all pairs” from two tables Though not primitive “Join” is usually included

Select Operation Select creates a table from the rows of another table meeting a criterion Select_from Example On Hire < 1993

Project Project creates a table from the columns of another table Project Last, First From Example

Union Union (written like addition) combines two tables with same attributes PoliticalUnits = States + Provinces

Difference Difference (written like subtraction) removes 1 table’s rows from another Eastern = States - WestCoast

Product Product (written like multiplication) combines columns and pairs all rows Colors = Blues x Reds Column Rule: If A has x columns, B has y columns, A x B has x+y columns Row Rule: If A has m rows, B has n rows A x B has mn rows There’s divide, too, but forget it

Join Join (written like a bow tie) combines rows (like x ) if common field matches Homes = States Students ><

DB Operations The five DB Operations can create any table from a given set of tables All modern database systems are built on these relational operations Join is not primitive, but can be built from 5 Join, select and project are used most often The operations are not usually used directly, but are used indirectly from other languages SQL, the DB language we learn, is built on basic 5