1 LBSC 690: Week 9 SQL, Web Forms. 2 Discussion Points Websites that are really databases Deep vs. Surface Web.

Slides:



Advertisements
Similar presentations
Your Trade Exchange And
Advertisements

SQL Database for a Book Store Clinton McKay. Explanation The database contains information about the books held in stock, their authors, publishers, customers,
Exercise 1 Consider the ER diagram below. Assume that an employee may work in up to two departments or may not be assigned to any department. Assume that.
Access 2007 ® Use Databases How can Microsoft Access 2007 help you structure your database?
Database Design Week 10.
Microsoft Access 4 Database Creation and Management.
MICROSOFT OFFICE ACCESS 2007.
 To provide you with an overview of the aspects that make up a relational database.  This includes: › Tables › Records › Fields › Data types › Keys.
Table design screen Field name Data type Field size Other properties.
LBSC 690 Session #8 SQL and Web Applications Jimmy Lin The iSchool University of Maryland Wednesday, October 22, 2008 This work is licensed under a Creative.
Table design screen Field name Data type Field size Other properties.
A Guide to SQL, Seventh Edition. Objectives Introduce Premiere Products, a company whose database is used as the basis for many of the examples throughout.
Concepts of Database Management, 4th Edition, Pratt & Adamski
LSP 121 Week 2 Normalization and Queries. Normalization The Old Car Club database presented a problem – what if one person owns multiple cars? (One owner.
Utility Service Database Design a database to keep track of service calls for a utility company: Customers call to report problems Call center manages.
Interpreting SQL Code. SQL (The language used to query a database) S is used to specify the you want to include. F is used to specify the the selected.
Case study Lisa’s Bookstore IST210.
Database Software Application
Organizing Your Job Search
INFORMATION TECHNOLOGY IN BUSINESS AND SOCIETY SESSION 16 – SQL SEAN J. TAYLOR.
Session 5: Working with MySQL iNET Academy Open Source Web Development.
1 Chapter 1: Finding Your Way Through a Database Exploring Microsoft Office Access 2010.
LSP 121 Week 1 Intro to Databases. Welcome to LSP 121 Quantitative Reasoning and Technological Literacy II Continuation of quantitative data concepts.
LSP 121 Week 2 Normalization and Advanced Queries.
Database : collection of information. data management tool. huge volumes. like a filing system. providing answers.
Relational DBs and SQL Designing Your Web Database (Ch. 8) → Creating and Working with a MySQL Database (Ch. 9, 10) 1.
Relational Database Concepts. Let’s start with a simple example of a database application Assume that you want to keep track of your clients’ names, addresses,
A Guide to SQL, Eighth Edition 1 Chapter One Introduction to Premiere Products, Henry Books, and Alexamara Marina Group.
Lesson 1 -What is a Database? -Fields and Records
MICROSOFT ACCESS Database Applications. Database Management System A database is a collection of organized data whose elements are in some way related.
Sundara Ram Matta Mar 02 nd, Sundara Ram Matta Mar 02 nd, 2015
CMDB Ticketing Billing Management Systems VIRTUAL MACHINE CLOUDS 12 SQL SERVER 9 PLANS 12 WEBSITE CLOUD 12 MYSQL SERVERS 0 NOTIFICATIONS 0 USER.
CS101 Introduction to Computing Lecture 35 Database Software.
Inner Join vs. Outer Join
Relational Databases Melton, Beth “Databases: Access Terminology and Relational Database Concepts.” 09/LPMArticle.asp?ID=73http://pubs.logicalexpressions.com/Pub00.
SQL 101 for Web Developers 14 November What is a database and why have one? Tables, relationships, normalization SQL – What SQL is and isn’t – CRUD:
PHP and MySQL CS How Web Site Architectures Work  User’s browser sends HTTP request.  The request may be a form where the action is to call PHP.
What is a Database? A Database is…  an organized set of stored information usually on one topic  a collection of records  a way to organize information.
System Initialization 1)User starts application. 2)Client loads settings. 3)Client loads contact address book. 4)Client displays contact list. 5)Client.
Database Design and Management CPTG /23/2015Chapter 12 of 38 Functions of a Database Store data Store data School: student records, class schedules,
A Guide to MySQL. 2 Objectives Introduce Premiere Products, a company whose database is used as the basis for many of the examples throughout the text.
SESSION 3.1 This section covers using the query window in design view to create a query and sorting & filtering data while in a datasheet view. Microsoft.
1 Chapter 1: Finding Your Way Through a Database Exploring Microsoft Office Access 2007.
MS Access. Access is a DBMS/RDMS DBMS = Database Management System RDMS = Relational Database Management System.
Access 2007 ® Use Databases How can Microsoft Access 2007 help you structure your database?
INFORMATION TECHNOLOGY DATABASE MANAGEMENT. Adding a new field 1Right click the table name and select design view 2Type the field information at the end.
Group Members: Tien Ho Linda Early Steve Meeks. Who Dunnit Bookstore System Request  Project Sponsor: Thomas Jones, Owner of WhoDunnit Bookstore  Phone:
1 PROJECT 10 DATABASE QUERIES— TEXTBOOK DATABASE Management Information Systems, 9 th edition, By Raymond McLeod, Jr. and George P. Schell © 2004, Prentice.
SqlExam1Review.ppt EXAM - 1. SQL stands for -- Structured Query Language Putting a manual database on a computer ensures? Data is more current Data is.
How Your Customers Will Pay Online & by Phone
Accounting Information Systems: A Business Process Approach Chapter Three: Documenting Accounting Systems.
IMS 4212: Constraints & Triggers 1 Dr. Lawrence West, Management Dept., University of Central Florida Stored Procedures in SQL Server.
Stanislaus County Employee Access DataStore Application Presented By: Melanie Lema, Information Technology Unit Stanislaus County Department of Child.
INTRODUCTION DATABASE TO. Who Needs a Database?????? We all do!!!!!!!!
Notes: **A Row is considered one Record. **A Column is a Field. A Database is…  an organized set of stored information usually on one topic  a collection.
G057 - Lecture 05 From Scenario To Design Mr C Johnston ICT Teacher
1 Section 8 - Manipulating Data u The INSERT statement adds rows of data to the database u The UPDATE statement changes columns of existing data u The.
Week 1 Intro to the Course Intro to Databases.  Formerly ISP 121  “Continuation” of LSP 120 concepts  Topics include: ◦ Databases ◦ Basic statistics.
2b. Create an Access Database Lingma Acheson Department of Computer and Information Science IUPUI CSCI N207 Data Analysis with Spreadsheets 1.
1 Finding Your Way Through a Database Exploring Microsoft Office Access.
A Guide to MySQL.
SQL Relational Database Project
Exploring Microsoft Office Access 2007
Case Study Creating a Database
Aftermarket Parts and Services
INFO/CSE 100, Spring 2006 Fluency in Information Technology
Week 9 – Databases.
SALES RECEIPT Downloaded from
Accounting Information Systems: A Business Process Approach
Presentation transcript:

