Looking at using multiple tables

Slides:



Advertisements
Similar presentations
Relational Database Example in Access - Order System Please use speaker notes for additional information!
Advertisements

MULTIPLE-TABLE QUERIES
Order Entry System Please use speaker notes for additional information!
Relational example using donor, donation and drive tables For additional information see the speaker notes!
Queries and query design What are queries? Questions that can be asked of the data in the tables. Questions can draw on one or more tables and can have.
Relational example using donor, contrib and drive tables Please use speaker notes for additional information!
Database Relationships Objective 5.01 Understand database tables used in business.
Database Relationships Objective 5.01 Understand database tables used in business.
Xin  Syntax ◦ SELECT field1 AS title1, field2 AS title2,... ◦ FROM table1, table2 ◦ WHERE conditions  Make a query that returns all records.
More on relational databases, including 1 to 1, 1 to many and many to many relationships Please use speaker notes for additional information!
IST 210: ORGANIZATION OF DATA Chapter 1. Getting Started IST210 1.
Access 2013 Microsoft Access 2013 is a database application that is ideal for gathering and understanding data that’s been collected on just about anything.
Relationships and Advanced Query Concepts Using Multiple Tables Please use speaker notes for additional information!
XML and DTD Please you speaker notes for additional information!
1 Database Concepts 2 Definition of a Database An organized Collection Of related records.
To access our web services, go to……. Click on Customer Login.
Database Design 3: Advanced Data Modeling Concepts CS 320.
Forms and Subforms 5.02 Understand database queries, forms, and reports used in business.
Four Big Buckets Bullet point one Bullet point two Bullet point three Bullet point one Bullet point two Bullet point three Bullet point one Bullet point.
Introduction to Oracle - SQL Additional information is available in speaker notes!
Access Forms 1. Forms Provide an easy way to Enter data Modify data View data 2.
Database Objective Demonstrate basic database concepts and functions.
A table is a set of data elements (values) that is organized using a model of vertical columns (which are identified by their name) and horizontal rows.
Poor Naming Standards Presented by: Niño R. Ricon Alain Anuevo MIT Presented to Dr. Armando and to the class of Database Design.
1 PK: None Orders PK: CustID Customers PK: PaymentID Payments PK: StockNum Inventory PK: Type PaymentType FK: CustID on Orders FK: CustID on Payments.
Relational Database in Access Student System As always please use speaker notes!
Join Queries CS 146. Introduction: Join Queries  So far, our SELECT queries have retrieved data from a single table  Usually queries combine data from.
This is the software we will use to load our html page up to the server. You can download a copy for home if you want to.
Copyright © 2016 Pearson Education, Inc. CHAPTER 7: ADVANCED SQL (PART I) Modern Database Management 12 th Edition Jeff Hoffer, Ramesh Venkataraman, Heikki.
Chapter 1. Getting Started IST 210: Organization of Data IST2101.
3D PUZZLE PYRAMID Example Text This is an example text.
The data in the table.. Starting a query. Two criteria in an AND relationship.
Test1 Here some text. Text 2 More text.
Multiplication table. x
From ER to Relational Model
Agenda item number 1 Agenda item number 2 Agenda item number 3 Agenda item number 4 Agenda item number 5.
Please use speaker notes for additional information!
Donate a book £5.75 Or Donations towards a book.
Miscrosoft Office..
I am opeing Access 2003 in the Microsoft Office.
[type text here] [type text here] [type text here] [type text here]
Your text here Your text here Your text here Your text here Your text here Pooky.Pandas.
NAME OF PRESENTATION Company name.
On new..
Introduction to Database Programs
This shows the tables that I made for the order system.
Your text here Your text here Your text here Your text here
NAME OF PRESENTATION Company name.
Database Fundamentals
5 × 7 = × 7 = 70 9 × 7 = CONNECTIONS IN 7 × TABLE
5 × 8 = 40 4 × 8 = 32 9 × 8 = CONNECTIONS IN 8 × TABLE
NAME OF PRESENTATION Company name.
Please use speaker notes for additional information!
[type text here] [type text here] [type text here] [type text here]
4 × 6 = 24 8 × 6 = 48 7 × 6 = CONNECTIONS IN 6 × TABLE
5 × 6 = 30 2 × 6 = 12 7 × 6 = CONNECTIONS IN 6 × TABLE
Pages NOTE: On a single line, any point that is a solution will fall on the line. Any point that is NOT a solution, will be a point that is NOT on.
Introduction to Database Programs
10 × 8 = 80 5 × 8 = 40 6 × 8 = CONNECTIONS IN 8 × TABLE MULTIPLICATION.
3 × 12 = 36 6 × 12 = 72 7 × 12 = CONNECTIONS IN 12 × TABLE
Select to type presentation title here in this place at this length.
An ABC Book by.
An ABC Book by.
An ABC Book by.
9 x 14 9 x 12 Calculate the value of the following: 1 9 × 5 =
5 × 12 = × 12 = × 12 = CONNECTIONS IN 12 × TABLE MULTIPLICATION.
Using SQL with Access I create a database named
5 × 9 = 45 6 × 9 = 54 7 × 9 = CONNECTIONS IN 9 × TABLE
3 × 7 = 21 6 × 7 = 42 7 × 7 = CONNECTIONS IN 7 × TABLE
Multiplication Facts 3 x Table.
Presentation transcript:

Looking at using multiple tables Looking at using multiple tables. This example uses the donor table, the donation table and the drive table.

This is one approach, I have asked you to check JOIN in your book or on line.

Note that in the select, any field that appears on both tables such as driveno has to have the table.fieldname to avoid confusion.

Without the where clause, I get every possible combination.

The where cluase can also set other criteria such as driveno > '100'.

Relating the donor and donation tables based on idno and the donation and drive tables based on driveno.

This example has a customer table, an inventory table, an orders table, an order line item table, a sales person table and a department table. See slides ahead.

Shows the relationship among the first four tables.

I should call the fields by the same name I should call the fields by the same name. Here on the customer table I called in slsrep and on the sales person table I called it salsrep. I should have made them the same.

Relating the inventory table and the department table based on dept Relating the inventory table and the department table based on dept. Note taht dept is a text field.

Relating the orders table and the customer table based on custid. Relating the order table and the order line item table based on order number.

Relating the order table and the order line item table based or order number and the order table and the inventory table based on item number.

Relating the order and order line item table based on order number and the order and customer tables based on customer id and the order line item table and the inventory table based on itemno.