Seminar #6 CG096 Advanced Database Technologies1 Advanced Databases Seminar 6: Implementing Relational Algebra Data Model using SQL.

Slides:



Advertisements
Similar presentations
Classroom Bill of Rights
Advertisements

Reagan/Clinton Compare/Contrast Essay. I. Reagan and Clinton both argue... but... A.Reagan argues B.Clinton argues.
Copyright © 2004 Pearson Education, Inc.. Chapter 9 More SQL: Assertions, Views, and Programming Techniques.
Chapter 15 Algorithms for Query Processing and Optimization Copyright © 2004 Pearson Education, Inc.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2001 Chapter 21 Networking and Internetworking Devices.
SQL Subqueries Objectives of the Lecture : To consider the general nature of subqueries. To consider simple versus correlated subqueries. To consider the.
Copyright © 2011 Accenture All Rights Reserved. Accenture, its logo, and High Performance Delivered are trademarks of Accenture. SQL Workshop Day 4.
Employee database: Conceptual Schema in ERD Chapter 3, page 62.
Universal Data Collection (UDC) Mapping Project
I.1 ii.2 iii.3 iv.4 1+1=. i.1 ii.2 iii.3 iv.4 1+1=
Jyh-haw Yeh Dept. of Computer Science Boise State University
I.1 ii.2 iii.3 iv.4 1+1=. i.1 ii.2 iii.3 iv.4 1+1=

INTERNATIONAL SALES LAW - seminar 2004 ISL Contractual Risk Management in Transnational Sales Transactions ISL: objectives, functions and structure Management.
Using T-sql scripts. Migrating Sql Database to SQL Azure Database Create the Test Database In SQL Server Management Studio, on the File menu, point to.
Seminar #1 – Refreshing databases concepts and SQL CM036: Advanced Databases1 Seminar 1: Revisiting Databases and SQL Purpose To refresh basic concepts.
Roman Numerals. The Numbers I-1 II-2 III-3 IV-4 V-5 VI-6 VII-7 VIII-8 IX-9 X-10 C-100 D-500 M-1000.
Seminar #3 CM036: Advanced Databases1 Seminar 4: Relational Algebra and its Simulation using SQL Purpose To understand how the relational operations are.
CST203-2 Database Management Systems Lecture 2. One Tier Architecture Eg: In this scenario, a workgroup database is stored in a shared location on a single.
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.
ABC Insurance Co. Paul Barry Steve Randolph Jing Zhou CSC8490 Database Systems & File Management Dr. Goelman Villanova University August 2, 2004.
1 ORACLE Data Mining  Included with ORACLE 10g  Freely available for UVic and for personal unlimited evaluation use. Choose the enterprise version!
Chapter 2: SQL – The Basics Objectives: 1.The SQL execution environment 2.SELECT statement 3.SQL Developer & SQL*Plus.
Database control Introduction. The Database control is a tool that used by the database administrator to control the database. To enter to Database control.
Mathematics Relations and Functions: Factoring Polynomials Science and Mathematics Education Research Group Supported by UBC Teaching and Learning Enhancement.
Oracle & SQL Introduction. Database Concepts Revision DB? DBMS? DB Application? Application Programs? DBS? Examples of DBS? Examples of DBMS? 2Oracle.
Stored Procedures. Definition a stored procedure is a set of Structured Query Language (SQL) statements with an assigned name that's stored in the database.
Why we need CER Certificate ? While using the Services on llp.gov.in, the user has to register as a Business User for using the e – Filing Services. The.
Seminar 10: OODB Design (Self-Study)
TITLES OF THE HOLY SPIRIT TEXT: Ephesians 1:13,14.
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.
Preface IIntroduction Objectives I-2 Course Overview I-3 1Oracle Application Development Framework Objectives 1-2 J2EE Platform 1-3 Benefits of the J2EE.
An outline is useful to organize your information You put this information in categories You use various symbols to organize your information For main.
1 Copyright © Oracle Corporation, All rights reserved. Writing Basic SQL SELECT Statements.
Learning Objectives Entrepreneurship 05/23/13  Executive Summary to Appendix should be complied in one document. Include page numbers.  Each Section.
Seminar #: 10a (Object Oriented Database Design) Advanced Databases (CM036) 1 Seminar 10a : OODB Design Purpose This seminar is the continuation of seminar.
Learning Objectives Entrepreneurship 05/17/13  Today WE will:  Do a quick lesson on formatting documents.  Today YOU will:  Compile your business plan.
Jennifer Widom Relational Databases The Relational Model.
11 Copyright © 2004, Oracle. All rights reserved. Performing a Migration Using Oracle Migration Workbench (Part II)
Secretariat of Commerce and Services National Department of Business Registry.
ПОРТФОЛИО профессиональной деятельности Белово 2015 Таюшовой Натальи Борисовны Преподавателя дисциплин «Химия», «Биология»
1 Copyright © 2004, Oracle. All rights reserved. Retrieving Data Using the SQL SELECT Statement.
NL: reading Roman numerals 1-12.
Controlling User Access
Basic select statement
1Z0-071 Exam : Oracle Database 12c SQL
Seminar 10 : OODB Design (Self-Study)
Seminar 6 : OODB Schema in ODL
SQL-lab Download sql script file sailors.txt
Seminar 4: Demonstrating Object and Nested Relational Databases using Oracle Purpose The purpose of this seminar is to present how object-relational and.
Seminar 9: OODB Design (Self Study)
David M. Kroenke and David J
Flow diagrams (i) (ii) (iii) x – Example
Relational Databases The Relational Model.
Relational Databases The Relational Model.
3. Old Brain I III II V IV VII VI VIII IX X XII XI
ОПШТИНА КУРШУМЛИЈА.
Tweet summary of article I
Relational Algebra Sample Questions.
الأَوزانُ Verb Forms Happy Land for Islamic Teachings.
Index Notation Sunday, 24 February 2019.
УВС АЙМГИЙН НИЙГЭМ ЭДИЙН
GLANDS OF THE ENDOCRINE SYSTEM
CPSC-608 Database Systems
SQLPLUS: Oracle SQL Interface
B Table Descriptions and Data.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2001 Chapter 21 Networking and Internetworking Devices.
8 Core Steps of success: I.Step:1 : DREAM SETTING: II. Step: 2 : LIST MAKING : IV. Step: 4 : SHOW THE PLAN: III. Step: 3 : INVITATION: V. Step: 5 : FOLLOW.
Practice Project Practice to know SQL
Presentation transcript:

Seminar #6 CG096 Advanced Database Technologies1 Advanced Databases Seminar 6: Implementing Relational Algebra Data Model using SQL

Seminar #6 CG096 Advanced Database Technologies2 Purpose To understand how the relational operations are implemented in SQL To investigate relational databases using queries which can be expressed as algebraic operations To compare the actual output produced by an SQL interpreter from a database with the result of applying operations to its relational model

Seminar #6 CG096 Advanced Database Technologies3 Scenario The Company database contains data about the departments with their employees, as well as for the department projects with the employees working on them. The set of relations in the Company relational schema is provided on the Figure 1. Data for one particular instance of database Company is provided on Figure 2. The SQL script for creating of relational database with the above test data preloaded is provided in the file Company.sql which you can download from Blackboard.

Seminar #6 CG096 Advanced Database Technologies4 Company Relational Schema DEPT: stores data about company departments, including their managers EMP: stores data about people working in the company PROJ: stores data about the projects on which the company currently works ALLOC: stores data about the people allocated to different projects Figure 1

Seminar #6 CG096 Advanced Database Technologies5 Database Schema Instance Figure 2

Seminar #6 CG096 Advanced Database Technologies6 Tasks for the Seminar 1. Write the following queries against Company database using both relational algebra operators and SQL i. Get a list of employee numbers ii. Get details of employees with salaries in excess of 15,000 pounds iii. Get a list of departments which have projects or employees iv. Get a list of departments which have both projects and employees v. Get a list of departments that have projects but no employees are working on them vi. Get information on all possible combinations of employees and departments vii. Find information on those employees and their departments who are working for them but are not their managers viii. Find information about employees who are currently working on projects ix. Find information about the projects of the departments x. Part (ix) including registered projects which are not assigned to any department xi. Part (x) including departments without registered projects

Seminar #6 CG096 Advanced Database Technologies7 2. Connect to the Oracle database using SQL*Plus, load the Company database contained in the file Company.sql and execute the SQL scripts you have written against it Connect to the Oracle database using SQL*Plus Load the Company database Execute the queries Execute your own queries in SQL which implement exactly the same algebra queries as the ones written in the algebra before Compare the results Why the results received as an output of SQL interpreter with the expected results in the case of applying algebraic operations on the relational schema differ (if they really differ)?