1 LBSC 690: Week 9 SQL, Web Forms

2 Discussion Points Websites that are really databases Deep vs. Surface Web

3 Putting the Pieces Together Web Server HTML CGI Browser SQL Query Results Database

4 Simple Examples Let’s do some simple things together You are a publisher Create a table that will provide book info to libraries and book stores –Table Book –Title, author, year published, ISBN, sale price Create a table to describe books for the accounting/marketing department –Table Money –ISBN, copies sold, publishing cost

5 Bringing Data Together We want to figure out the profit for each book –ISBN, sale price, publishing cost Join tables Book and Money –On ISBN Restrict/Select –ISBN, sale price, publishing cost

6 Example 2 Get the titles of 10 of Stephen King’s books Select –Title Restrict –Where author = “Stephen King” –(Don’t worry about syntax - quotes, etc) LIMIT 10

7 Example 3 Get the titles of Stephen King’s 10 most recent books Select –Title Restrict –Where author = “Stephen King” –(Don’t worry about syntax - quotes, etc) ORDER BY –year LIMIT 10

8 Example 4 Get the title and data on the profit for Stephen King’s 10 most recent books Join tables Book and Money on ISBN Select –Title, sale price, publishing cost Restrict –where author=“Stephen King” Order by year Limit 10

9 Utility Service Database Design a database to keep track of service calls for a utility company: –Customers call to report problems –Call center manages “tickets”, assigning workers to jobs Must match the worker’s specialty and service location (zip code) Must balance number of assignments (give new job to appropriate worker with the lowest work load) –Workers call in and ask where their next jobs are In SQL, you can perform the following operations: –Count the number of rows in a result set –Sort the result set according to a field –Find the maximum and minimum value of a field

10 A Possible Answer: Tables Customer: cid, contact name, phone number, address, zip Worker: wid, name, phone number, location code, specialty Ticket: tid, problem, cid, wid, time assigned, status Area: zip, location code

11 One Possible Answer: Queries Customer calls: I have a problem! –Join customer, area, and worker tables on zip and location code; restrict on cid and specialty → available workers –For each worker, count outstanding tickets –Insert a record in the ticket table, assigning job to worker to fewest assigned jobs Worker calls: Where’s my next job? And what’s the problem? –Join ticket and customer tables on cid; restrict on status = “not yet completed”, sort rows by time assigned

12 Expand Your Database Include information on customer billing –Include a bill, the date of the bill, due date, cost, and past due status Service requests require a customer’s account be current Worker calls to check on the status of a customer’s account

13 Table Billing Table –cid, bill date, due date, amount due, past due status Query Join ticket and billing tables on cid Restrict by ticket number Select past due status