Introduction to tuple calculus Tore Risch
|
|
|
- Branden Hood
- 9 years ago
- Views:
Transcription
1 Introduction to tuple calculus Tore Risch The relational data model is based on considering normalized tables as mathematical relationships. Powerful query languages can be defined over such mathematical relationships based on a form of mathematical logic called predicate calculus. The initial relational database query language (called Alpha) had pure predicate calculus syntax (logical expression). It was claimed that the predicate calculus syntax was difficult to understand for non-mathematicians, and therefore the query language SQL was developed having a more natural-language syntax (English-like). The SELECT statement in SQL is the basic query primitive, in fact, the SELECT statement is syntactically sugared predicate calculus based on Alpha 1. Over time, SQL was extended in many ways and now includes also constructs that are more relational algebra-oriented. The mathematical logic on which most query languages for relational databases is based is called tuple calculus. The tuple calculus is characterized by variables in queries being bound to tuples, corresponding rows in tables. In SQL, this means that the FROM clause binds variables to rows of the tables identified by the FROM clause. It is proved that all queries that can be expressed in relational algebra can also be expressed in tuple calculus, and vice versa. One says that a query language is relationally complete if it can express all queries that can be expressed in tuple calculus or relational algebra. SQL is a relationally complete query language. Actually, the SQL language contains much more than what is required for a query language to be relationally complete. This means that one can express queries in SQL which cannot be expressed in tuple calculus. An example of what one can express in SQL that cannot be expressed in basic tuple calculus or relational algebra is aggregate functions, such as SUM and COUNT. Another important extension is that the result of a query in the tuple calculus is a set of tuples, which in SQL is generalized to the so-called bags of tuples where the same row (tuple) can occur more than once in the result of an SQL query. We therefore need a more general formal language than the relational algebra or tuple calculus to represent full SQL. In the rest of this compendium, we discuss how a subset of SQLs SELECT statement can be expressed as tuple calculus. In order to make it simple, we explain is through a small example. Suppose we have the tables (relations): STAFF (SSN, NAME,SALARY, DEPT, PHONE) DEPARTMENT (DNO, DNAME) 1 The original name of the SQL was SEQUEL, Structured English Query Language. The name SEQUEL proved copyright protected and was changed to SQL.
2 The first example query is: Find the name and telephone numbers for all staff who have salaries in excess of The query can be expressed in SQL as: SELECT S.NAME, S.PHONE FROM STAFF S WHERE S. SALARY > ; In tuple calculus the query is expressed as: {s.name, s.phone staff(s) s.salary> } In general, a query in tuple calculus has the form: {proj (t1, t2,..) r (t1, t2,...) c (t1, t2,...)} The expression r(t1, t2,...) is called a range predicate and specifies how the variables used in the query are bound to tuples (=rows) in the specified relations (=tables). In the example, we bind the variable s to tuples in the relation staff, so the range predicate is thus staff(s). The FROM clause in SQL defines range predicates. The term c(t1, t2,...) is called the search condition and selectes the tuples t1, t2,... to be searched for by specifying constraints on returned tuple attributes. In the example, the search condition is s.salary>100000, i.e. the attribute salary in tuples bound to variable s must be greater than The WHERE clause in SQL defines search conditions. The term proj(t1, t2,..) is called the projection and specifies the attributes of the selected tuples to be returned by the query. In the example, the projection is s.name,s.telephone, i.e. the query returns the attributes name and telephone of selected tuples s. In general, the projection specifies a list of attributes for some tuple variables. The SELECT clause in SQL defines projections. Queries over multiple relations is specified by using a binding predicate being a conjunction of simple (atomic) binding predicates from the relations used in the query. In SQL, this means that multiple tables are specified in the FROM clause. Such conjunctive binding predicates represents the Cartesian product of tuples in the specified relations. Suppose we want to query: Find the name, phone number and title of persons who have higher salaries than 100,000 The query is expressed in SQL as: SELECT S.NAME, S.PHONE, D.DNAME FROM STAFF S, DEPARTMENT D WHERE S.SALARY > AND S.DEPT = D.DNO;
3
4 In tuple calculus this is expressed as: {s.name, s.telephone, d.dname staff(s) department(d) s.salary > s.dept = d.dno} In this case, the range predicate is staff(s) department(d). It binds the variables s and d to form the Cartesian product of tuples (rows) in relations (tables) staff and department. The variables are then used in the search to join the relations staff and department and to restrict the tuples s in the relation employee to those whose attribute s.salary is greater than The example SQL statements all have explicit variable names specified for all tables in the FROM clauses. It is recommended to always use in SQL the format T.A to explicitly specify the value of attribute A of tuple T. In general, one can often omit the tuple variable names in SQL if it is unambigouos. For example, it is also permissible to express the previous query without tuple variables as: SELECT NAME, PHONE, AVDNAMN FROM STAFF, DEPARTMENT WHERE SALARY > AND DEPT = DNO; We say we have a complete SQL query if we specified all tuple variables in the FROM clause and in attribute references. A complete SQL query can be directly translated to the corresponding tuple calculus query. A non-complete SQL query can always be transformed into a complete one by introducing explicit tuple variable names. Besides allowing easy translation into tuple calculus, using complete SQL queries has the advantage of making it possible to add new columns in the tables without changing the SQL queries. If we e.g. add column PHONE also in the table DEPARTMENT the above noncomplete SQL becomes ambiguous since there is a column named PHONE in both tables. The corresponding complete SQL query remains correct. We note that complete queries are less sensitive to database schema changes, they have better data independence. In general, a predicate in tuple calculus is made up of atoms, which are simple predicates (conditions) that may be in the following formats: 1. A binding atom with format r(t) binds the variable t to each of the tuples in relation r, e.g. staff(s). 2. An atom with format ti.a op k, where op is one of the comparison operators <,, =,,, > and k is a constant, defines a comparison of an attribute with a constant, e.g. s.salary > An atom with format ti.a op tj.b defines a comparison between two attribute values, e.g. s.dept = d.dno. A formula in tuple calculus is either an atom or several formulas connected with the logic operators (and), (or), and (not). A formula can thus be one of the following: 4. An atom as above. 5. If F1 and F2 are formulas then F1 F2, F1 F2 and F1 are formulas too, e.g. staff(s) s.salary >
5 A formula can also be connected with the quantifiers and : 6. If F is a formula then (( t) F) is a formula. denotes there exists and the formula F is said to be existentially quantified. 7. If F is a formula then (( t) F) is also a formula. denotes for all and the formula F is said to be universally quantified. As an example, suppose we want to express the query: Find those staff members for which there exist a department where they work. The query can be expressed in tuple calculus as: {s.name staff(s) (( d) department(s) d.dno = s.dept)} In SQL the query can be expressed as: SELECT S.NAME FROM STAFF S WHERE EXISTS(SELECT * FROM DEPARTMENT D WHERE D.DNO = S.DEPT); Universal quantification cannot be directly express in SQL as existential quantification. However, for relational completeness it is required that universal quantification can be expressed. So how is universal quantification expressed in SQL? For example, suppose we want to query: Find those departments where all staff members earn more than The simplest way to handle universal quantification is to instead transform the query into the corresponding negative query: Find those departments where no staff member earns less than This query can be formulated using in tuple calculs as: {d. dname (department(d) ( ( s) (staff(s) s.dept = d.dno d.salary < 50000)} 2 2 Notice that the result from this query includes the departments having no staff at all. If you don t want to include the departments without staff you will have to extend the query.
6 In SQL the reformulated query can be expressed as: SELECT D. DNAME FROM DEPARTMENT D WHERE NOT EXISTS (SELECT * FROM STAFF S WHERE S.DEPT = D.DNO AND D.SALARY <50000);
Relational Calculus. Module 3, Lecture 2. Database Management Systems, R. Ramakrishnan 1
Relational Calculus Module 3, Lecture 2 Database Management Systems, R. Ramakrishnan 1 Relational Calculus Comes in two flavours: Tuple relational calculus (TRC) and Domain relational calculus (DRC). Calculus
Relational Databases
Relational Databases Jan Chomicki University at Buffalo Jan Chomicki () Relational databases 1 / 18 Relational data model Domain domain: predefined set of atomic values: integers, strings,... every attribute
Part A: Data Definition Language (DDL) Schema and Catalog CREAT TABLE. Referential Triggered Actions. CSC 742 Database Management Systems
CSC 74 Database Management Systems Topic #0: SQL Part A: Data Definition Language (DDL) Spring 00 CSC 74: DBMS by Dr. Peng Ning Spring 00 CSC 74: DBMS by Dr. Peng Ning Schema and Catalog Schema A collection
Relational Division and SQL
Relational Division and SQL Soulé 1 Example Relations and Queries As a motivating example, consider the following two relations: Taken(,Course) which contains the courses that each student has completed,
Chapter 5 More SQL: Complex Queries, Triggers, Views, and Schema Modification
Chapter 5 More SQL: Complex Queries, Triggers, Views, and Schema Modification Copyright 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 5 Outline More Complex SQL Retrieval Queries
Relational Algebra. Module 3, Lecture 1. Database Management Systems, R. Ramakrishnan 1
Relational Algebra Module 3, Lecture 1 Database Management Systems, R. Ramakrishnan 1 Relational Query Languages Query languages: Allow manipulation and retrieval of data from a database. Relational model
3. Mathematical Induction
3. MATHEMATICAL INDUCTION 83 3. Mathematical Induction 3.1. First Principle of Mathematical Induction. Let P (n) be a predicate with domain of discourse (over) the natural numbers N = {0, 1,,...}. If (1)
There are five fields or columns, with names and types as shown above.
3 THE RELATIONAL MODEL Exercise 3.1 Define the following terms: relation schema, relational database schema, domain, attribute, attribute domain, relation instance, relation cardinality, andrelation degree.
Elena Baralis, Silvia Chiusano Politecnico di Torino. Pag. 1. Query optimization. DBMS Architecture. Query optimizer. Query optimizer.
DBMS Architecture INSTRUCTION OPTIMIZER Database Management Systems MANAGEMENT OF ACCESS METHODS BUFFER MANAGER CONCURRENCY CONTROL RELIABILITY MANAGEMENT Index Files Data Files System Catalog BASE It
Schema Mappings and Data Exchange
Schema Mappings and Data Exchange Phokion G. Kolaitis University of California, Santa Cruz & IBM Research-Almaden EASSLC 2012 Southwest University August 2012 1 Logic and Databases Extensive interaction
Relational Algebra and SQL
Relational Algebra and SQL Johannes Gehrke [email protected] http://www.cs.cornell.edu/johannes Slides from Database Management Systems, 3 rd Edition, Ramakrishnan and Gehrke. Database Management
Relational model. Relational model - practice. Relational Database Definitions 9/27/11. Relational model. Relational Database: Terminology
COS 597A: Principles of Database and Information Systems elational model elational model A formal (mathematical) model to represent objects (data/information), relationships between objects Constraints
Unit 3. Retrieving Data from Multiple Tables
Unit 3. Retrieving Data from Multiple Tables What This Unit Is About How to retrieve columns from more than one table or view. What You Should Be Able to Do Retrieve data from more than one table or view.
Basics of Dimensional Modeling
Basics of Dimensional Modeling Data warehouse and OLAP tools are based on a dimensional data model. A dimensional model is based on dimensions, facts, cubes, and schemas such as star and snowflake. Dimensional
Introduction to SQL: Data Retrieving
Introduction to SQL: Data Retrieving Ruslan Fomkin Databasdesign för Ingenjörer 1056F Structured Query Language (SQL) History: SEQUEL (Structured English QUery Language), earlier 70 s, IBM Research SQL
COMP 5138 Relational Database Management Systems. Week 5 : Basic SQL. Today s Agenda. Overview. Basic SQL Queries. Joins Queries
COMP 5138 Relational Database Management Systems Week 5 : Basic COMP5138 "Relational Database Managment Systems" J. Davis 2006 5-1 Today s Agenda Overview Basic Queries Joins Queries Aggregate Functions
Relational Algebra. Query Languages Review. Operators. Select (σ), Project (π), Union ( ), Difference (-), Join: Natural (*) and Theta ( )
Query Languages Review Relational Algebra SQL Set operators Union Intersection Difference Cartesian product Relational Algebra Operators Relational operators Selection Projection Join Division Douglas
Basic Proof Techniques
Basic Proof Techniques David Ferry [email protected] September 13, 010 1 Four Fundamental Proof Techniques When one wishes to prove the statement P Q there are four fundamental approaches. This document
Translating SQL into the Relational Algebra
Translating SQL into the Relational Algebra Jan Van den Bussche Stijn Vansummeren Required background Before reading these notes, please ensure that you are familiar with (1) the relational data model
Handout #1: Mathematical Reasoning
Math 101 Rumbos Spring 2010 1 Handout #1: Mathematical Reasoning 1 Propositional Logic A proposition is a mathematical statement that it is either true or false; that is, a statement whose certainty or
SUBQUERIES AND VIEWS. CS121: Introduction to Relational Database Systems Fall 2015 Lecture 6
SUBQUERIES AND VIEWS CS121: Introduction to Relational Database Systems Fall 2015 Lecture 6 String Comparisons and GROUP BY 2! Last time, introduced many advanced features of SQL, including GROUP BY! Recall:
Continuous Compounding and Discounting
Continuous Compounding and Discounting Philip A. Viton October 5, 2011 Continuous October 5, 2011 1 / 19 Introduction Most real-world project analysis is carried out as we ve been doing it, with the present
How To Create A Table In Sql 2.5.2.2 (Ahem)
Database Systems Unit 5 Database Implementation: SQL Data Definition Language Learning Goals In this unit you will learn how to transfer a logical data model into a physical database, how to extend or
Practical Guide to the Simplex Method of Linear Programming
Practical Guide to the Simplex Method of Linear Programming Marcel Oliver Revised: April, 0 The basic steps of the simplex algorithm Step : Write the linear programming problem in standard form Linear
Lecture 6. SQL, Logical DB Design
Lecture 6 SQL, Logical DB Design Relational Query Languages A major strength of the relational model: supports simple, powerful querying of data. Queries can be written intuitively, and the DBMS is responsible
Solving Linear Systems, Continued and The Inverse of a Matrix
, Continued and The of a Matrix Calculus III Summer 2013, Session II Monday, July 15, 2013 Agenda 1. The rank of a matrix 2. The inverse of a square matrix Gaussian Gaussian solves a linear system by reducing
SQL Database queries and their equivalence to predicate calculus
SQL Database queries and their equivalence to predicate calculus Russell Impagliazzo, with assistence from Cameron Helm November 3, 2013 1 Warning This lecture goes somewhat beyond Russell s expertise,
Chapter 8. SQL-99: SchemaDefinition, Constraints, and Queries and Views
Chapter 8 SQL-99: SchemaDefinition, Constraints, and Queries and Views Data Definition, Constraints, and Schema Changes Used to CREATE, DROP, and ALTER the descriptions of the tables (relations) of a database
CHAPTER 3. Methods of Proofs. 1. Logical Arguments and Formal Proofs
CHAPTER 3 Methods of Proofs 1. Logical Arguments and Formal Proofs 1.1. Basic Terminology. An axiom is a statement that is given to be true. A rule of inference is a logical rule that is used to deduce
Scheme G. Sample Test Paper-I
Scheme G Sample Test Paper-I Course Name : Computer Engineering Group Course Code : CO/CM/IF/CD/CW Marks : 25 Hours: 1 Hrs. Q.1 Attempt Any THREE. 09 Marks a) List any six applications of DBMS. b) Define
Tom wants to find two real numbers, a and b, that have a sum of 10 and have a product of 10. He makes this table.
Sum and Product This problem gives you the chance to: use arithmetic and algebra to represent and analyze a mathematical situation solve a quadratic equation by trial and improvement Tom wants to find
VIEWS virtual relation data duplication consistency problems
VIEWS A virtual relation that is defined from other preexisting relations Called the defining relations of the view A view supports multiple user perspectives on the database corresponding to different
The Relational Data Model and Relational Database Constraints
The Relational Data Model and Relational Database Constraints Chapter Outline Relational Model Concepts Relational Model Constraints and Relational Database Schemas Update Operations and Dealing with Constraint
The Relational Algebra
The Relational Algebra Relational set operators: The data in relational tables are of limited value unless the data can be manipulated to generate useful information. Relational Algebra defines the theoretical
Chapter 3. Cartesian Products and Relations. 3.1 Cartesian Products
Chapter 3 Cartesian Products and Relations The material in this chapter is the first real encounter with abstraction. Relations are very general thing they are a special type of subset. After introducing
Metric Spaces. Chapter 7. 7.1. Metrics
Chapter 7 Metric Spaces A metric space is a set X that has a notion of the distance d(x, y) between every pair of points x, y X. The purpose of this chapter is to introduce metric spaces and give some
SQL Simple Queries. Chapter 3.1 V3.0. Copyright @ Napier University Dr Gordon Russell
SQL Simple Queries Chapter 3.1 V3.0 Copyright @ Napier University Dr Gordon Russell Introduction SQL is the Structured Query Language It is used to interact with the DBMS SQL can Create Schemas in the
Chapter 9, More SQL: Assertions, Views, and Programming Techniques
Chapter 9, More SQL: Assertions, Views, and Programming Techniques 9.2 Embedded SQL SQL statements can be embedded in a general purpose programming language, such as C, C++, COBOL,... 9.2.1 Retrieving
Database Systems. Lecture Handout 1. Dr Paolo Guagliardo. University of Edinburgh. 21 September 2015
Database Systems Lecture Handout 1 Dr Paolo Guagliardo University of Edinburgh 21 September 2015 What is a database? A collection of data items, related to a specific enterprise, which is structured and
Lecture 16 : Relations and Functions DRAFT
CS/Math 240: Introduction to Discrete Mathematics 3/29/2011 Lecture 16 : Relations and Functions Instructor: Dieter van Melkebeek Scribe: Dalibor Zelený DRAFT In Lecture 3, we described a correspondence
University of Massachusetts Amherst Department of Computer Science Prof. Yanlei Diao
University of Massachusetts Amherst Department of Computer Science Prof. Yanlei Diao CMPSCI 445 Midterm Practice Questions NAME: LOGIN: Write all of your answers directly on this paper. Be sure to clearly
PYTHAGOREAN TRIPLES KEITH CONRAD
PYTHAGOREAN TRIPLES KEITH CONRAD 1. Introduction A Pythagorean triple is a triple of positive integers (a, b, c) where a + b = c. Examples include (3, 4, 5), (5, 1, 13), and (8, 15, 17). Below is an ancient
Binary Adders: Half Adders and Full Adders
Binary Adders: Half Adders and Full Adders In this set of slides, we present the two basic types of adders: 1. Half adders, and 2. Full adders. Each type of adder functions to add two binary bits. In order
Object Oriented Databases (OODBs) Relational and OO data models. Advantages and Disadvantages of OO as compared with relational
Object Oriented Databases (OODBs) Relational and OO data models. Advantages and Disadvantages of OO as compared with relational databases. 1 A Database of Students and Modules Student Student Number {PK}
Math 4310 Handout - Quotient Vector Spaces
Math 4310 Handout - Quotient Vector Spaces Dan Collins The textbook defines a subspace of a vector space in Chapter 4, but it avoids ever discussing the notion of a quotient space. This is understandable
Chapter 3. Distribution Problems. 3.1 The idea of a distribution. 3.1.1 The twenty-fold way
Chapter 3 Distribution Problems 3.1 The idea of a distribution Many of the problems we solved in Chapter 1 may be thought of as problems of distributing objects (such as pieces of fruit or ping-pong balls)
SQL Query Evaluation. Winter 2006-2007 Lecture 23
SQL Query Evaluation Winter 2006-2007 Lecture 23 SQL Query Processing Databases go through three steps: Parse SQL into an execution plan Optimize the execution plan Evaluate the optimized plan Execution
History of SQL. Relational Database Languages. Tuple relational calculus ALPHA (Codd, 1970s) QUEL (based on ALPHA) Datalog (rule-based, like PROLOG)
Relational Database Languages Tuple relational calculus ALPHA (Codd, 1970s) QUEL (based on ALPHA) Datalog (rule-based, like PROLOG) Domain relational calculus QBE (used in Access) History of SQL Standards:
1. SELECT DISTINCT f.fname FROM Faculty f, Class c WHERE f.fid = c.fid AND c.room = LWSN1106
Database schema: Department(deptid, dname, location) Student(snum, sname, deptid, slevel, age) Faculty(fid, fname, deptid) Class(cname, time, room, fid) Enrolled(snum, cname) SQL queries: 1. Get the names
Part 4: Database Language - SQL
Part 4: Database Language - SQL Junping Sun Database Systems 4-1 Database Languages and Implementation Data Model Data Model = Data Schema + Database Operations + Constraints Database Languages such as
Chapter 6: Integrity Constraints
Chapter 6: Integrity Constraints Domain Constraints Referential Integrity Assertions Triggers Functional Dependencies Database Systems Concepts 6.1 Silberschatz, Korth and Sudarshan c 1997 Domain Constraints
Data Integration. Maurizio Lenzerini. Universitá di Roma La Sapienza
Data Integration Maurizio Lenzerini Universitá di Roma La Sapienza DASI 06: Phd School on Data and Service Integration Bertinoro, December 11 15, 2006 M. Lenzerini Data Integration DASI 06 1 / 213 Structure
Grade Level Year Total Points Core Points % At Standard 9 2003 10 5 7 %
Performance Assessment Task Number Towers Grade 9 The task challenges a student to demonstrate understanding of the concepts of algebraic properties and representations. A student must make sense of the
Relational Algebra 2. Chapter 5.2 V3.0. Copyright @ Napier University Dr Gordon Russell
Relational Algebra 2 Chapter 5.2 V3.0 Copyright @ Napier University Dr Gordon Russell Relational Algebra - Example Consider the following SQL to find which departments have had employees on the `Further
Advance DBMS. Structured Query Language (SQL)
Structured Query Language (SQL) Introduction Commercial database systems use more user friendly language to specify the queries. SQL is the most influential commercially marketed product language. Other
Data Structure: Relational Model. Programming Interface: JDBC/ODBC. SQL Queries: The Basic From
Data Structure: Relational Moel Relational atabases: Schema + Data Schema (also calle scheme): collection of tables (also calle relations) each table has a set of attributes no repeating relation names,
www.gr8ambitionz.com
Data Base Management Systems (DBMS) Study Material (Objective Type questions with Answers) Shared by Akhil Arora Powered by www. your A to Z competitive exam guide Database Objective type questions Q.1
Walrasian Demand. u(x) where B(p, w) = {x R n + : p x w}.
Walrasian Demand Econ 2100 Fall 2015 Lecture 5, September 16 Outline 1 Walrasian Demand 2 Properties of Walrasian Demand 3 An Optimization Recipe 4 First and Second Order Conditions Definition Walrasian
Lecture 6: Query optimization, query tuning. Rasmus Pagh
Lecture 6: Query optimization, query tuning Rasmus Pagh 1 Today s lecture Only one session (10-13) Query optimization: Overview of query evaluation Estimating sizes of intermediate results A typical query
More on SQL. Juliana Freire. Some slides adapted from J. Ullman, L. Delcambre, R. Ramakrishnan, G. Lindstrom and Silberschatz, Korth and Sudarshan
More on SQL Some slides adapted from J. Ullman, L. Delcambre, R. Ramakrishnan, G. Lindstrom and Silberschatz, Korth and Sudarshan SELECT A1, A2,, Am FROM R1, R2,, Rn WHERE C1, C2,, Ck Interpreting a Query
Triggers & Packages. {INSERT [OR] UPDATE [OR] DELETE}: This specifies the DML operation.
Triggers & Packages An SQL trigger is a mechanism that automatically executes a specified PL/SQL block (referred to as the triggered action) when a triggering event occurs on the table. The triggering
Practice with Proofs
Practice with Proofs October 6, 2014 Recall the following Definition 0.1. A function f is increasing if for every x, y in the domain of f, x < y = f(x) < f(y) 1. Prove that h(x) = x 3 is increasing, using
CSC 443 Data Base Management Systems. Basic SQL
CSC 443 Data Base Management Systems Lecture 6 SQL As A Data Definition Language Basic SQL SQL language Considered one of the major reasons for the commercial success of relational databases SQL Structured
Information Systems SQL. Nikolaj Popov
Information Systems SQL Nikolaj Popov Research Institute for Symbolic Computation Johannes Kepler University of Linz, Austria [email protected] Outline SQL Table Creation Populating and Modifying
The process of database development. Logical model: relational DBMS. Relation
The process of database development Reality (Universe of Discourse) Relational Databases and SQL Basic Concepts The 3rd normal form Structured Query Language (SQL) Conceptual model (e.g. Entity-Relationship
Sensitivity Analysis 3.1 AN EXAMPLE FOR ANALYSIS
Sensitivity Analysis 3 We have already been introduced to sensitivity analysis in Chapter via the geometry of a simple example. We saw that the values of the decision variables and those of the slack and
Zeros of a Polynomial Function
Zeros of a Polynomial Function An important consequence of the Factor Theorem is that finding the zeros of a polynomial is really the same thing as factoring it into linear factors. In this section we
This asserts two sets are equal iff they have the same elements, that is, a set is determined by its elements.
3. Axioms of Set theory Before presenting the axioms of set theory, we first make a few basic comments about the relevant first order logic. We will give a somewhat more detailed discussion later, but
4. SQL. Contents. Example Database. CUSTOMERS(FName, LName, CAddress, Account) PRODUCTS(Prodname, Category) SUPPLIERS(SName, SAddress, Chain)
ECS-165A WQ 11 66 4. SQL Contents Basic Queries in SQL (select statement) Set Operations on Relations Nested Queries Null Values Aggregate Functions and Grouping Data Definition Language Constructs Insert,
CS 338 Join, Aggregate and Group SQL Queries
CS 338 Join, Aggregate and Group SQL Queries Bojana Bislimovska Winter 2016 Outline SQL joins Aggregate functions in SQL Grouping in SQL HAVING clause SQL Joins Specifies a table resulting from a join
Introduction to Microsoft Jet SQL
Introduction to Microsoft Jet SQL Microsoft Jet SQL is a relational database language based on the SQL 1989 standard of the American Standards Institute (ANSI). Microsoft Jet SQL contains two kinds of
CURVE FITTING LEAST SQUARES APPROXIMATION
CURVE FITTING LEAST SQUARES APPROXIMATION Data analysis and curve fitting: Imagine that we are studying a physical system involving two quantities: x and y Also suppose that we expect a linear relationship
The Relational Data Model: Structure
The Relational Data Model: Structure 1 Overview By far the most likely data model in which you ll implement a database application today. Of historical interest: the relational model is not the first implementation
Execution Strategies for SQL Subqueries
Execution Strategies for SQL Subqueries Mostafa Elhemali, César Galindo- Legaria, Torsten Grabs, Milind Joshi Microsoft Corp With additional slides from material in paper, added by S. Sudarshan 1 Motivation
Relational Database: Additional Operations on Relations; SQL
Relational Database: Additional Operations on Relations; SQL Greg Plaxton Theory in Programming Practice, Fall 2005 Department of Computer Science University of Texas at Austin Overview The course packet
TECHNIQUES FOR OPTIMIZING THE RELATIONSHIP BETWEEN DATA STORAGE SPACE AND DATA RETRIEVAL TIME FOR LARGE DATABASES
Techniques For Optimizing The Relationship Between Data Storage Space And Data Retrieval Time For Large Databases TECHNIQUES FOR OPTIMIZING THE RELATIONSHIP BETWEEN DATA STORAGE SPACE AND DATA RETRIEVAL
SQL Nested & Complex Queries. CS 377: Database Systems
SQL Nested & Complex Queries CS 377: Database Systems Recap: Basic SQL Retrieval Query A SQL query can consist of several clauses, but only SELECT and FROM are mandatory SELECT FROM
Chapter 14: Query Optimization
Chapter 14: Query Optimization Database System Concepts 5 th Ed. See www.db-book.com for conditions on re-use Chapter 14: Query Optimization Introduction Transformation of Relational Expressions Catalog
Business Intelligence Extensions for SPARQL
Business Intelligence Extensions for SPARQL Orri Erling (Program Manager, OpenLink Virtuoso) and Ivan Mikhailov (Lead Developer, OpenLink Virtuoso). OpenLink Software, 10 Burlington Mall Road Suite 265
Define terms Write single and multiple table SQL queries Write noncorrelated and correlated subqueries Define and use three types of joins
Chapter 7 Advanced SQL 1 Define terms Objectives Write single and multiple table SQL queries Write noncorrelated and correlated subqueries Define and use three types of joins 2 Nested Queries (Subqueries)
α = u v. In other words, Orthogonal Projection
Orthogonal Projection Given any nonzero vector v, it is possible to decompose an arbitrary vector u into a component that points in the direction of v and one that points in a direction orthogonal to v
Sample Induction Proofs
Math 3 Worksheet: Induction Proofs III, Sample Proofs A.J. Hildebrand Sample Induction Proofs Below are model solutions to some of the practice problems on the induction worksheets. The solutions given
CHAPTER 7 GENERAL PROOF SYSTEMS
CHAPTER 7 GENERAL PROOF SYSTEMS 1 Introduction Proof systems are built to prove statements. They can be thought as an inference machine with special statements, called provable statements, or sometimes
The SQL Query Language. Creating Relations in SQL. Referential Integrity in SQL. Basic SQL Query. Primary and Candidate Keys in SQL
COS 597A: Principles of Database and Information Systems SQL: Overview and highlights The SQL Query Language Structured Query Language Developed by IBM (system R) in the 1970s Need for a standard since
MapReduce examples. CSE 344 section 8 worksheet. May 19, 2011
MapReduce examples CSE 344 section 8 worksheet May 19, 2011 In today s section, we will be covering some more examples of using MapReduce to implement relational queries. Recall how MapReduce works from
Displaying Data from Multiple Tables
Displaying Data from Multiple Tables 1 Objectives After completing this lesson, you should be able to do the following: Write SELECT statements to access data from more than one table using eguality and
Elena Baralis, Silvia Chiusano Politecnico di Torino. Pag. 1. Active database systems. Triggers. Triggers. Active database systems.
Active database systems Database Management Systems Traditional DBMS operation is passive Queries and updates are explicitly requested by users The knowledge of processes operating on data is typically
SQL: Queries, Programming, Triggers
SQL: Queries, Programming, Triggers Chapter 5 Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 1 R1 Example Instances We will use these instances of the Sailors and Reserves relations in
Chapter 9 Joining Data from Multiple Tables. Oracle 10g: SQL
Chapter 9 Joining Data from Multiple Tables Oracle 10g: SQL Objectives Identify a Cartesian join Create an equality join using the WHERE clause Create an equality join using the JOIN keyword Create a non-equality
Example Instances. SQL: Queries, Programming, Triggers. Conceptual Evaluation Strategy. Basic SQL Query. A Note on Range Variables
SQL: Queries, Programming, Triggers Chapter 5 Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 1 Example Instances We will use these instances of the Sailors and Reserves relations in our
People have thought about, and defined, probability in different ways. important to note the consequences of the definition:
PROBABILITY AND LIKELIHOOD, A BRIEF INTRODUCTION IN SUPPORT OF A COURSE ON MOLECULAR EVOLUTION (BIOL 3046) Probability The subject of PROBABILITY is a branch of mathematics dedicated to building models
Displaying Data from Multiple Tables
4 Displaying Data from Multiple Tables Copyright Oracle Corporation, 2001. All rights reserved. Schedule: Timing Topic 55 minutes Lecture 55 minutes Practice 110 minutes Total Objectives After completing
COMP 378 Database Systems Notes for Chapter 7 of Database System Concepts Database Design and the Entity-Relationship Model
COMP 378 Database Systems Notes for Chapter 7 of Database System Concepts Database Design and the Entity-Relationship Model The entity-relationship (E-R) model is a a data model in which information stored
Evaluation of Expressions
Query Optimization Evaluation of Expressions Materialization: one operation at a time, materialize intermediate results for subsequent use Good for all situations Sum of costs of individual operations
SQL: Queries, Programming, Triggers
SQL: Queries, Programming, Triggers CSC343 Introduction to Databases - A. Vaisman 1 R1 Example Instances We will use these instances of the Sailors and Reserves relations in our examples. If the key for
The Relational Model. Why Study the Relational Model? Relational Database: Definitions. Chapter 3
The Relational Model Chapter 3 Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 1 Why Study the Relational Model? Most widely used model. Vendors: IBM, Informix, Microsoft, Oracle, Sybase,
Chapter 13: Query Optimization
Chapter 13: Query Optimization Database System Concepts, 6 th Ed. See www.db-book.com for conditions on re-use Chapter 13: Query Optimization Introduction Transformation of Relational Expressions Catalog
