Databases Week 5 LBSC 690 Information Technology.

Slides:



Advertisements
Similar presentations
Intro to Access 2007 Lindsey Brewer CSSCR September 18, 2009.
Advertisements

Pasewark & Pasewark Microsoft Office XP: Introductory Course 1 INTRODUCTORY MICROSOFT ACCESS Lesson 4 – Finding and Ordering Data.
Copyright © 2008 Pearson Prentice Hall. All rights reserved. 1 1 Committed to Shaping the Next Generation of IT Experts. Chapter 2: Relational Databases.
Maintenance Modifying the data –Add records –Delete records –Update records Modifying the design –Add fields into tables –Remove fields from a table –Change.
BA271 Week 6 Lecture Database Overview Dave Sullivan.
SUNY Morrisville-Norwich Campus-Week 10 CITA 130 Advanced Computer Applications II Spring 2005 Prof. Tom Smith.
ISP 121 Week 1 Introduction to Databases. ISP 121, Winter Why a database and not a spreadsheet? You have too many separate files or too much data.
Extended Learning Module J (Office 2007 Version) Implementing a Database with Microsoft Access McGraw-Hill/Irwin Copyright © 2010 by the McGraw-Hill Companies,
Introduction to Databases CIS 5.2. Where would you find info about yourself stored in a computer? College Physician’s office Library Grocery Store Dentist’s.
Databases Week 7 LBSC 690 Information Technology.
Week 6 LBSC 690 Information Technology
Databases Week 6 LBSC 690 Information Technology.
Querying a Database Microsoft Office Access 2003.
Spreadsheets and Databases Class 8 LBSC 690 Information Technology.
Relational Databases Week 7 LBSC 690 Information Technology.
Microsoft Access Ervin Ha.
Microsoft Access Database software. What is a database? … a database is an organized collection of data. A collection of data of similar information compiled.
Microsoft Access Intro Class 1 Database Concepts.
MICROSOFT ACCESS Pn. Jamilah Binti Yusof. DEFINITION A database is the computer equivalent of an organized list of information. Typically, this information.
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall 1 1. Chapter 2: Relational Databases and Multi-Table Queries Exploring Microsoft Office.
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall1 Exploring Microsoft Office Access 2007 Committed to Shaping the Next Generation of.
Classroom User Training June 29, 2005 Presented by:
CPSC 203 Introduction to Computers T59 & T64 By Jie (Jeff) Gao.
Copyright © 2008 Pearson Prentice Hall. All rights reserved.1 1 Committed to Shaping the Next Generation of IT Experts. Chapter 2: Relational Databases.
DAY 15: ACCESS CHAPTER 2 Larry Reaves October 7,
DAY 14: ACCESS CHAPTER 1 Tazin Afrin October 03,
Exploring Office Grauer and Barber 1 Introduction to Access: What is a Database?(Wk1)
Microsoft Access 2003 Define some key Access terminology: Field – A single characteristic or attribute of a person, place, object, event, or idea. Record.
Databases Session 5 LIS 7008 Information Technologies LSU/SLIS.
Management Information Systems MS Access MS Access is an application software that facilitates us to create Database Management Systems (DBMS)
XP New Perspectives on Microsoft Office Access 2003 Tutorial 9 1 Microsoft Office Access 2003 Tutorial 9 – Using Action Queries, and Defining Table Relationships.
XP 1 Microsoft Access 2003 Introduction To Microsoft Access 2003.
Key Applications Module Lesson 21 — Access Essentials
More about Databases. Data Entry through Forms Table View (Data sheet view) is useful for data entry of new records But sometimes customization would.
Chapter 17 Creating a Database.
MS Access 2007 Management Information Systems 1. Overview 2  What is MS Access?  Access Terminology  Access Window  Database Window  Create New Database.
Relational Databases Week 11 LBSC 671 Creating Information Infrastructures.
Microsoft Access Intro Class 6 Relationships.
ITGS Databases.
McGraw-Hill/Irwin ©2005 The McGraw-Hill Companies, All rights reserved ©2005 The McGraw-Hill Companies, All rights reserved McGraw-Hill/Irwin.
1 CSE 2337 Introduction to Data Management Access Book – Ch 1.
U:/msu/course/cse/103 Day 18, Slide 1 CSE 103 Day 18 If you are not enrolled in CSE 103, please save and log out by 10:10.
Microsoft Office 2013: In Practice Chapter 2 Using Design View, Data Validation, and Relationships Copyright © 2014 by The McGraw-Hill Companies, Inc.
Exploring Office Grauer and Barber 1 One-to-Many Relationships: Subforms and Multiple-Table Queries(Wk7)
Pasewark & Pasewark Microsoft Office 2003: Introductory 1 INTRODUCTORY MICROSOFT ACCESS Lesson 4 – Finding and Ordering Data.
IST 220 – Intro to Databases Lecture 2 Touring Microsoft Access.
CPSC 203 Introduction to Computers T97 By Jie (Jeff) Gao.
McGraw-Hill/Irwin Copyright © 2013 by The McGraw-Hill Companies, Inc. All rights reserved. Extended Learning Module J (Office 2007 Version) Implementing.
Exploring Microsoft Access Chapter 5 One-to-Many Relationships: Subforms and Multiple Table Queries.
Access Module Implementing a Database with Microsoft Access A Great Module on Your CD.
DAY 14: ACCESS CHAPTER 1 RAHUL KAVI October 8,
Data Modeling Session 12 INST 301 Introduction to Information Science.
Relational Databases (Part 2) Session 14 INST 301 Introduction to Information Science.
Database (Microsoft Access). Database A database is an organized collection of related data about a specific topic or purpose. Examples of databases include:
XP Chapter 1 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 1 Level 2 Objectives: Understanding and Creating Table.
N5 Databases Notes Information Systems Design & Development: Structures and links.
New Perspectives on Microsoft Access 2016
Prepared By: Bobby Wan Microsoft Access Prepared By: Bobby Wan
GO! with Microsoft Office 2016
Exploring Microsoft Office Access 2007
Practical Office 2007 Chapter 10
Introduction to Computing
and Defining Table Relationships
Objectives Create an action query to create a table
GO! with Microsoft Access 2016
Exploring Microsoft Office Access 2007
More about Databases.
Week 6 LBSC 690 Information Technology
Class 5 LBSC 690 Information Technology
Relationships While we are on the subject of Relationships, let’s take a quick look at them.
Presentation transcript:

