Test 1 Review. What’s wrong with this table? ItemNoType InitialCost RepairNo Date RepairCost 100Drill Press35002000 5/5/06 375 200Lathe 47502100 5/7/06.

Slides:



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

Multiple Table Queries
Normalization What is Normalization? Normalization Levels –First Normal Form –Second Normal Form –Third Normal Formal Referential Integrity.
BACS 485 Normalization. Data Anomalies WORKER (WORKER-ID, NAME, SKILL-TYPE, SUPV-ID, BLD-ID) WORKER-IDNAMESKILL-TYPESUPV-IDBLD-ID 1235M. FaradayElectric
CS370 Spring 2007 CS 370 Database Systems Lecture 6 Introduction to Database Design.
DBS201: Merging 3NF Tables Lecture 7.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 3-1 David M. Kroenke’s Chapter Three: The Relational Model and Normalization.
Employee database: Conceptual Schema in ERD Chapter 3, page 62.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-1 COS 346 Day 9.
SQL – Part II Yong Choi School of Business CSU, Bakersfield.
SQL – Part II Yong Choi School of Business CSU, Bakersfield.
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.
Employee Central Presentation
Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition Copyright © 2004 Pearson Education, Inc. Slide 2-1 Data Models Example: A relation.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 4-1 David M. Kroenke Database Processing Chapter 7 Structured Query Language.
Utility Service Database Design a database to keep track of service calls for a utility company: Customers call to report problems Call center manages.
Seminar #1 – Refreshing databases concepts and SQL CM036: Advanced Databases1 Seminar 1: Revisiting Databases and SQL Purpose To refresh basic concepts.
Part ( PartNum, Description, OnHand, Class, Warehouse, Price,
People © 2013 The Sleeter Group All rights reserved. Intuit, the Intuit logo and QuickBooks, among others, are registered trademarks of Intuit Inc. Other.
1 Introduction to databases concepts CCIS – IS department Level 4.
A Guide to SQL, Eighth Edition 1 Chapter One Introduction to Premiere Products, Henry Books, and Alexamara Marina Group.
A Guide to SQL, Eighth Edition Chapter Two Database Design Fundamentals.
SQL – Part II Yong Choi School of Business CSU, Bakersfield.
Switch off your Mobiles Phones or Change Profile to Silent Mode.
Improving the Quality of Database Designs (Adapted from David Kroenke, Dabase Processing)
Concepts of Database Management Seventh Edition Chapter 4 Keys and Relationship.
The Relational Data Model and Relational Database Constraints
2012.  Use the Employee Center to view previous payroll activity  Update your Payroll Tax Tables  Create Paychecks and override default calculations.
Doing Payroll With QuickBooks Lesson Lesson objectives  To gain an overview of payroll in QuickBooks  To learn more about payroll setup  To set.
Chapters 13 & 14 Normalization. Agenda Definition Purpose Terminology Types of Normal Form Examples.
Concepts of Database Management Sixth Edition Chapter 5 Database Design 1: Normalization.
1 A Guide to MySQL 2 Database Design Fundamentals.
Copyright Ó Oracle Corporation, All rights reserved. Normalization Use the student note section below for further explanation of the slide content.Use.
Part II. Query Types On the design query table pane, right click and the cascading window will appear.
The Relational Model J.G. Zheng Jan 2010 CIS 8040 Database Management Systems.
4a. Structured Query Language - SELECT Statement Lingma Acheson Department of Computer and Information Science IUPUI CSCI N207 Data Analysis with Spreadsheets.
Employee Self Service. Go paperless when all employees are direct deposit and have an address Employees have access to their Flex-Pay check history.
© 2002 by Prentice Hall 1 David M. Kroenke Database Processing Eighth Edition Chapter 9 Structured Query Language.
A Guide to SQL, Eighth Edition Chapter Eight SQL Functions and Procedures.
Concepts of Database Management Seventh Edition Chapter 5 Database Design 1: Normalization.
VendorVision Lender Module Release Features January 8, 2015 – March 10, 2015 H. Balogh, G. GabeConfidential.
Online Pay Statements. Go paperless when all employees are direct deposit and have an address Employees have access to their Flex-Pay check history.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 3-1 David M. Kroenke’s Chapter Three: The Relational Model and Normalization.
DO NOT COPY --CONFIDENTIAL Homework 5 Partial Key Star Diagrams & Data Warehouse Design BCIS 4660 Dr. Nick Evangelopoulos Spring 2012.
EntityRelationshipDiagrams. Entity Relationship Models The E-R (entity-relationship) data model views the real world as a set of basic objects (entities)
Concepts of Database Management Seventh Edition Chapter 4 Keys and Relationship.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 6-1 David M. Kroenke’s Chapter Six: Transforming Data Models into Database.
INFS 6220 Systems Analysis & Design Transactional DBs vs. Data Warehouses.
1 First Normal Form (1NF) Unnormalized table : Contains a repeating group –Eg: from multi-valued attributes –Eg: from many-many relationship Table in 1NF:
A Guide to SQL, Eighth Edition 1 Chapter One Introduction to Premiere Products, Henry Books, and Alexamara Marina Group.
SAN DIEGO SUPERCOMPUTER CENTER Introduction to Database Design July 2006 Ken Nunes sdsc.edu.
Database Relationships
A Guide to SQL, Eighth Edition
Database, tables and normal forms
Chapter 9 Part-1: Concepts & Foreign Keys
Database Relationships
Database Design Relational Database.
Database Design Relational Database.
Chapter 9 Part-1: Concepts & Foreign Keys
INFS 3220 Systems Analysis & Design
Normalization – Part II
Yong Choi School of Business CSU, Bakersfield
Yong Choi School of Business CSU, Bakersfield
Yong Choi School of Business CSU, Bakersfield
Database Relationships
Chapter 14 Normalization Pearson Education © 2009.
Company Name Bill Receipt Additional Notes:-­‐ Item No: Particulars
User Views and merging relations & Journaling
Internship Final Report title…..
Presentation transcript:

Test 1 Review

What’s wrong with this table? ItemNoType InitialCost RepairNo Date RepairCost 100Drill Press /5/ Lathe /7/ Drill Press /19/ Mill /11/ Drill Press /11/ Drill Press /1/06 275

COLLEGE(lastName, stuID, homeAddr, homePhone, dormRoom, Roommate, dormAddr, status, mealPlan, roomCharge, mealPlanCharge) Dependencies: stuID all but roommate stuID roommate mealPlan mealPlanCharge dormRoom dormAddr, roomCharge dormAddr roomCharge 1NF 2NF 3NF

CAREER_CENTER(StuName, StuID, Stu , Major, CounselorID, Counselor , CompanyID, CompanyName, CompanyAddress, Contact, StartDate, EndDate, Grade, PayRate) A student may have had many internships, but may have at most one internship with a particular company. A student provides exactly one address; students may register only one major with the career center. Each company is expected to hire several student interns; each company has one contact person. Each internship assignment has a start date, an end date and a rate of pay. Internship assignments are graded. Each career center counselor is assigned to oversee all students in particular majors; (e.g., Mary Smith counsels all interns with cs and business majors; Joe Evans counsels all interns with English and Spanish majors, etc)

Rep (repNum, repName, repZip, commission) Customer (custNum, custName, custZip, balance, repNum) Orders (orderNum, orderDate, custNum) Draw the relational schema

Display all information about customers who have non-zero balances. Rep (repNum, repName, repZip, commission) Customer (custNum, custName, custZip, balance, repNum) Orders (orderNum, orderDate, custNum)

Display the names of all customers, along with their balances, in ascending order. Rep (repNum, repName, repZip, commission) Customer (custNum, custName, custZip, balance, repNum) Orders (orderNum, orderDate, custNum)

Display the name of each customer whose rep is “Jones”. Rep (repNum, repName, repZip, commission) Customer (custNum, custName, custZip, balance, repNum) Orders (orderNum, orderDate, custNum)

Display the name of each customer along with the name of his/her rep. Rep (repNum, repName, repZip, commission) Customer (custNum, custName, custZip, balance, repNum) Orders (orderNum, orderDate, custNum)

Display the numbers of all customers who have never placed an order. Rep (repNum, repName, repZip, commission) Customer (custNum, custName, custZip, balance, repNum) Orders (orderNum, orderDate, custNum)

Display the names of all customers who have never placed an order. Rep (repNum, repName, repZip, commission) Customer (custNum, custName, custZip, balance, repNum) Orders (orderNum, orderDate, custNum)

Display each rep number with the number of customers that rep has. Rep (repNum, repName, repZip, commission) Customer (custNum, custName, custZip, balance, repNum) Orders (orderNum, orderDate, custNum)

Display the names of all customers and the number of orders they have made. Rep (repNum, repName, repZip, commission) Customer (custNum, custName, custZip, balance, repNum) Orders (orderNum, orderDate, custNum)

Display the names of all customers who have made 3 or more orders. Rep (repNum, repName, repZip, commission) Customer (custNum, custName, custZip, balance, repNum) Orders (orderNum, orderDate, custNum)

Using SQL to verify referential integrity Prob 4.4 – do these tables uphold referential integrity? DEPT (DeptName, BudgetCode) EMPLOYEE (EmpNum, Name, , DeptName)