Seminar #1 – Refreshing databases concepts and SQL CM036: Advanced Databases1 Seminar 1: Revisiting Databases and SQL Purpose To refresh basic concepts.

Slides:



Advertisements
Similar presentations
ER Modeling Case Studies
Advertisements

Using the Set Operators
Sometimes you need to use data from more than one table. In example1, the report displays data from two separate tables. Employee IDs exist in the EMPLOYEES.
Database Design Week 10.
ER Modeling Case Studies
ENTITY RELATIONSHIP MODELLING
Homework for November 2011 Nikolay Kostov Telerik Corporation
Writing Basic SQL Statements
Entity Relationship Diagrams
Employee Central Presentation
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.
Dr Derek Peacock14/08/20151 Database Design 1:1 Relationships Dr Derek Peacock.
Seminar #3 CM036: Advanced Databases1 Seminar 4: Relational Algebra and its Simulation using SQL Purpose To understand how the relational operations are.
Practice of ER modeling
Introduction to the Orion Star Data
Seminar #: 9 (Object Oriented Database Schema in ODL) Advanced Databases (CM036) 1 Seminar 9 : OODB Schema in ODL Purpose To understand how an OODB is.
Copyright © 2004, Oracle. All rights reserved. Lecture 6 Displaying Data from Multiple Tables ORACLE.
SQL Structured Query Language Programming Course.
Database Beginnings. Scenario so far In our scenario we have people registering for training sessions. –The data about the training sessions was placed.
Overview of Database Development Data Modeling and Relational Database Design.
MS Access. Access is a DBMS/RDMS DBMS = Database Management System RDMS = Relational Database Management System.
ERD ( Conceptual data model From the statement of data requirements a conceptual data model is produced. This describes.
15 Copyright © Oracle Corporation, All rights reserved. Using SET Operators.
Data Modelling Using Entity-Relationship (ER) Model
5-1 McGraw-Hill/Irwin Copyright © 2007 by The McGraw-Hill Companies, Inc. All rights reserved.
Copyright © 2004, Oracle. All rights reserved. Using the Set Operators.
Database Design – Lecture 6 Moving to a Logical Model.
Introduction to Access Chapter 13 pages 1-4. What is a database??? Related information is stored in databases  All SC student information is stored in.
Database Basics BCIS 3680 Enterprise Programming.
Relational Algebra Sample Questions.
Seminar #: 10 (Object Oriented Database Design) Advanced DB Technologies (CG096) 1 Seminar 10 : OODB Design Purpose To understand how an OODB is structured.
ITN MySQL Database Programming 1 Lecture 3 :Database Analysis and Design (I) ITN 170 MySQL Database Programming.
Chapter 11: Car Task Extension: Queries Importing CSV: Make sure currency is in Euros with two decimal places Using a suitable database package, import.
Using SET Operators Fresher Learning Program January, 2012.
* Database is a group of related objects * Objects can be Tables, Forms, Queries or Reports * All data reside in Tables * A Row in a Table is a record.
Seminar #: 10a (Object Oriented Database Design) Advanced Databases (CM036) 1 Seminar 10a : OODB Design Purpose This seminar is the continuation of seminar.
Howard Paul. Sequential Access Index Files and Data File Random Access.
Lab 1 Writing Interactive Queries CISB514 Advanced Database Systems.
Seminar #6 CG096 Advanced Database Technologies1 Advanced Databases Seminar 6: Implementing Relational Algebra Data Model using SQL.
Hoi Le. Why database? Spreadsheet is not good to: Store very large information Efficiently update data Use in multi-user mode Hoi Le2.
For more course tutorials visit CIS 336 All iLabs Week 1 to Week 7 Devry University CIS 336: All iLabs Week 1 to Week 7: Devry University.
DATA SCIENCE MIS0855 | Spring 2016 Designing Data
DEVRY CIS 336 W EEK 7 G ROUP P ROJECT T ASK 5 Check this A+ tutorial guideline at
CIS 336 Slingshot Academy / cis336.com
CIS 336 AID Your Dreams Our Mission/cis336aid.com
© The McGraw-Hill Companies, All Rights Reserved APPENDIX C DESIGNING DATABASES APPENDIX C DESIGNING DATABASES.
Seminar 10 : OODB Design (Self-Study)
Seminar 6 : OODB Schema in ODL
Database EER.
Using the Set Operators
Payroll Management System
Seminar 4: Demonstrating Object and Nested Relational Databases using Oracle Purpose The purpose of this seminar is to present how object-relational and.
ER Modeling Case Studies
CIS 336 str Competitive Success/snaptutorial.com
CIS 336 str Education for Service- -snaptutorial.com.
CIS 336 STUDY Lessons in Excellence-- cis336study.com.
CIS 336 str Teaching Effectively-- snaptutorial.com.
Seminar 9: OODB Design (Self Study)
Using the Set Operators
ERD’s REVIEW DBS201.
Entity-Relationship Modeling "Extended"
Microsoft Applications
Relational Algebra Sample Questions.
Chengyu Sun California State University, Los Angeles
ER Modeling Case Studies
Using the Set Operators
B Table Descriptions and Data.
Entity-Relationship Modeling "Extended"
Entity-Relationship Modeling "Extended"
Presentation transcript:

Seminar #1 – Refreshing databases concepts and SQL CM036: Advanced Databases1 Seminar 1: Revisiting Databases and SQL Purpose To refresh basic concepts of databases. To refresh SQL. Scenario – Human Resources (HR) In the company's human resource records, each employee has a unique identification number, address, job identification number, salary, and manager. Some employees earn a commission in addition to their salary, which is also tracked. The company also tracks information about jobs within the organization. Each job has an identification number, job title, and a minimum and maximum salary range for the job. Some employees have been with the company for a long time and have held different jobs within the company. When an employee switches jobs, the company records the start date and end date of the former job, the job identification number, and the department. The sample company is regionally diverse, so it tracks the locations of not only its warehouses but also of its departments. Each of the company's employees is assigned to a department. Each department is identified by a unique department code and a short name. Each department is associated with one location. Each location has a full address that includes the street address, postal code, city, state or province, and country code. For each where it has facilities, the company records the country name, currency symbol, currency name and the region where the county resides geographically.

Seminar #1 – Refreshing databases concepts and SQL CM036: Advanced Databases2 HR Relational Schema Entity Relationship Diagram (ERD) Creating Schema Download the script file: oracle_script.sql.txt into U:\CM036\W1 from the Blackboard or eek1/ eek1/ Run the script at the SQL* Plus prompt

Seminar #1 – Refreshing databases concepts and SQL CM036: Advanced Databases3 Sample Table Descriptions

Seminar #1 – Refreshing databases concepts and SQL CM036: Advanced Databases4 Sample Table Descriptions …

Seminar #1 – Refreshing databases concepts and SQL CM036: Advanced Databases5 Tasks for the Seminar A. Discuss the following questions with the student next to you: 1. What is a database? 2. What are databases used for? 3. What is a relational database? 4. What are the basic elements of the relational data model? B. Write SQL queries using Oracle SQL* Plus to answer the following: 1. Show the structure of the DEPARTMENTS table. Select all data from the table. 2. Create a query to display the last name, job code, hire date, and employee number for each employee, with employee number appearing first. 3. Create a query to display unique job codes from the EMPLOYEES table. 4. Create a query to display the last name and salary of employees earning more than 12, Display the employee last name, job ID, and start date of employees hired between February 20, 1998, and May 1, Order the query in ascending order by start date. 6. Write a query to display the last name, department number, and department name for all employees. 7. Display the employee last name and department name for all employees who have an a (lowercase) in their last names.

Seminar #1 – Refreshing databases concepts and SQL CM036: Advanced Databases6 Tasks for the Seminar … 8. Display the employee last name and employee number along with their manager’s last name and manager number. Label the columns Employee, Emp#, Manager, and Mgr#, respectively. 9. Create a query that displays employee last names, department numbers, and all the employees who work in the same department as a given employee. Give each column an appropriate label. 10. Display the names and hire dates for all employees who were hired before their managers, along with their manager’s names and hire dates. Label the columns Employee, Emp Hired, Manager, and Mgr Hired, respectively.