Databases Week 5 LBSC 690 Information Technology

Agenda Questions Relational database design Implementation using Microsoft Access

Relational Databases Tables represent relations –Name, project –Name, address, phone number Relations can be “joined” –Name, project, address, phone number Relations can be “projected” –Name, address Relations can be “restricted” –Name = “Doug Oard”

Why use Join? Forces consistency –Doug Oard, project 18, –Doug Oard, project 22, Limits the chance of error –Doug Oard, project 18, –Doug Oard, project 19, Avoids lots of duplicated entry and updates Can save a lot of storage space

Problems with Joins Data modeling for joins is complex –Taught in LBSC 670 Joins are expensive to compute –Both in time and storage space But it is joins that make databases “relational” –Projection and restriction also used in flat files

Key Fields Primary Key uniquely identifies line to join –May group several fields to get a unique key Social security number First and last name “Foreign” key must appear in the other table –But it need not be unique there Join makes a new table –Line specified by foreign key is tacked on

Example of a Join on “Team” Name Team Project NameTeamProject Chris Camile Eileen Natalie David Tonya Skip A A A B C B C C A B C Database Web A A A B C B C C Chris Camile Eileen Natalie David Tonya Skip Database Web Database

Project to Keep Two Fields Name Team Project NameProject Chris Camile Eileen Natalie David Tonya Skip A A A B C B C C A B C Database Web Chris Camile Eileen Natalie David Tonya Skip Database Web Database

Restrict to Web Pages Name Team Project NameProject Eileen Natalie David Tonya Skip A A A B C B C C A B C Database Web Chris Camile Eileen Natalie David Tonya Skip Web

How to Split Tables The idea is to remove redundancy For simple problems (like the homework) –Start with “binary relationships” Pairs of fields that are related –Group together wherever possible –Add keys where necessary For more complicated problems –Entity relationship modeling (LBSC 670)

FlightFinder Exercise Design a database to match passengers with available flights on corporate jets –Companies phone in available seats They want to know about interested passengers –Passengers call up looking for flights They want to know about available flights –These things happen in no particular order

Exercise Goals Identify the tables you will need –First decide what data you will save What questions will be asked? –Then decide how to group it into tables Start with binary relations if that helps Design the queries –Using join, project and restrict Add primary and foreign keys where needed

Exercise Logistics Work in groups of 3 or 4 Brainstorm data requirements for 5 minutes –Do customers care about the price? –Do companies care what passengers weigh? Develop tables and queries for 15 minutes –Don’t get hung up on one thing too long Compare you answers with another group –Should take about 5 minutes

One Possible Answer Surely you didn’t expect this in the notes :) Flight: Flight Number, Origin, Destination, Departure Time, Arrival Time, Available Seats, Company Name, Price Passenger: Passenger Number, Name, Address, Phone Number Booking: Flight Number, Passenger Number Company: Company Name, Company Address, Company Phone Passenger calls: Join: Flight, Company Project: Departure Time, Company Phone Restrict: Origin, Destination, Available Seats>0 Company calls: Join: Flight, Passenger, Booking Project: Flight Number, Name, Phone Number Restrict: Company Name Tables: Queries:

Microsoft Access Start Access –Icon in the Microsoft Office folder Name your database planes.mdb in M:\ Click “Table” and then “New” –Select “New Table” Table wizards can be helpful (query wizards are not) Enter the fields

Entering Fields Field Names must be unique in a table Select field type from a menu –Use date/time for times –Use text for phone numbers Use right mouse button for primary key Save the table when you’re done –That’s when you get to name it Exit, then reselect to enter the data

Building Queries Copy N:\share\class\flight.* to M:\ Select “Queries” then “New” –Skip the query wizard Choose two tables –Flight and Company Pick each field you need using the menus –Unclick the X to “unproject” –Enter a criteria to “restrict” Save, exit, and reselect to run the query

Fun Facts about Queries Joins are automatic if field names are same –Otherwise, drag a line between the fields Sort order is easy to specify –Use the menu Queries form the basis for reports –Reports give good control over layout –Use the report wizard - the formats are complex

Other Things to Know Referential integrity assures joins will work –Need to specify this when defining tables Forms manage input better than raw tables –Invalid data can be identified when input –Graphics can be incorporated

Key Ideas Databases are a good choice when you have –Lots of data –A problem that contains inherent relationships Design before you implement –This is just another type of programming Join is the most important concept –Project and restrict just remove undesired stuff

Database Projects Design for large amounts of data –Must use multiple tables –Need a plan for long-term maintenance How will data be removed? Attention to the user interface –Forms and reports –Web interfaces are hard Enough content to verify proper operation