Dr. Philip Cannata 1 Doug Tolbert Unisys Doug Tolbert has been involved with OMG since the early 1990s. He is.

Slides:



Advertisements
Similar presentations
Displaying Data from Multiple Tables. Objectives After completing this lesson, you should Be able to do the following: Write SELECT statements to accessWrite.
Advertisements

BACS 485—Database Management Advanced SQL Overview Advanced DDL, DML, and DCL Commands.
12-1 Copyright  Oracle Corporation, All rights reserved. What Is a View? EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
Restricting and sorting data 16 May May May Created By Pantharee Sawasdimongkol.
Bogdan Shishedjiev SQL1 SQL Reminder of SQL. Bogdan Shishedjiev SQL 2 Subsets of language Data definition language (DDL) –Domain definition –Schema definition.
1Eyad Alshareef Enhanced Guide to Oracle 10g Chapter 3: Using SQL Queries to Insert, Update, Delete, and View Data.
Copyright  Oracle Corporation, All rights reserved. 2 Restricting and Sorting Data.
After completing this lesson, you should be able to do the following: Limit the rows retrieved by a query Sort the rows retrieved by a query.
Session 3: SQL (B): Parts 3 & 4 Original materials supplied by the Oracle Academic Initiative (OAI). Edited for classroom use by Professor Laku Chidambaram.
OO - Lecture 4 Tutorial Review Associations Inheritance of Functions Polymorphism.
Logical Operators Operator AND OR NOT Meaning Returns TRUE if both component conditions are TRUE Returns TRUE if either component condition is TRUE Returns.
Copyright  Oracle Corporation, All rights reserved. Introduction.
o At the end of this lesson, you will be able to:  Describe the life-cycle development phases  Discuss the theoretical and physical aspects of a relational.
Copyright  Oracle Corporation, All rights reserved. I Introduction.
Copyright  Oracle Corporation, All rights reserved. 1 Writing Basic SQL Statements.
4-1 Copyright  Oracle Corporation, All rights reserved. Displaying Data from Multiple Tables.
Dr. Philip Cannata 1 Programming Languages Prolog Part 3 SQL & Prolog.
Lecture 8 Database Theory & Practice (2) : The Relational Data Model UFCEKG-20-2 Data, Schemas & Applications.
1 Theory, Practice & Methodology of Relational Database Design and Programming Copyright © Ellis Cohen Introduction to Relational Databases &
MSc IT UFIE8K-15-M Data Management Prakash Chatterjee Room 3P16
1 Theory, Practice & Methodology of Relational Database Design and Programming Copyright © Ellis Cohen Cursors These slides are licensed under.
Subqueries.
2 Writing Basic SELECT Statements. 1-2 Copyright  Oracle Corporation, All rights reserved. Capabilities of SQL SELECT Statements Selection Projection.
Copyright  Oracle Corporation, All rights reserved. Writing Basic SQL Statements.
Copyright س Oracle Corporation, All rights reserved. I Introduction.
Copyright  Oracle Corporation, All rights reserved. 2 Restricting and Sorting Data.
RELATSIOONILISED ANDMEBAASID(alg) SQLi VÕIMALUSED.
7 Multiple-Column Subqueries. 7-2 Objectives At the end of this lesson, you should be able to: Write a multiple-column subquery Describe and explain the.
SQL- DQL (Oracle Version). 2 SELECT Statement Syntax SELECT [DISTINCT] column_list FROM table_list [WHERE conditional expression] [GROUP BY column_list]
Session 2: SQL (A): Parts 1 and 2 Original materials supplied by the Oracle Academic Initiative (OAI). Edited for classroom use by Professor Laku Chidambaram.
8 Producing Readable Output with SQL*Plus. 8-2 Objectives At the end of this lesson, you should be able to: Produce queries that require an input variable.
Dr. Philip Cannata 1 mgr Semantic Data Management.
4 Displaying Data from Multiple Tables Important Legal Notice:  Materials on this lecture are from a book titled “Oracle Education” by Kochhar, Gravina,
Copyright س Oracle Corporation, All rights reserved. 4 Displaying Data from Multiple Tables.
1 Writing Basic SQL Statements. 1-2 Objectives At the end of this lesson, you should be able to: List the capabilities of SQL SELECT statements Execute.
I-1 Copyright س Oracle Corporation, All rights reserved. Data Retrieval.
SQL: Part 2 Original materials supplied by the Oracle Academic Initiative (OAI). Edited for classroom use by Professor Laku Chidambaram. Not for commercial.
Copyright  Oracle Corporation, All rights reserved. 12 Creating Views.
Copyright  Oracle Corporation, All rights reserved. 8 Producing Readable Output with SQL*Plus.
An Introduction To SQL Part 2 (Special thanks to Geoff Leese)
1 Information Retrieval and Use (IRU) An Introduction To SQL Part 2.
Dr. Philip Cannata 1 Programming Languages Chapter 19 - Continuations.
CS345 Project Presentation Language: H-- Mikhail Iakhiaev.
Copyright س Oracle Corporation, All rights reserved. I Introduction.
1 Theory, Practice & Methodology of Relational Database Design and Programming Copyright © Ellis Cohen Relational State Assertions These slides.
Dr. Philip Cannata 1 Programming Languages Haskell.
Dr. Philip Cannata 1 RDF. Dr. Philip Cannata 2 10 Java (Object Oriented) ASP RDF (Horn Clause Deduction, Semantic Web) Relation Jython in Java This Course.
1 Theory, Practice & Methodology of Relational Database Design and Programming Copyright © Ellis Cohen Collection Operators These slides are.
Oracle CONNECT BY function JAVA WEB Programming. Emp 테이블의 내용 ( 상 / 하급자 계층구조 ) SQL> select * from emp; EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
2-1 Limiting Rows Using a Selection “…retrieve all employees in department 10” EMP EMPNO ENAME JOB... DEPTNO 7839KINGPRESIDENT BLAKEMANAGER CLARKMANAGER.
Copyright س Oracle Corporation, All rights reserved. 12 Creating Views.
Copyright  Oracle Corporation, All rights reserved. 2 Restricting and Sorting Data.
Writing Basic SQL Statements. Objectives After completing this lesson, you should be able to do the following: –List the capabilities of SQL SELECT statements.
Copyright  Oracle Corporation, All rights reserved. 4 Displaying Data from Multiple Tables.
Copyright  Oracle Corporation, All rights reserved. Introduction.
Displaying Data from Multiple Tables. Objectives After completing this lesson, you should be able to do the following: –Write SELECT statements to access.
4 Displaying Data from Multiple Tables. 4-2 Objectives At the end of this lesson, you should be able to: Write SELECT statements to access data from more.
Copyright س Oracle Corporation, All rights reserved. 1 Writing Basic SQL Statements.
Communicating with a RDBMS Using SQL Database SQL> SELECT loc 2 FROM dept; SQL> SELECT loc 2 FROM dept; SQL statement is entered Statement is sent to database.
Relational Normalization Theory
Subqueries.
Manipulating Data Schedule: Timing Topic 40 minutes Lecture
What Is a View? EMPNO ENAME JOB EMP Table EMPVU10 View
Lecture 16 : The Relational Data Model
Restricting and Sorting Data
Lecture 16 : The Relational Data Model
Copyright © Ellis Cohen
Presentation transcript:

