A framework to distil SQL queries out of host languages in order to apply quality metrics
|
|
- Sherman Beasley
- 5 years ago
- Views:
Transcription
1 Master s Thesis defence A framework to distil SQL queries out of host languages in order to apply quality metrics Department of Information and Computing Sciences Universiteit Utrecht January 11, 2007
2 Master s Thesis defence Outline 1 Introduction 2 Query extraction and reconstruction 3 Detecting relationships among queries, host language and database 4 Software quality metrics 5 Case study 6 Conclusion
3 Master s Thesis defence > Introduction Introduction Software Improvement Group Automatic program analysis 1 Software Risk Assessment 2 Software Monitoring (software change management) 3 Documentation Generation
4 Master s Thesis defence > Introduction Problem description Observations 1 Dynamically constructed SQL queries 2 Unstructured use of the Structured Query Language 3 Untyped use of SQL references 4 Softly mapped on database scheme 5 Decreased maintainability 6 Adapting queries imposes risk
5 Master s Thesis defence > Introduction Problem description Observations 1 Dynamically constructed SQL queries 2 Unstructured use of the Structured Query Language 3 Untyped use of SQL references 4 Softly mapped on database scheme 5 Decreased maintainability 6 Adapting queries imposes risk SQL queries are regarded as easy
6 Master s Thesis defence > Introduction Opportunities for improvement Gaining insight 1 Extract and reconstruct dynamically constructed queries 2 Analysing relations between data, queries and host language 3 Measure quality and complexity
7 Master s Thesis defence > Introduction Opportunities for improvement Gaining insight 1 Extract and reconstruct dynamically constructed queries 2 Analysing relations between data, queries and host language 3 Measure quality and complexity Initial situation 1 No insight in quantities of embedded queries 2 No indication of structural complexity 3 No indication of interaction with host language 4 Means to tokenize and or parse several languages 5 Means to parse several SQL dialects
8 Master s Thesis defence > Query extraction and reconstruction Extract SQL queries out of host languages The objective is to obtain all embedded queries SQL embedded as a language construct 1 COBOL 2 PL/SQL Host languages using strings to construct queries 1 Visual Basic 6 2 Java
9 Master s Thesis defence > Query extraction and reconstruction Extract SQL queries out of host languages Objective For queries composed by the means of string concatenation 1 Collect strings 2 Inspect the strings 3 Reconstruct the queries
10 Master s Thesis defence > Query extraction and reconstruction Collecting queries Detecting query start positions Concerning data SELECT INSERT UPDATE DELETE Concerning structure CREATE ALTER DROP
11 Master s Thesis defence > Query extraction and reconstruction Reconstructing queries by string literal analysis Different languages all use same mechanisms to construct strings Language specifics String concatenation a + b a b a & b String assignment How is the query assigned to a variable String composition + =. = & = String.Concat( a, b )
12 Master s Thesis defence > Query extraction and reconstruction Reconstructing queries by string literal analysis 1 SELECT x FROM y WHERE z 2 strquery = " SELECT "; 3 strquery = strquery & " x " 4 strquery &= " FROM y " 5 strquery = String. Concat ( strquery, " WHERE z "); 6 7 strquery = " SELECT a FROM b WHERE a IN ( " & strquery & " ) "
13 Master s Thesis defence > Query extraction and reconstruction Reconstructing queries by string literal analysis 1 SELECT x FROM y WHERE z 2 strquery = " SELECT "; 3 strquery = strquery & " x " 4 strquery &= " FROM y " 5 strquery = String. Concat ( strquery, " WHERE z "); 6 7 strquery = " SELECT a FROM b WHERE a IN ( " & strquery & " ) " 1 SELECT a FROM b WHERE a IN 2 ( 3 SELECT x FROM y WHERE z 4 )
14 Master s Thesis defence > Query extraction and reconstruction Collecting variables Mechanisms used to expand the query string Primitive types Variables Function calls
15 Master s Thesis defence > Query extraction and reconstruction Collecting variables Mechanisms used to expand the query string Primitive types Variables Function calls Anonymous parameters 1 Frameworks may be involved 2 Function call perform(query, param) 3 Match provided variables with number of question marks 1 strsql = " SELECT a FROM?" 2 Database. Get ( strsql, varname, Null )
16 Master s Thesis defence > Query extraction and reconstruction Collecting variables Variables in PL/SQL 1 No string concatenation present 2 Grammar includes the Structured Query Language 3 Collecting variables used in PL/SQL queries not straightforward 4 Variables indistinguishable from tables and columns
17 Master s Thesis defence > Query extraction and reconstruction Collecting variables Variables in PL/SQL 1 No string concatenation present 2 Grammar includes the Structured Query Language 3 Collecting variables used in PL/SQL queries not straightforward 4 Variables indistinguishable from tables and columns 1 PROCEDURE ins ( df$rec IN OUT df$row_type ) IS 2 BEGIN 3 SELECT MH_NV_ID 4 FROM MH_MT 5 WHERE ID = df$rec. ID ; 6 END ins ; Shadowing mechanism Column reference Variable Table reference
18 Master s Thesis defence > Query extraction and reconstruction Collecting variables Variables in PL/SQL 1 No string concatenation present 2 Grammar includes the Structured Query Language 3 Collecting variables used in PL/SQL queries not straightforward 4 Variables indistinguishable from tables and columns 1 PROCEDURE ins ( df$rec IN OUT df$row_type ) IS 2 BEGIN 3 SELECT MH_NV_ID 4 FROM MH_MT 5 WHERE ID = df$rec. ID ; 6 END ins ; Shadowing mechanism Column reference Variable Table reference Without database scheme no shadowing is assumed
19 Master s Thesis defence > Query extraction and reconstruction Collecting result variables Result variables 1 Applies only when SELECT queries are involved SELECT INTO Cursor ResultSet or RecordSet 1 EXEC SQL 2 SELECT 3 CINFCSTN, 4 CINFFXTR 5 INTO 6 : CINFCSTN, 7 : CINFFXTR 8 FROM IABSTJNF 9 WHERE CINFCSTN = END-EXEC.
20 Master s Thesis defence > Detecting relationships among queries, host language and database Relations among queries, host language and database Now queries are collected, detect relations with respect to queries, host language and database
21 Master s Thesis defence > Detecting relationships among queries, host language and database Operations performed on tables Context sensitive CRUD table 1 Visualises the tables used by a query 2 Visualises the operation type performed 1 INSERT INTO Banned ( uid, username ) 2 SELECT id, name 3 FROM User 4 WHERE id =?; 1 SELECT age 2 FROM User 3 WHERE gender =?; Create Read Update Delete Banned {Q1} User {Q1, Q2}
22 Master s Thesis defence > Detecting relationships among queries, host language and database Relations among data in a database Indicate relations among data in a database Find related columns Detect specified join constructs 1 SELECT Permission. rwx 2 FROM Groups, Permission, User 3 WHERE Permission. gid = Groups. id 4 AND User. uid = Groups. user 5 AND User. name =?
23 Master s Thesis defence > Detecting relationships among queries, host language and database Relations among data in a database Indicate relations among data in a database Find related columns Detect specified join constructs 1 SELECT Permission. rwx 2 FROM Groups, Permission, User 3 WHERE Permission. gid = Groups. id 4 AND User. uid = Groups. user 5 AND User. name =? Approach 1 Table.column = Table.column join 2 Table and column information explicitly supplied 3 Or database scheme present
24 Master s Thesis defence > Detecting relationships among queries, host language and database Relations among data in a database Limitations 1 Regards Grous.user = Groups.user as join 2 Regards A.x = B.y OR A.x = B.y as 2 joins 3 Does not know if the subset actually is used to produce the query result
25 Master s Thesis defence > Detecting relationships among queries, host language and database Relations among data in a database Limitations 1 Regards Grous.user = Groups.user as join 2 Regards A.x = B.y OR A.x = B.y as 2 joins 3 Does not know if the subset actually is used to produce the query result 1 SELECT Permission. rwx 2 FROM Permission, User, Groups 3 WHERE Permission. type = -1 4 OR User. uid = Groups. user 5 AND User. loginname =?; A join is present, but not with regard to the query result
26 Master s Thesis defence > Detecting relationships among queries, host language and database Relations among data in a database Limitations 1 Regards Grous.user = Groups.user as join 2 Regards A.x = B.y OR A.x = B.y as 2 joins 3 Does not know if the subset actually is used to produce the query result 1 SELECT Permission. rwx 2 FROM Permission, User, Groups 3 WHERE Permission. type = -1 4 OR User. uid = Groups. user 5 AND User. loginname =?; A join is present, but not with regard to the query result More accurate and extensive solution provided in my thesis paper
27 Master s Thesis defence > Detecting relationships among queries, host language and database Relations established by control flow Observing query results 1 Query results in IF statements may create dependency 2 Query results in (inner) loop conditions
28 Master s Thesis defence > Detecting relationships among queries, host language and database Relations established by control flow Observing query results 1 Query results in IF statements may create dependency 2 Query results in (inner) loop conditions 1 SELECT MH_MN_SEQ. nextval 2 INTO df$rec. ID 3 FROM DUAL ; 4 5 IF df$rec. ID IS NULL THEN 6 BEGIN 7 SELECT MH_MT_HUIZ. JND_GOE 8 INTO df$jnd. ID 9 FROM DUAL ; IF df$jnd. ID = FALSE THEN 12 df$jnd. ID := TRUE ; 13 END IF; 14 END ; 15 END IF;
29 Master s Thesis defence > Detecting relationships among queries, host language and database Query result may indicate inefficiency Decomposed queries 1 Queries depending on a direct query result may indicate time inefficient approach 2 DBMS optimised for filtering a subset 3 Combined queries however impose increased complexity 1 SELECT age 2 FROM User 3 WHERE name = Alice ; 1 SELECT name 2 FROM User 3 WHERE age =?;
30 Master s Thesis defence > Detecting relationships among queries, host language and database Query result may indicate inefficiency Decomposed queries 1 Queries depending on a direct query result may indicate time inefficient approach 2 DBMS optimised for filtering a subset 3 Combined queries however impose increased complexity 1 SELECT age 2 FROM User 3 WHERE name = Alice ; 1 SELECT name 2 FROM User 3 WHERE age =?; 1 SELECT name 2 FROM User 3 WHERE age in ( SELECT age 4 FROM User 5 WHERE name = Alice );
31 Master s Thesis defence > Detecting relationships among queries, host language and database Quality on handling related data Query results used by other queries 1 Dataflow from SELECT to INSERT 2 Dataflow from SELECT to DELETE Possible manually performed cascade delete Cascade delete normally defined in database scheme Cascade delete invisible in single query
32 Master s Thesis defence > Software quality metrics Measurements that matter Define measurements that indicate quality and complexity
33 Master s Thesis defence > Software quality metrics Measurements that matter Define measurements that indicate quality and complexity Motivation 1 Understandability reduces bugs 2 Complexity decreases testing quality 3 Simplicity benefits maintainability and adaptability
34 Master s Thesis defence > Software quality metrics Measurements that matter Define measurements that indicate quality and complexity Motivation 1 Understandability reduces bugs 2 Complexity decreases testing quality 3 Simplicity benefits maintainability and adaptability Complex parts are opportunities for improvement of the software quality and reliability
35 Master s Thesis defence > Software quality metrics Query occurrences Occurrence per file 1 Quantities 2 Expected in persistence layer, not in domain and GUI 3 Centralized handling of queries SEL INS UPD DEL CRE ALT DROP TCDMUY07.COB PJT PARAM.trg
36 Master s Thesis defence > Software quality metrics Parameters used by queries Number of result variables 1 SELECT INTO 2 Cursor Number of parameters 1 Amount of variables referenced 2 Amount of variable places in a query 1 WHERE User. gender = : gen 2 OR Groups. gender = : gen
37 Master s Thesis defence > Software quality metrics Parameters used by queries Context of the variable 1 WHERE clause 2 Select item 3 HAVING clause 4 GROUP BY clause 5 FROM clause Line WHERE Sel. HAV GROUP FROM mwxf pk.pks dump65.out
38 Master s Thesis defence > Software quality metrics Concerning query structure Equality among queries 1 Collect queries the most similar 2 Collect query parts used in many other queries
39 Master s Thesis defence > Software quality metrics Concerning query structure Equality among queries 1 Collect queries the most similar 2 Collect query parts used in many other queries Q1 Q2 Q3 Q Q Q Most similar queries Q1 with Q2 80 Q2 with Q3 40 Q1 with Q3 10 Similar query parts Q2 120 Q1 90 Q3 50
40 Master s Thesis defence > Software quality metrics Concerning query structure Amount of tables used 1 Count nr of tables used per query 2 Derived from CRUD table Dependant columns referenced in a query Count the nr of JOIN keywords used Collect and count the specified join constructs
41 Master s Thesis defence > Software quality metrics Measuring relations Composition of queries 1 Nr of inner queries 2 Level of nesting 3 Nr of UNION keywords per query Dependant queries Count the nr of depending queries SELECT - DELETE SELECT - INSERT Applies only when SELECT queries are involved
42 Master s Thesis defence > Software quality metrics Measurements Conclusion 1 Per measurement only focus at one aspect 2 Worst query easily identified per measurement 3 Indications to be verified by hand
43 Master s Thesis defence > Software quality metrics Measurements Conclusion 1 Per measurement only focus at one aspect 2 Worst query easily identified per measurement 3 Indications to be verified by hand Metrics reflecting quality 1 Amount of variables - quality SQL usage 2 Amount of tables and unions used - quality data model 3 Nesting level - complexity & testability 4 Equality and dependencies - maintainability
44 Master s Thesis defence > Case study Case study results Used commercial software systems 1 Visual Basic 6 source of a telecom company 2 PL/SQL source of a bank 3 PL/SQL source of an energy supplier 4 COBOL source of a bank
45 Master s Thesis defence > Case study Case study PL/SQL source of an energy supplier Query quantities amount SEL INS UPD DEL All dump dump dump
46 Master s Thesis defence > Case study Case study PL/SQL source of an energy supplier Query quantities amount SEL INS UPD DEL file line Allres vars 5475 vars3427 nest787union 912tbls245 eq deps dump444 dump % 0 dump359 dump % 0 dump249 dump % 0 dump % 0 dump % 0 dump % 37 One variable selected column encountered
47 Master s Thesis defence > Case study Case study PL/SQL source of an energy supplier Query quantities amount SEL INS UPD DEL All dump dump dump All dump dump222 6 dump208 15
48 Master s Thesis defence > Case study Case study COBOL source of a bank Query quantities amount SEL INS UPD DEL All x.cob y.cob z.cob
49 Master s Thesis defence > Case study Case study COBOL source of a bank Query quantities Query quality amount SEL INS UPD DEL All x.cob y.cob z.cob file line res vars vars nesting union tables equality x.cob % x.cob % x.cob % w.cob %
50 Master s Thesis defence > Conclusion Conclusion The results of the measurements do reflect the situation as present in the software Characteristics 1 Undesirable situations are detected 2 Not all indications are truly undesirable 3 Detecting, but not preventing bad situations 4 Not detecting poor strategy of database access
51 Master s Thesis defence > Conclusion Conclusion The results of the measurements do reflect the situation as present in the software Characteristics 1 Undesirable situations are detected 2 Not all indications are truly undesirable 3 Detecting, but not preventing bad situations 4 Not detecting poor strategy of database access Future work 1 Analyses of the supported programming languages immature 2 Improve data flow analysis 3 Expand interprocedural analysis
52 Master s Thesis defence > Conclusion Conclusion Conclusion 1 Facilitates means to focus on certain aspects 2 Highly language independent 3 Framework independent 4 Source is allowed to be incomplete 5 Database scheme may be omitted 6 A flexible effective approach has been achieved 7 Under-investigated research area 8 The topic of SQL metrics does matter
53 Master s Thesis defence > Conclusion Thank you for your attention
Quality metrics for SQL queries embedded in host languages
Quality metrics for SQL queries embedded in host languages Huib J. van den Brink Institute of Information and Computing Sciences Utrecht University hjbrink@cs.uu.nl Rob C. van der Leek Software Improvement
More informationOracle Database 11g: SQL and PL/SQL Fundamentals
Oracle University Contact Us: +33 (0) 1 57 60 20 81 Oracle Database 11g: SQL and PL/SQL Fundamentals Duration: 5 Days What you will learn In this course, students learn the fundamentals of SQL and PL/SQL
More informationOracle Database 10g: Introduction to SQL
ORACLE UNIVERSITY CONTACT US: 00 9714 390 9000 Oracle Database 10g: Introduction to SQL Duration: 5 Days What you will learn This course offers students an introduction to Oracle Database 10g database
More informationOracle Database 11g: SQL Tuning Workshop
Oracle University Contact Us: Local: 0845 777 7 711 Intl: +44 845 777 7 711 Oracle Database 11g: SQL Tuning Workshop Duration: 3 Days What you will learn This Oracle Database 11g: SQL Tuning Workshop Release
More informationOracle Database: SQL and PL/SQL Fundamentals NEW
Oracle Database: SQL and PL/SQL Fundamentals NEW Duration: 5 Days What you will learn This Oracle Database: SQL and PL/SQL Fundamentals training delivers the fundamentals of SQL and PL/SQL along with the
More informationDatabase Management
Database Management - 2013 Model Answers 1. a. A cyclic relationship type (also called recursive) is a relationship type between two occurrences of the same entity type. With each entity type in a cyclic
More informationOracle Database: SQL and PL/SQL Fundamentals Ed 2
Oracle University Contact Us: Local: 1800 103 4775 Intl: +91 80 67863102 Oracle Database: SQL and PL/SQL Fundamentals Ed 2 Duration: 5 Days What you will learn This Oracle Database: SQL and PL/SQL Fundamentals
More information1 Prepared By Heena Patel (Asst. Prof)
Topic 1 1. What is difference between Physical and logical data 3 independence? 2. Define the term RDBMS. List out codd s law. Explain any three in detail. ( times) 3. What is RDBMS? Explain any tow Codd
More informationTable of Contents. PDF created with FinePrint pdffactory Pro trial version
Table of Contents Course Description The SQL Course covers relational database principles and Oracle concepts, writing basic SQL statements, restricting and sorting data, and using single-row functions.
More informationMANAGING DATA(BASES) USING SQL (NON-PROCEDURAL SQL, X401.9)
Technology & Information Management Instructor: Michael Kremer, Ph.D. Class 6 Professional Program: Data Administration and Management MANAGING DATA(BASES) USING SQL (NON-PROCEDURAL SQL, X401.9) AGENDA
More informationCreating and Managing Tables Schedule: Timing Topic
9 Creating and Managing Tables Schedule: Timing Topic 30 minutes Lecture 20 minutes Practice 50 minutes Total Objectives After completing this lesson, you should be able to do the following: Describe the
More information5. Single-row function
1. 2. Introduction Oracle 11g Oracle 11g Application Server Oracle database Relational and Object Relational Database Management system Oracle internet platform System Development Life cycle 3. Writing
More informationTopics Fundamentals of PL/SQL, Integration with PROIV SuperLayer and use within Glovia
Topics Fundamentals of PL/SQL, Integration with PROIV SuperLayer and use within Glovia 1. Creating a Database Alias 2. Introduction to SQL Relational Database Concept Definition of Relational Database
More informationOracle Syllabus Course code-r10605 SQL
Oracle Syllabus Course code-r10605 SQL Writing Basic SQL SELECT Statements Basic SELECT Statement Selecting All Columns Selecting Specific Columns Writing SQL Statements Column Heading Defaults Arithmetic
More informationDatabase Applications. SQL/PSM Embedded SQL JDBC
Database Applications SQL/PSM Embedded SQL JDBC 1 Course Objectives Design Construction Applications Usage 2 Course Objectives Interfacing When the course is through, you should Know how to connect to
More informationSEF DATABASE FOUNDATION ON ORACLE COURSE CURRICULUM
On a Mission to Transform Talent SEF DATABASE FOUNDATION ON ORACLE COURSE CURRICULUM Table of Contents Module 1: Introduction to Linux & RDBMS (Duration: 1 Week)...2 Module 2: Oracle SQL (Duration: 3 Weeks)...3
More informationRelational Database Management Systems for Epidemiologists: SQL Part II
Relational Database Management Systems for Epidemiologists: SQL Part II Outline Summarizing and Grouping Data Retrieving Data from Multiple Tables using JOINS Summary of Aggregate Functions Function MIN
More informationSQL Interview Questions
SQL Interview Questions SQL stands for Structured Query Language. It is used as a programming language for querying Relational Database Management Systems. In this tutorial, we shall go through the basic
More informationWeb Services for Relational Data Access
Web Services for Relational Data Access Sal Valente CS 6750 Fall 2010 Abstract I describe services which make it easy for users of a grid system to share data from an RDBMS. The producer runs a web services
More informationSQL: Part II. Introduction to Databases CompSci 316 Fall 2018
SQL: Part II Introduction to Databases CompSci 316 Fall 2018 2 Announcements (Thu., Sep. 20) Homework #1 sample solution to be posted on Sakai by this weekend Homework #2 due in 1½ weeks Get started on
More informationThe DBMS accepts requests for data from the application program and instructs the operating system to transfer the appropriate data.
Managing Data Data storage tool must provide the following features: Data definition (data structuring) Data entry (to add new data) Data editing (to change existing data) Querying (a means of extracting
More informationCGS 3066: Spring 2017 SQL Reference
CGS 3066: Spring 2017 SQL Reference Can also be used as a study guide. Only covers topics discussed in class. This is by no means a complete guide to SQL. Database accounts are being set up for all students
More informationSQL for Palm Zhiye LIU MSc in Information Systems 2002/2003
Zhiye LIU MSc in Information Systems 2002/2003 The candidate confirms that the work submitted is their own and the appropriate credit has been given where reference has been made to the work of others.
More informationNew ways to migrate from Oracle
New ways to migrate from Oracle Laurenz Albe laurenz.albe@cybertec.at Cybertec Prague PostgreSQL Developers Day 2018 The problem Database migration consists of several parts: Migration of object definitions
More informationADVANTAGES. Via PL/SQL, all sorts of calculations can be done quickly and efficiently without use of Oracle engine.
1 PL/SQL INTRODUCTION SQL does not have procedural capabilities. SQL does not provide the programming techniques of condition checking, looping and branching that is required for data before permanent
More informationDatabase Systems: Design, Implementation, and Management Tenth Edition. Chapter 8 Advanced SQL
Database Systems: Design, Implementation, and Management Tenth Edition Chapter 8 Advanced SQL Objectives In this chapter, you will learn: How to use the advanced SQL JOIN operator syntax About the different
More informationData about data is database Select correct option: True False Partially True None of the Above
Within a table, each primary key value. is a minimal super key is always the first field in each table must be numeric must be unique Foreign Key is A field in a table that matches a key field in another
More information1. Data Definition Language.
CSC 468 DBMS Organization Spring 2016 Project, Stage 2, Part 2 FLOPPY SQL This document specifies the version of SQL that FLOPPY must support. We provide the full description of the FLOPPY SQL syntax.
More informationCOOL performance optimization using Oracle hints
COOL performance optimization using Oracle hints Andrea deavalassi ass and Romain Basset (IT-DM) With many thanks to Luca Canali for his help! IT-DM Database Developers Workshop, 8 th July 2008 CERN IT
More informationIntroduction to Computer Science and Business
Introduction to Computer Science and Business The Database Programming with PL/SQL course introduces students to the procedural language used to extend SQL in a programatic manner. This course outline
More informationDatabase Systems: Design, Implementation, and Management Tenth Edition. Chapter 8 Advanced SQL
Database Systems: Design, Implementation, and Management Tenth Edition Chapter 8 Advanced SQL SQL Join Operators Join operation merges rows from two tables and returns the rows with one of the following:
More informationChapter 7. Introduction to Structured Query Language (SQL) Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel
Chapter 7 Introduction to Structured Query Language (SQL) Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel 1 In this chapter, you will learn: The basic commands
More informationAdvanced SQL Processing Prepared by Destiny Corporation
Advanced SQL Processing Prepared by Destiny Corporation Summary Functions With a single argument, but with other selected columns, the function gives a result for all the rows, then merges the back with
More informationSql Server Syllabus. Overview
Sql Server Syllabus Overview This SQL Server training teaches developers all the Transact-SQL skills they need to create database objects like Tables, Views, Stored procedures & Functions and triggers
More informationInstructor: Craig Duckett. Lecture 14: Tuesday, May 15 th, 2018 Stored Procedures (SQL Server) and MySQL
Instructor: Craig Duckett Lecture 14: Tuesday, May 15 th, 2018 Stored Procedures (SQL Server) and MySQL 1 Assignment 3 is due LECTURE 20, Tuesday, June 5 th Database Presentation is due LECTURE 20, Tuesday,
More informationCMPT 354: Database System I. Lecture 4. SQL Advanced
CMPT 354: Database System I Lecture 4. SQL Advanced 1 Announcements! A1 is due today A2 is released (due in 2 weeks) 2 Outline Joins Inner Join Outer Join Aggregation Queries Simple Aggregations Group
More informationOracle PLSQL. Course Summary. Duration. Objectives
Oracle PLSQL Course Summary Use conditional compilation to customize the functionality in a PL/SQL application without removing any source code Design PL/SQL packages to group related constructs Create
More informationORACLE: PL/SQL Programming
%ROWTYPE Attribute... 4:23 %ROWTYPE... 2:6 %TYPE... 2:6 %TYPE Attribute... 4:22 A Actual Parameters... 9:7 Actual versus Formal Parameters... 9:7 Aliases... 8:10 Anonymous Blocks... 3:1 Assigning Collection
More informationQuerying Data with Transact SQL
Course 20761A: Querying Data with Transact SQL Course details Course Outline Module 1: Introduction to Microsoft SQL Server 2016 This module introduces SQL Server, the versions of SQL Server, including
More information1 Writing Basic SQL SELECT Statements 2 Restricting and Sorting Data
1 Writing Basic SQL SELECT Statements Objectives 1-2 Capabilities of SQL SELECT Statements 1-3 Basic SELECT Statement 1-4 Selecting All Columns 1-5 Selecting Specific Columns 1-6 Writing SQL Statements
More informationOracle Database 12c SQL Fundamentals
Course Overview This course takes a unique approach to SQL training in that it incorporates data modeling theory, relational database theory, graphical depictions of theoretical concepts and numerous examples
More informationProject 4 Query Optimization Part 2: Join Optimization
Project 4 Query Optimization Part 2: Join Optimization 1 Introduction Out: November 7, 2017 During this semester, we have talked a lot about the different components that comprise a DBMS, especially those
More informationA Unit of SequelGate Innovative Technologies Pvt. Ltd. All Training Sessions are Completely Practical & Real-time
SQL Basics & PL-SQL Complete Practical & Real-time Training Sessions A Unit of SequelGate Innovative Technologies Pvt. Ltd. ISO Certified Training Institute Microsoft Certified Partner Training Highlights
More informationnormalization are being violated o Apply the rule of Third Normal Form to resolve a violation in the model
Database Design Section1 - Introduction 1-1 Introduction to the Oracle Academy o Give examples of jobs, salaries, and opportunities that are possible by participating in the Academy. o Explain how your
More informationOracle Database: Program with PL/SQL
Oracle University Contact Us: Local: 1800 425 8877 Intl: +91 80 4108 4700 Oracle Database: Program with PL/SQL Duration: 50 Hours What you will learn This course introduces students to PL/SQL and helps
More informationOracle Database: Introduction to SQL Ed 2
Oracle University Contact Us: +40 21 3678820 Oracle Database: Introduction to SQL Ed 2 Duration: 5 Days What you will learn This Oracle Database 12c: Introduction to SQL training helps you write subqueries,
More informationCS448 Designing and Implementing a Mini Relational DBMS
CS448 Designing and Implementing a Mini Relational DBMS Credit: 20 points Due Date: Midnight of April 2, 2014 without any penalties. The last day to submit the program is April 9, 2014 with 1 point penalty
More informationData Collections. Welcome to the Fourth Dimension (and beyond) Martin Phillips Ladybridge Systems Ltd. International Spectrum Conference, 2014
Data Collections Welcome to the Fourth Dimension (and beyond) International Spectrum Conference, 2014 Martin Phillips Ladybridge Systems Ltd Multivalue Are we at its limits? We all understand the power
More informationThe Logical Design of the Tokeniser
Page 1 of 21 The Logical Design of the Tokeniser Purpose 1. To split up a character string holding a RAQUEL statement expressed in linear text, into a sequence of character strings (called word tokens),
More informationAnnouncements (September 18) SQL: Part II. Solution 1. Incomplete information. Solution 3? Solution 2. Homework #1 due today (11:59pm)
Announcements (September 18) 2 SQL: Part II Homework #1 due today (11:59pm) Submit in class, slide underneath my office door Sample solution available Thursday Homework #2 assigned today CPS 116 Introduction
More informationDatabase Applications (15-415)
Database Applications (15-415) DBMS Internals- Part VIII Lecture 16, March 19, 2014 Mohammad Hammoud Today Last Session: DBMS Internals- Part VII Algorithms for Relational Operations (Cont d) Today s Session:
More information15-415/615 Faloutsos 1
Carnegie Mellon Univ. Dept. of Computer Science 15-415/615 - DB Applications Lecture #14: Implementation of Relational Operations (R&G ch. 12 and 14) 15-415/615 Faloutsos 1 Outline introduction selection
More informationArbori Starter Manual Eugene Perkov
Arbori Starter Manual Eugene Perkov What is Arbori? Arbori is a query language that takes a parse tree as an input and builds a result set 1 per specifications defined in a query. What is Parse Tree? A
More informationQuestion Bank PL/SQL Fundamentals-I
Question Bank PL/SQL Fundamentals-I UNIT-I Fundamentals of PL SQL Introduction to SQL Developer, Introduction to PL/SQL, PL/SQL Overview, Benefits of PL/SQL, Subprograms, Overview of the Types of PL/SQL
More informationInterview Questions on DBMS and SQL [Compiled by M V Kamal, Associate Professor, CSE Dept]
Interview Questions on DBMS and SQL [Compiled by M V Kamal, Associate Professor, CSE Dept] 1. What is DBMS? A Database Management System (DBMS) is a program that controls creation, maintenance and use
More informationThe PL/SQL Engine: PL/SQL. A PL/SQL Block: Declaration Section. Execution Section. Declaration Section 3/24/2014
PL/SQL The PL/SQL Engine: PL/SQL stands for Procedural Language extension of SQL. PL/SQL is a combination of SQL along with the procedural features of programming languages. It was developed by Oracle
More informationWriting Queries Using Microsoft SQL Server 2008 Transact-SQL. Overview
Writing Queries Using Microsoft SQL Server 2008 Transact-SQL Overview The course has been extended by one day in response to delegate feedback. This extra day will allow for timely completion of all the
More informationOVERVIEW OF THE TYPES OF PL/SQL BLOCKS:
OVERVIEW OF THE TYPES OF PL/SQL BLOCKS: The P/L SQL blocks can be divided into two broad categories: Anonymous Block: The anonymous block is the simplest unit in PL/SQL. It is called anonymous block because
More informationProgram Correctness and Efficiency. Chapter 2
Program Correctness and Efficiency Chapter 2 Chapter Objectives To understand the differences between the three categories of program errors To understand the effect of an uncaught exception and why you
More informationIntroduction to Visual Expert 6.0 new features
Introduction to Visual Expert 6.0 new features 1. NEW NAVIGATION BAR... 2 2. NEW MACROS... 3 2.1. LESS MACROS, MORE PARAMETERS... 3 2.2. MACROS SHORTCUTS IN THE TREEVIEW MENU... 3 2.3. NEW MACROS TO LIST
More informationAbout these Release Notes
Pro*COBOL Release Notes 18c E84345-01 February 2018 Release Notes About these Release Notes This document contains important information about Pro*COBOL release 18c, version 18.1. It contains the following
More informationData Infrastructure IRAP Training 6/27/2016
Data Infrastructure IRAP Training 6/27/2016 UCDW Database Models Integrity Constraints Training Database SQL Defined Types of SQL Languages SQL Basics Simple SELECT SELECT with Aliases SELECT with Conditions/Rules
More informationProcessor : Intel Pentium D3.0 GigaHtz
CHALAPATHI INSTITUTE OF ENGINEERING & TECHNOLOGY CHALAPATHI NAGAR LAM,GUNTUR DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING INTRODUCTION ABOUT 'L2' LAB There are 30 systems (HCL) installed in this Lab.
More informationQuality Assessment of Embedded Language Modules: Targeting the spotlight on heterogeneous systems
Quality Assessment of Embedded Language Modules: Targeting the spotlight on heterogeneous systems Martin van der Vlist Laboratory for Quality Software (LaQuSo) Overview Introduction COBOL Approach Results
More informationCompSci 516 Data Intensive Computing Systems
CompSci 516 Data Intensive Computing Systems Lecture 9 Join Algorithms and Query Optimizations Instructor: Sudeepa Roy CompSci 516: Data Intensive Computing Systems 1 Announcements Takeaway from Homework
More information4. SQL - the Relational Database Language Standard 4.3 Data Manipulation Language (DML)
Since in the result relation each group is represented by exactly one tuple, in the select clause only aggregate functions can appear, or attributes that are used for grouping, i.e., that are also used
More informationOracle EXAM - 1Z Oracle Database SQL Expert. Buy Full Product.
Oracle EXAM - 1Z0-047 Oracle Database SQL Expert Buy Full Product http://www.examskey.com/1z0-047.html Examskey Oracle 1Z0-047 exam demo product is here for you to test the quality of the product. This
More informationReview -Chapter 4. Review -Chapter 5
Review -Chapter 4 Entity relationship (ER) model Steps for building a formal ERD Uses ER diagrams to represent conceptual database as viewed by the end user Three main components Entities Relationships
More informationDatabase Applications (15-415)
Database Applications (15-415) ER to Relational & Relational Algebra Lecture 4, January 20, 2015 Mohammad Hammoud Today Last Session: The relational model Today s Session: ER to relational Relational algebra
More informationOracle Developer Track Course Contents. Mr. Sandeep M Shinde. Oracle Application Techno-Functional Consultant
Oracle Developer Track Course Contents Sandeep M Shinde Oracle Application Techno-Functional Consultant 16 Years MNC Experience in India and USA Trainer Experience Summary:- Sandeep M Shinde is having
More informationOracle. SQL(Structured Query Language) Introduction of DBMS. Build In Function. Introduction of RDBMS. Grouping the Result of a Query
Oracle SQL(Structured Query Language) Introduction of DBMS Approach to Data Management Introduction to prerequisites File and File system Disadvantages of file system Introduction to TOAD and oracle 11g/12c
More informationTopic 3 Object Relational Database
Topic 3 Object Relational Database Limitation of Relational Data Model Uniformity Large number of similarly structure data Record orientation Basic data consists of fixed length records Small data items
More informationCS 4240: Compilers and Interpreters Project Phase 1: Scanner and Parser Due Date: October 4 th 2015 (11:59 pm) (via T-square)
CS 4240: Compilers and Interpreters Project Phase 1: Scanner and Parser Due Date: October 4 th 2015 (11:59 pm) (via T-square) Introduction This semester, through a project split into 3 phases, we are going
More informationPrinciples of Data Management
Principles of Data Management Alvin Lin August 2018 - December 2018 Structured Query Language Structured Query Language (SQL) was created at IBM in the 80s: SQL-86 (first standard) SQL-89 SQL-92 (what
More informationCourse Outline and Objectives: Database Programming with SQL
Introduction to Computer Science and Business Course Outline and Objectives: Database Programming with SQL This is the second portion of the Database Design and Programming with SQL course. In this portion,
More informationOracle PL SQL Training & Certification
About Intellipaat Intellipaat is a fast-growing professional training provider that is offering training in over 150 most sought-after tools and technologies. We have a learner base of 600,000 in over
More informationAdvanced SQL Topics. Michael Fields Central Library Consortium https://go.clcohio.org/pug2014fields
Advanced SQL Topics Michael Fields Central Library Consortium mfields@clcohio.org https://go.clcohio.org/pug2014fields Overview Useful tools SQL Complete -- SSMS add-in Better intellisense / searching
More informationSQL Gone Wild: Taming Bad SQL the Easy Way (or the Hard Way) Sergey Koltakov Product Manager, Database Manageability
SQL Gone Wild: Taming Bad SQL the Easy Way (or the Hard Way) Sergey Koltakov Product Manager, Database Manageability Oracle Enterprise Manager Top-Down, Integrated Application Management Complete, Open,
More informationIntroduction to Information Systems
Table of Contents 1... 2 1.1 Introduction... 2 1.2 Architecture of Information systems... 2 1.3 Classification of Data Models... 4 1.4 Relational Data Model (Overview)... 8 1.5 Conclusion... 12 1 1.1 Introduction
More informationStudent Performance Q&A:
Student Performance Q&A: 2016 AP Computer Science A Free-Response Questions The following comments on the 2016 free-response questions for AP Computer Science A were written by the Chief Reader, Elizabeth
More informationSQL: Data Querying. B0B36DBS, BD6B36DBS: Database Systems. h p://www.ksi.m.cuni.cz/~svoboda/courses/172-b0b36dbs/ Lecture 4
B0B36DBS, BD6B36DBS: Database Systems h p://www.ksi.m.cuni.cz/~svoboda/courses/172-b0b36dbs/ Lecture 4 SQL: Data Querying Mar n Svoboda mar n.svoboda@fel.cvut.cz 20. 3. 2018 Czech Technical University
More informationInstructor: Craig Duckett. Lecture 11: Thursday, May 3 th, Set Operations, Subqueries, Views
Instructor: Craig Duckett Lecture 11: Thursday, May 3 th, 2018 Set Operations, Subqueries, Views 1 MID-TERM EXAM GRADED! Assignment 2 is due LECTURE 12, NEXT Tuesday, May 8 th in StudentTracker by MIDNIGHT
More informationScala : an LLVM-targeted Scala compiler
Scala : an LLVM-targeted Scala compiler Da Liu, UNI: dl2997 Contents 1 Background 1 2 Introduction 1 3 Project Design 1 4 Language Prototype Features 2 4.1 Language Features........................................
More informationSQL: Data De ni on. B0B36DBS, BD6B36DBS: Database Systems. h p://www.ksi.m.cuni.cz/~svoboda/courses/172-b0b36dbs/ Lecture 3
B0B36DBS, BD6B36DBS: Database Systems h p://www.ksi.m.cuni.cz/~svoboda/courses/172-b0b36dbs/ Lecture 3 SQL: Data De ni on Mar n Svoboda mar n.svoboda@fel.cvut.cz 13. 3. 2018 Czech Technical University
More informationChapter 1 SQL and Data
Chapter 1 SQL and Data What is SQL? Structured Query Language An industry-standard language used to access & manipulate data stored in a relational database E. F. Codd, 1970 s IBM 2 What is Oracle? A relational
More informationIndex. NOTE: Boldface numbers indicate illustrations or code listing; t indicates a table. 341
A access paths, 31 optimizing SQL and, 135, 135 access types, restricting SQL statements, JDBC setup and, 36-37, 37 accessing iseries data from a PC, 280-287, 280 accumulate running totals, 192-197, 193,
More informationChapter 12: Query Processing
Chapter 12: Query Processing Overview Catalog Information for Cost Estimation $ Measures of Query Cost Selection Operation Sorting Join Operation Other Operations Evaluation of Expressions Transformation
More informationSQL Data Querying and Views
Course A7B36DBS: Database Systems Lecture 04: SQL Data Querying and Views Martin Svoboda Faculty of Electrical Engineering, Czech Technical University in Prague Outline SQL Data manipulation SELECT queries
More informationChapter 13 Introduction to SQL Programming Techniques
Chapter 13 Introduction to SQL Programming Techniques Copyright 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 13 Outline Database Programming: Techniques and Issues Embedded
More informationInformation Systems Engineering. SQL Structured Query Language DDL Data Definition (sub)language
Information Systems Engineering SQL Structured Query Language DDL Data Definition (sub)language 1 SQL Standard Language for the Definition, Querying and Manipulation of Relational Databases on DBMSs Its
More informationLearning Alliance Corporation, Inc. For more info: go to
Writing Queries Using Microsoft SQL Server Transact-SQL Length: 3 Day(s) Language(s): English Audience(s): IT Professionals Level: 200 Technology: Microsoft SQL Server Type: Course Delivery Method: Instructor-led
More informationContents Contents Introduction Basic Steps in Query Processing Introduction Transformation of Relational Expressions...
Contents Contents...283 Introduction...283 Basic Steps in Query Processing...284 Introduction...285 Transformation of Relational Expressions...287 Equivalence Rules...289 Transformation Example: Pushing
More informationLecture 08. Spring 2018 Borough of Manhattan Community College
Lecture 08 Spring 2018 Borough of Manhattan Community College 1 The SQL Programming Language Recent versions of the SQL standard allow SQL to be embedded in high-level programming languages to help develop
More informationOracle Database: SQL and PL/SQL Fundamentals
Oracle University Contact Us: 001-855-844-3881 & 001-800-514-06-9 7 Oracle Database: SQL and PL/SQL Fundamentals Duration: 5 Days What you will learn This Oracle Database: SQL and PL/SQL Fundamentals training
More informationProgramming Languages Third Edition. Chapter 7 Basic Semantics
Programming Languages Third Edition Chapter 7 Basic Semantics Objectives Understand attributes, binding, and semantic functions Understand declarations, blocks, and scope Learn how to construct a symbol
More informationWhat happens. 376a. Database Design. Execution strategy. Query conversion. Next. Two types of techniques
376a. Database Design Dept. of Computer Science Vassar College http://www.cs.vassar.edu/~cs376 Class 16 Query optimization What happens Database is given a query Query is scanned - scanner creates a list
More information1z Oracle Database SQL Expert
1z0-047 Oracle Database SQL Expert Version 1.6 QUESTION NO: 1 Which three possible values can be set for the TIME_ZONE session parameter by using the ALTER SESSION command? (Choose three.) E. 'os' local
More informationEDUVITZ TECHNOLOGIES
EDUVITZ TECHNOLOGIES Oracle Course Overview Oracle Training Course Prerequisites Computer Fundamentals, Windows Operating System Basic knowledge of database can be much more useful Oracle Training Course
More informationRDBMS Topic 4 Adv. SQL, MSBTE Questions and Answers ( 12 Marks)
2017 RDBMS Topic 4 Adv. SQL, MSBTE Questions and Answers ( 12 Marks) 2016 Q. What is view? Definition of view: 2 marks) Ans : View: A view is a logical extract of a physical relation i.e. it is derived
More informationSlicing and Dicing Data in CF and SQL: Part 2
Slicing and Dicing Data in CF and SQL: Part 2 Charlie Arehart Founder/CTO Systemanage carehart@systemanage.com SysteManage: Agenda Slicing and Dicing Data in Many Ways Cross-Referencing Tables (Joins)
More information