Dr. Philip Cannata 1 Doug Tolbert Unisys Doug Tolbert has been involved with OMG since the early 1990s. He is a member of the Board of Directors and currently holds a Platform seat on the Architecture Board. Doug was a principal member of the team that developed CWM, and he has made contributions to many OMG platform (UML, MOF, XMI, IMM, SOA, Alf, and ADTF) and domain (Finance, Life Science, Insurance) over the years. He is currently active on the UML Simplification and IMM submission teams. On the AB, Doug works to ensure that OMG specifications are clear and understandable in both their human- and machine-readable forms.

Dr. Philip Cannata 2 mgr SIM - Semantic Data Management

Dr. Philip Cannata 3 CLASS person ( ss_num: INTEGER, REQUIRED; name: STRING; ); SUBCLASS emp OF person ( job : STRING; mgr : emp, SV, INVERSE IS employees; sal : INTEGER; comm : INTEGER; dept : dept, SV, INVERSE IS employees; ); CLASS dept ( deptno : INTEGER, REQUIRED; dname : STRING; loc : STRING; employees : emp, MV, INVERSE IS dept; ); mgr SIM - Semantic Data Management

Dr. Philip Cannata 4 CLASS person ( ss_num: INTEGER, REQUIRED; name: STRING; ); SUBCLASS emp "Employees of a company" OF person ( job : STRING; mgr : emp, SV, INVERSE IS employees; employees : emp, MV, INVERSE IS mgr; sal : INTEGER; comm : INTEGER; dept : department, SV, INVERSE IS employees; ); INSERT emp ( ss_num:= 7369, name := "SMITH", job := "CLERK", sal := 800 ); INSERT emp ( ss_num:= 7499, name := "ALLEN", job := "SALESMAN", sal := 1600, comm := 300 ); INSERT emp ( ss_num:= 7521, name := "WARD", job := "SALESMAN", sal := 1250, comm := 500 ); INSERT emp ( ss_num:= 7566, name := "JONES", job := "MANAGER", sal := 2975 ); INSERT emp ( ss_num:= 7654, name := "MARTIN", job := "SALESMAN", sal := 1250, comm := 1400 ); INSERT emp ( ss_num:= 7698, name := "BLAKE", job := "MANAGER", sal := 2850 ); INSERT emp ( ss_num:= 7782, name := "CLARK", job := "MANAGER", sal := 2450 ); INSERT emp ( ss_num:= 7788, name := "SCOTT", job := "ANALYST", sal := 3000 ); INSERT emp ( ss_num:= 7839, name := "KING", job := "PRESIDENT", sal := 5000 ); INSERT emp ( ss_num:= 7844, name := "TURNER", job := "SALESMAN", sal := 1500 ); INSERT emp ( ss_num:= 7876, name := "ADAMS", job := "CLERK", sal := 1100 ); INSERT emp ( ss_num:= 7900, name := "JAMES", job := "CLERK", sal := 950 ); INSERT emp ( ss_num:= 7902, name := "FORD", job := "ANALYST", sal := 3000 ); INSERT emp ( ss_num:= 7934, name := "MILLER", job := "CLERK", sal := 1300 );

Dr. Philip Cannata 5 CLASS department "Departments of a company" ( deptno : INTEGER, REQUIRED; dname : STRING; loc : STRING; employees : emp, MV, INVERSE IS dept; ); INSERT department ( deptno := 10, dname := "ACCOUNTING", loc := "NEW YORK" ); INSERT department ( deptno := 20, dname := "RESEARCH", loc := "DALLAS" ); INSERT department ( deptno := 30, dname := "SALES", loc := "CHICAGO" ); INSERT department ( deptno := 40, dname := "OPERATIONS", loc := "BOSTON" );

Dr. Philip Cannata 6 MODIFY emp ( dept := department WITH (deptno = 20) ) WHERE ss_num = 7369 ; MODIFY emp ( dept := department WITH (deptno = 30) ) WHERE ss_num = 7499 ; MODIFY emp ( dept := department WITH (deptno = 30) ) WHERE ss_num = 7521 ; MODIFY emp ( dept := department WITH (deptno = 20) ) WHERE ss_num = 7566 ; MODIFY emp ( dept := department WITH (deptno = 30) ) WHERE ss_num = 7654 ; MODIFY emp ( dept := department WITH (deptno = 30) ) WHERE ss_num = 7698 ; MODIFY emp ( dept := department WITH (deptno = 10) ) WHERE ss_num = 7782 ; MODIFY emp ( dept := department WITH (deptno = 20) ) WHERE ss_num = 7788 ; MODIFY emp ( dept := department WITH (deptno = 10) ) WHERE ss_num = 7839 ; MODIFY emp ( dept := department WITH (deptno = 30) ) WHERE ss_num = 7844 ; MODIFY emp ( dept := department WITH (deptno = 20) ) WHERE ss_num = 7876 ; MODIFY emp ( dept := department WITH (deptno = 30) ) WHERE ss_num = 7900 ; MODIFY emp ( dept := department WITH (deptno = 20) ) WHERE ss_num = 7902 ; MODIFY emp ( dept := department WITH (deptno = 10) ) WHERE ss_num = 7934 ; MODIFY emp ( mgr := emp WITH (ss_num = 7902) ) WHERE ss_num = 7369 ; MODIFY emp ( mgr := emp WITH (ss_num = 7698) ) WHERE ss_num = 7499 ; MODIFY emp ( mgr := emp WITH (ss_num = 7698) ) WHERE ss_num = 7521 ; MODIFY emp ( mgr := emp WITH (ss_num = 7839) ) WHERE ss_num = 7566 ; MODIFY emp ( mgr := emp WITH (ss_num = 7698) ) WHERE ss_num = 7654 ; MODIFY emp ( mgr := emp WITH (ss_num = 7839) ) WHERE ss_num = 7698 ; MODIFY emp ( mgr := emp WITH (ss_num = 7839) ) WHERE ss_num = 7782 ; MODIFY emp ( mgr := emp WITH (ss_num = 7566) ) WHERE ss_num = 7788 ; MODIFY emp ( mgr := emp WITH (ss_num = 7698) ) WHERE ss_num = 7844 ; MODIFY emp ( mgr := emp WITH (ss_num = 7788) ) WHERE ss_num = 7876 ; MODIFY emp ( mgr := emp WITH (ss_num = 7698) ) WHERE ss_num = 7900 ; MODIFY emp ( mgr := emp WITH (ss_num = 7566) ) WHERE ss_num = 7902 ; MODIFY emp ( mgr := emp WITH (ss_num = 7782) ) WHERE ss_num = 7934 ;

Dr. Philip Cannata 7 cd /cygdrive/c/Documents and Settings/Nicolette Cannata/My Documents/pcannata/UT/07 Fall 327e/07 Fall e327/07 Fall e327/Class Notes/20 SIM DB/WDB $ java -cp "lib\je.jar;." wdb.WDB WDB Simantic Database Project Copyright 2006 University of Texas at Austin DB Name: test DB Path:./ WDB> source "scott-tiger-Enhanced.txt"; WDB>

Dr. Philip Cannata 8 WDB> from person retrieve * where true; WDB> from emp retrieve * where true;

Dr. Philip Cannata 9 WDB> from emp retrieve * where true; WDB> from department retrieve * where true; WDB> from emp retrieve *, * of dept where true;

Dr. Philip Cannata 10 WDB> from emp retrieve ss_num, name, dname of dept, name of mgr, dname of dept of mgr where true ;