Views. Lecture 15. Robb T. Koether. Fri, Feb 16, Hampden-Sydney College. Robb T. Koether (Hampden-Sydney College) Views Fri, Feb 16, / 28
|
|
- Laureen Carroll
- 5 years ago
- Views:
Transcription
1 Views Lecture 15 Robb T. Koether Hampden-Sydney College Fri, Feb 16, 2018 Robb T. Koether (Hampden-Sydney College) Views Fri, Feb 16, / 28
2 1 Views 2 Modifying the Base Tables 3 Updating Views 4 Using Triggers to Update Views Robb T. Koether (Hampden-Sydney College) Views Fri, Feb 16, / 28
3 Outline 1 Views 2 Modifying the Base Tables 3 Updating Views 4 Using Triggers to Update Views Robb T. Koether (Hampden-Sydney College) Views Fri, Feb 16, / 28
4 Views A view is a virtual table constructed from physical tables. A view can be used as a table (select, insert, delete, update), but it does not exist as a physical table in the database. It is not the same as a temporary table, which does exist in the database. A query on the view must be interpreted as a query on the base tables from which the query is constructed. At times, this can lead to significant complications. Robb T. Koether (Hampden-Sydney College) Views Fri, Feb 16, / 28
5 Views Views are useful for Constructed tables, such as joins, that are used frequently. For security, to hide information that a user is not authorized to see. Robb T. Koether (Hampden-Sydney College) Views Fri, Feb 16, / 28
6 Creating a View Creating a View CREATE VIEW view_name AS select_statement; The view is defined to be those tuples that are returned by the SELECT statement. Robb T. Koether (Hampden-Sydney College) Views Fri, Feb 16, / 28
7 Creating a View Creating a View CREATE VIEW emp_w_dep AS SELECT fname, lname, ssn, salary, dep_name FROM employees WHERE ssn IN (SELECT ssn FROM dependents) For example, we might want to create a view of those employees who have dependents. Robb T. Koether (Hampden-Sydney College) Views Fri, Feb 16, / 28
8 Creating a View Creating a View SELECT * FROM emp_w_dep; fname lname ssn salary bdate James Green Jennifer Wallace Frank Gilbert Joyce English Richard Johnson John Kohler Raymond Jones Robb T. Koether (Hampden-Sydney College) Views Fri, Feb 16, / 28
9 Views as Tables Views as Tables SHOW TABLES; Tables_in_company departments dependents employees projects emp_w_dep works_on Views are included in the list of tables. We can use SHOW CREATE VIEW to display he details of a view. Robb T. Koether (Hampden-Sydney College) Views Fri, Feb 16, / 28
10 Selecting From a View Selecting From a View SELECT fname, lname FROM emp_w_dep WHERE salary > 50000; fname lname James Green Raymond Jones There is never a problem with selecting from a view. Robb T. Koether (Hampden-Sydney College) Views Fri, Feb 16, / 28
11 Selecting From a View Selecting From a View SELECT fname, lname, dep_name FROM emp_w_dep NATURAL JOIN dependents; fname lname dep_name James Green Debbie James Green Sarah Jennifer Wallace Fred Jennifer Wallace Jimmy Jennifer Wallace Susie Frank Gilbert Laura Frank Gilbert Rachel Joyce English Bobby Richard Johnson Patty John Kohler Sharon Raymond Jones Donna There is never a problem with selecting from a view. Robb T. Koether (Hampden-Sydney College) Views Fri, Feb 16, / 28
12 A View with Two Base Tables A View with Two Base Tables CREATE VIEW emp_and_dep AS SELECT fname, lname, ssn, salary, dep_name FROM employees NATURAL JOIN dependents; We can create a view from more than one base table joined together. Robb T. Koether (Hampden-Sydney College) Views Fri, Feb 16, / 28
13 A View with Two Base Tables A View with Two Base Tables CREATE VIEW emp_and_dep AS SELECT fname, lname, ssn, salary, dep_name FROM employees NATURAL JOIN dependents; We can create a view from more than one base table joined together. Other than the particular fields included, how would the contents of this view differ from the contents of emp_w_dep? Robb T. Koether (Hampden-Sydney College) Views Fri, Feb 16, / 28
14 A View with Two Base Tables A View with Two Base Tables SELECT * FROM emp_and_dep; fname lname ssn salary dep_name James Green Debbie James Green Sarah Jennifer Wallace Fred Jennifer Wallace Jimmy Jennifer Wallace Susie Frank Gilbert Laura Frank Gilbert Rachel Joyce English Bobby Richard Johnson Patty John Kohler Sharon Raymond Jones Donna Each employee appears once for each dependent. Robb T. Koether (Hampden-Sydney College) Views Fri, Feb 16, / 28
15 Outline 1 Views 2 Modifying the Base Tables 3 Updating Views 4 Using Triggers to Update Views Robb T. Koether (Hampden-Sydney College) Views Fri, Feb 16, / 28
16 Selecting From a View Modifying the Base Tables UPDATE employees SET fname = Michael WHERE fname = Frank ; SELECT * FROM emp_w_dep; fname lname ssn salary bdate James Green Jennifer Wallace Michael Gilbert Joyce English Richard Johnson John Kohler Raymond Jones If the base tables are changed, then the view will change automatically. Robb T. Koether (Hampden-Sydney College) Views Fri, Feb 16, / 28
17 Selecting From a View Modifying the Base Tables UPDATE dependents SET dep_name = "Mary" WHERE dep_name = "Patty"; SELECT * FROM emp_and_dep; fname lname ssn salary dep_name James Green Debbie James Green Sarah Jennifer Wallace Fred Jennifer Wallace Jimmy Jennifer Wallace Susie Frank Gilbert Laura Frank Gilbert Rachel Joyce English Bobby Richard Johnson Mary John Kohler Sharon Raymond Jones Donna If the base tables are changed, then the view will change automatically. Robb T. Koether (Hampden-Sydney College) Views Fri, Feb 16, / 28
18 Outline 1 Views 2 Modifying the Base Tables 3 Updating Views 4 Using Triggers to Update Views Robb T. Koether (Hampden-Sydney College) Views Fri, Feb 16, / 28
19 Updating Views What happens to the base tables if we modify the view? In the previous example, What happens if we insert the tuple ( Brian, Jacobson, , , ) into emp_w_dep? What happens if we update that tuple? What happens if we delete that tuple? Robb T. Koether (Hampden-Sydney College) Views Fri, Feb 16, / 28
20 Updating Views Updating a View INSERT INTO emp_w_dep VALUES( Brian, Jacobson, , , ); Query OK, 1 row affected, 1 warning (0.00 sec) SHOW WARNINGS; Level Code Message Warning 1423 Field of view company.emp_w_dep underlying table doesn t have a default value SELECT * FROM employees WHERE ssn = ; fname lname ssn bdate sex salary dept Brian Jacobson NULL Also, update and delete the tuple. In general insertions, deletions, and updates are permitted provided they affect only one base table. Robb T. Koether (Hampden-Sydney College) Views Fri, Feb 16, / 28
21 Updating Views The emp_w_dep view is based on only one table (or was it?). What would happen if we added or deleted dependents? Robb T. Koether (Hampden-Sydney College) Views Fri, Feb 16, / 28
22 Updating Views Inserting Into a Base Table INSERT INTO dependents VALUES( , Tiffany, F, ); SELECT * FROM emp_w_dep; fname lname ssn salary bdate Alice Smith James Green Jennifer Wallace Michael Gilbert Joyce English Richard Johnson John Kohler Raymond Jones Robb T. Koether (Hampden-Sydney College) Views Fri, Feb 16, / 28
23 Updating Views Deleting From a Base Table DELETE FROM dependents WHERE ssn = ; SELECT * FROM emp_w_dep; fname lname ssn salary bdate James Green Jennifer Wallace Michael Gilbert Joyce English Richard Johnson John Kohler Raymond Jones Robb T. Koether (Hampden-Sydney College) Views Fri, Feb 16, / 28
24 Views and Joins Updating views is more difficult when the view is based on more than one table. Robb T. Koether (Hampden-Sydney College) Views Fri, Feb 16, / 28
25 Views and Joins Creating a View CREATE VIEW emp_hrs AS SELECT fname, lname, proj_name, hours FROM employees NATURAL JOIN works_on; NATURAL JOIN projects This view is based on the join of three tables. Robb T. Koether (Hampden-Sydney College) Views Fri, Feb 16, / 28
26 Views and Joins Creating a View CREATE VIEW emp_hrs AS SELECT fname, lname, proj_name, hours FROM employees NATURAL JOIN works_on; NATURAL JOIN projects This view is based on the join of three tables. Uh-oh. Robb T. Koether (Hampden-Sydney College) Views Fri, Feb 16, / 28
27 Views and Joins Creating a View SELECT * FROM emp_hrs; fname lname proj_name hours Alice Smith Payroll 40.0 John Kohler Payroll 40.0 Raymond Jones Payroll 20.0 Jennifer Wallace Investment 40.0 Ernest Roth Investment 40.0 Raymond Jones Investment 20.0 Barbara Brown Clothing 20.0 Michael Gilbert Clothing 40.0 Joyce English Clothing 20.0 Amy Ford Clothing 30.0 Barbara Brown Office Supplies 10.0 Joyce English Office Supplies 20.0 Amy Ford Office Supplies 10.0 Barbara Brown Housewares 10.0 Richard Johnson Housewares Robb T. Koether (Hampden-Sydney College) Views Fri, Feb 16, / 28
28 Inserting Into a View Inserting Into a View INSERT INTO emp_hrs VALUES( Jason, Simpson, Clothing, 25.0); ERROR 1394 (HY000): Can not insert into join view company.emp_hrs without fields list INSERT INTO emp_hrs(fname, lname, proj_name, hours) VALUES( Jason, Simpson, Clothing, 25.0); ERROR 1393 (HY000): Can not modify more than one base table through a join view company.emp_hrs Try to insert into the view. Try updating or deleting. Robb T. Koether (Hampden-Sydney College) Views Fri, Feb 16, / 28
29 Outline 1 Views 2 Modifying the Base Tables 3 Updating Views 4 Using Triggers to Update Views Robb T. Koether (Hampden-Sydney College) Views Fri, Feb 16, / 28
30 Inserting Into a View Inserting Into a View CREATE TRIGGER add_emp_dep AFTER INSERT ON emp_w_dep FOR EACH ROW INSERT INTO dependents VALUES(NEW.ssn,, null, null); ERROR 1347 (HY000): company.emp_w_dep is not BASE TABLE Normally, modifying a view would have been handled by triggers that modify the base tables in the appropriate way. Unfortunately, MySQL does not support triggers on views. Robb T. Koether (Hampden-Sydney College) Views Fri, Feb 16, / 28
Views. Lecture 15 Section 5.3. Robb T. Koether. Hampden-Sydney College. Mon, Feb 18, 2013
Views Lecture 15 Section 5.3 Robb T. Koether Hampden-Sydney College Mon, Feb 18, 2013 Robb T. Koether (Hampden-Sydney College) Views Mon, Feb 18, 2013 1 / 27 1 Views 2 Modifying the Base Tables 3 Updating
More informationViews. Lecture 15 Section 5.3. Robb T. Koether. Hampden-Sydney College. Mon, Feb 18, 2013
Views Lecture 15 Section 5.3 Robb T. Koether Hampden-Sydney College Mon, Feb 18, 2013 Robb T. Koether (Hampden-Sydney College) Views Mon, Feb 18, 2013 1 / 22 1 Views 2 Modifying the Base Tables 3 Updating
More informationSelections. Lecture 4 Sections Robb T. Koether. Hampden-Sydney College. Wed, Jan 22, 2014
Selections Lecture 4 Sections 4.2-4.3 Robb T. Koether Hampden-Sydney College Wed, Jan 22, 2014 Robb T. Koether (Hampden-Sydney College) Selections Wed, Jan 22, 2014 1 / 38 1 Datatypes 2 Constraints 3 Storage
More informationRelational Databases
Relational Databases Lecture 2 Chapter 3 Robb T. Koether Hampden-Sydney College Fri, Jan 18, 2013 Robb T. Koether (Hampden-Sydney College) Relational Databases Fri, Jan 18, 2013 1 / 26 1 Types of Databases
More informationInsertions, Deletions, and Updates
Insertions, Deletions, and Updates Lecture 5 Robb T. Koether Hampden-Sydney College Wed, Jan 24, 2018 Robb T. Koether (Hampden-Sydney College) Insertions, Deletions, and Updates Wed, Jan 24, 2018 1 / 17
More informationAggregation. Lecture 7 Section Robb T. Koether. Hampden-Sydney College. Wed, Jan 29, 2014
Aggregation Lecture 7 Section 5.1.7-5.1.8 Robb T. Koether Hampden-Sydney College Wed, Jan 29, 2014 Robb T. Koether (Hampden-Sydney College) Aggregation Wed, Jan 29, 2014 1 / 17 1 Aggregate Functions 2
More informationPHP Queries and HTML Forms Lecture 23
PHP Queries and HTML Forms Lecture 23 Robb T. Koether Hampden-Sydney College Wed, Mar 14, 2018 Robb T. Koether (Hampden-Sydney College) PHP Queries and HTML FormsLecture 23 Wed, Mar 14, 2018 1 / 15 1 Retrieving
More informationPHP Querying. Lecture 21. Robb T. Koether. Hampden-Sydney College. Fri, Mar 2, 2018
PHP Querying Lecture 21 Robb T. Koether Hampden-Sydney College Fri, Mar 2, 2018 Robb T. Koether (Hampden-Sydney College) PHP Querying Fri, Mar 2, 2018 1 / 32 1 Connect to the Database 2 Querying the Database
More informationRelational Algebra Part I. CS 377: Database Systems
Relational Algebra Part I CS 377: Database Systems Recap of Last Week ER Model: Design good conceptual models to store information Relational Model: Table representation with structures and constraints
More informationFunctional Dependencies and Normal Forms
Functional Dependencies and Normal Forms Lecture 9 Sections 15.1-15.4 Robb T. Koether Hampden-Sydney College Mon, Feb 3, 2014 Robb T. Koether (Hampden-Sydney College) Functional Dependencies and Normal
More informationBasic PHP. Lecture 19. Robb T. Koether. Hampden-Sydney College. Mon, Feb 26, 2108
Basic PHP Lecture 19 Robb T. Koether Hampden-Sydney College Mon, Feb 26, 2108 Robb T. Koether (Hampden-Sydney College) Basic PHP Mon, Feb 26, 2108 1 / 27 1 PHP 2 The echo Statement 3 Variables 4 Operators
More informationRelational Algebra & Calculus. CS 377: Database Systems
Relational Algebra & Calculus CS 377: Database Systems Quiz #1 Question: What is metadata and why is it important? Answer: Metadata is information about the data such as name, type, size. It is important
More informationXPath Lecture 34. Robb T. Koether. Hampden-Sydney College. Wed, Apr 11, 2012
XPath Lecture 34 Robb T. Koether Hampden-Sydney College Wed, Apr 11, 2012 Robb T. Koether (Hampden-Sydney College) XPathLecture 34 Wed, Apr 11, 2012 1 / 20 1 XPath Functions 2 Predicates 3 Axes Robb T.
More informationTriggers. Lecture 14. Robb T. Koether. Hampden-Sydney College. Wed, Feb 14, 2018
Triggers Lecture 14 Robb T. Koether Hampden-Sydney College Wed, Feb 14, 2018 Robb T. Koether (Hampden-Sydney College) Triggers Wed, Feb 14, 2018 1 / 22 1 Triggers 2 Cascading Triggers 3 Update and Insert
More informationFunctional Dependencies and Normal Forms
Functional Dependencies and Normal Forms Lecture 9 Sections 15.1-15.4 Robb T. Koether Hampden-Sydney College Mon, Feb 4, 2013 Robb T. Koether (Hampden-Sydney College) Functional Dependencies and Normal
More informationXQuery FLOWR Expressions Lecture 35
XQuery FLOWR Expressions Lecture 35 Robb T. Koether Hampden-Sydney College Fri, Apr 13, 2012 Robb T. Koether (Hampden-Sydney College) XQuery FLOWR ExpressionsLecture 35 Fri, Apr 13, 2012 1 / 33 1 XQuery
More informationPart 1 on Table Function
CIS611 Lab Assignment 1 SS Chung 1. Write Table Functions 2. Automatic Creation and Maintenance of Database from Web Interface 3. Transforming a SQL Query into an Execution Plan in Relational Algebra for
More informationLR Parsing - Conflicts
LR Parsing - Conflicts Lecture 15 Sections 4.5, 4.6 Robb T. Koether Hampden-Sydney College Fri, Feb 20, 2015 Robb T. Koether (Hampden-Sydney College) LR Parsing - Conflicts Fri, Feb 20, 2015 1 / 15 1 Shift/Reduce
More informationThe Critical-Path Algorithm
The Critical-Path Algorithm Lecture 32 Sections 8.3-8.4 Robb T. Koether Hampden-Sydney College Wed, Nov 19, 2014 Robb T. Koether (Hampden-Sydney College) The Critical-Path Algorithm Wed, Nov 19, 2014 1
More informationCIS611 Lab Assignment 1 SS Chung
CIS611 Lab Assignment 1 SS Chung 1. Creating a Relational Database Schema from ER Diagram, Populating the Database and Querying Over the database with SQL 2. Automatic Creation and Maintenance of Database
More informationFriends and Unary Operators
Friends and Unary Operators Lecture 11 Sections 11.3, 11.6 Robb T. Koether Hampden-Sydney College Fri, Feb 13, 2015 Robb T. Koether (Hampden-Sydney College) Friends and Unary Operators Fri, Feb 13, 2015
More informationMinimal Spanning Trees
Minimal Spanning Trees Lecture 33 Sections 7.1-7.3 Robb T. Koether Hampden-Sydney College Wed, Apr 11, 20 Robb T. Koether (Hampden-Sydney College) Minimal Spanning Trees Wed, Apr 11, 20 1 / 17 1 Networks
More informationRelational Databases Lecture 2
Relational Databases Lecture 2 Robb T Koether Hampden-Sydney College Fri, Jan 20, 2012 Robb T Koether (Hampden-Sydney College) Relational DatabasesLecture 2 Fri, Jan 20, 2012 1 / 36 1 Databases Systems
More informationRelational Calculus: 1
CSC 742 Database Management Systems Topic #8: Relational Calculus Spring 2002 CSC 742: DBMS by Dr. Peng Ning 1 Relational Calculus: 1 Can define the information to be retrieved not any specific series
More informationSolving Recursive Sequences by Iteration
Solving Recursive Sequences by Iteration Lecture 25 Section 5.7 Robb T. Koether Hampden-Sydney College Thu, Feb 28, 2013 Robb T. Koether (Hampden-Sydney College) Solving Recursive Sequences by Iteration
More informationMySQL Creating a Database Lecture 3
MySQL Creating a Database Lecture 3 Robb T Koether Hampden-Sydney College Mon, Jan 23, 2012 Robb T Koether (Hampden-Sydney College) MySQL Creating a DatabaseLecture 3 Mon, Jan 23, 2012 1 / 31 1 Multiple
More informationXPath. Lecture 36. Robb T. Koether. Wed, Apr 16, Hampden-Sydney College. Robb T. Koether (Hampden-Sydney College) XPath Wed, Apr 16, / 28
XPath Lecture 36 Robb T. Koether Hampden-Sydney College Wed, Apr 16, 2014 Robb T. Koether (Hampden-Sydney College) XPath Wed, Apr 16, 2014 1 / 28 1 XPath 2 Executing XPath Expressions 3 XPath Expressions
More informationThe Traveling Salesman Problem Brute Force Method
The Traveling Salesman Problem Brute Force Method Lecture 30 Sections 6.1, 6.3 Robb T. Koether Hampden-Sydney College Fri, Nov 3, 2017 Robb T. Koether (Hampden-Sydney College)The Traveling Salesman Problem
More informationOperators. Lecture 12 Section Robb T. Koether. Hampden-Sydney College. Fri, Feb 9, 2018
Operators Lecture 12 Section 14.5 Robb T. Koether Hampden-Sydney College Fri, Feb 9, 2018 Robb T. Koether (Hampden-Sydney College) Operators Fri, Feb 9, 2018 1 / 21 Outline 1 Operators as Functions 2 Operator
More informationKINGDOM OF SAUDI ARABIA-JAZAN UNIVERSITY COLLEGE OF COMPUTER SCIENCE & INFORMATION SYSTEMS 221 INFS 3 DATABASE SYSTEMS-1 REVIEW QUESTIONS
KINGDOM OF SAUDI ARABIA-JAZAN UNIVERSITY COLLEGE OF COMPUTER SCIENCE & INFORMATION SYSTEMS 221 INFS 3 DATABASE SYSTEMS-1 REVIEW QUESTIONS Chapter 1: Databases and Database Users 1. Define the following
More informationIntroduction to Databases
Introduction to Databases Lecture 1 Chapters 1-2 Robb T. Koether Hampden-Sydney College Wed, Jan 15, 2014 Robb T. Koether (Hampden-Sydney College) Introduction to Databases Wed, Jan 15, 2014 1 / 23 1 Overview
More informationRecursive Sequences. Lecture 24 Section 5.6. Robb T. Koether. Hampden-Sydney College. Wed, Feb 27, 2013
Recursive Sequences Lecture 24 Section 5.6 Robb T. Koether Hampden-Sydney College Wed, Feb 27, 2013 Robb T. Koether (Hampden-Sydney College) Recursive Sequences Wed, Feb 27, 2013 1 / 21 1 Recursive Sequences
More informationRecursive Sequences. Lecture 24 Section 5.6. Robb T. Koether. Hampden-Sydney College. Wed, Feb 26, 2014
Recursive Sequences Lecture 24 Section 5.6 Robb T. Koether Hampden-Sydney College Wed, Feb 26, 2014 Robb T. Koether (Hampden-Sydney College) Recursive Sequences Wed, Feb 26, 2014 1 / 26 1 Recursive Sequences
More informationThe Traveling Salesman Problem Nearest-Neighbor Algorithm
The Traveling Salesman Problem Nearest-Neighbor Algorithm Lecture 31 Sections 6.4 Robb T. Koether Hampden-Sydney College Fri, Apr 6, 2018 Robb T. Koether (Hampden-Sydney College)The Traveling Salesman
More informationThe Class Construct Part 1
The Class Construct Part 1 Lecture 23 Sections 7.5-7.6 Robb T. Koether Hampden-Sydney College Fri, Oct 26, 2018 Robb T. Koether (Hampden-Sydney College) The Class Construct Part 1 Fri, Oct 26, 2018 1 /
More informationSome different database system architectures. (a) Shared nothing architecture.
Figure.1 Some different database system architectures. (a) Shared nothing architecture. Computer System 1 Computer System CPU DB CPU DB MEMORY MEMORY Switch Computer System n CPU DB MEMORY Figure.1 continued.
More informationThe Plurality-with-Elimination Method
The Plurality-with-Elimination Method Lecture 9 Section 1.4 Robb T. Koether Hampden-Sydney College Fri, Sep 8, 2017 Robb T. Koether (Hampden-Sydney College) The Plurality-with-Elimination Method Fri, Sep
More informationMagnification and Minification
Magnification and Minification Lecture 30 Robb T. Koether Hampden-Sydney College Fri, Nov 6, 2015 Robb T. Koether (Hampden-Sydney College) Magnification and Minification Fri, Nov 6, 2015 1 / 17 Outline
More informationIntroduction to Databases
Introduction to Databases Lecture 1 Robb T. Koether Hampden-Sydney College Mon, Jan 15, 2018 Robb T. Koether (Hampden-Sydney College) Introduction to Databases Mon, Jan 15, 2018 1 / 16 1 Overview of the
More informationScope and Parameter Passing
Scope and Parameter Passing Lecture 17 Sections 6.5, 6.10, 6.13 Robb T. Koether Hampden-Sydney College Fri, Oct 5, 2018 Robb T. Koether (Hampden-Sydney College) Scope and Parameter Passing Fri, Oct 5,
More informationWebpage Navigation. Lecture 27. Robb T. Koether. Hampden-Sydney College. Mon, Apr 2, 2018
Webpage Navigation Lecture 27 Robb T. Koether Hampden-Sydney College Mon, Apr 2, 2018 Robb T. Koether (Hampden-Sydney College) Webpage Navigation Mon, Apr 2, 2018 1 / 16 1 Popup Boxes 2 The Document Object
More informationDatabase design process
Database technology Lecture 2: Relational databases and SQL Jose M. Peña jose.m.pena@liu.se Database design process 1 Relational model concepts... Attributes... EMPLOYEE FNAME M LNAME SSN BDATE ADDRESS
More informationScheduling and Digraphs
Scheduling and Digraphs Lecture 35 Sections 8.1, 8.2 Robb T. Koether Hampden-Sydney College Mon, Nov 21, 2016 Robb T. Koether (Hampden-Sydney College) Scheduling and Digraphs Mon, Nov 21, 2016 1 / 25 1
More informationThe Decreasing-Time Algorithm
The Decreasing-Time Algorithm Lecture 36 Sections 8.4 Robb T. Koether Hampden-Sydney College Wed, Apr 18, 2018 Robb T. Koether (Hampden-Sydney College) The Decreasing-Time Algorithm Wed, Apr 18, 2018 1
More informationThe Pairwise-Comparison Method
The Pairwise-Comparison Method Lecture 10 Section 1.5 Robb T. Koether Hampden-Sydney College Mon, Sep 11, 2017 Robb T. Koether (Hampden-Sydney College) The Pairwise-Comparison Method Mon, Sep 11, 2017
More informationCS430 Final March 14, 2005
Name: W#: CS430 Final March 14, 2005 Write your answers in the space provided. Use the back of the page if you need more space. Values of questions are as indicated. 1. (4 points) What are the four ACID
More informationSession Active Databases (2+3 of 3)
INFO-H-415 - Advanced Databes Session 2+3 - Active Databes (2+3 of 3) Consider the following databe schema: DeptLocation DNumber DLocation Employee FName MInit LName SSN BDate Address Sex Salary SuperSSN
More informationCOSC344 Database Theory and Applications. COSC344 Lecture 15 1
COSC344 Database Theory and Applications Lecture 15 Views & NULL COSC344 Lecture 15 1 Lecture Schedule Lecture 15 Views and Null Lecture 16 DBMS Architecture and System Catalog Lecture 17 Transactions
More informationwhile Loops Lecture 13 Sections Robb T. Koether Wed, Sep 26, 2018 Hampden-Sydney College
while Loops Lecture 13 Sections 5.8-5.9 Robb T. Koether Hampden-Sydney College Wed, Sep 26, 2018 Robb T. Koether (Hampden-Sydney College) while Loops Wed, Sep 26, 2018 1 / 25 1 while Loops 2 Input Loops
More informationStack Applications. Lecture 27 Sections Robb T. Koether. Hampden-Sydney College. Wed, Mar 29, 2017
Stack Applications Lecture 27 Sections 18.7-18.8 Robb T. Koether Hampden-Sydney College Wed, Mar 29, 2017 Robb T. Koether Hampden-Sydney College) Stack Applications Wed, Mar 29, 2017 1 / 27 1 Function
More informationThe Relational Algebra
Querying a Relational Database So far we have seen how to design a relational database and now we turn to mechanisms to interrogate a database We wish to extract from the database a subset of the information
More informationProgramming Languages
Programming Languages Lecture 3 Robb T. Koether Hampden-Sydney College Fri, Aug 31, 2018 Robb T. Koether (Hampden-Sydney College) Programming Languages Fri, Aug 31, 2018 1 / 23 1 Programming Languages
More informationLinked Lists. Lecture 16 Sections Robb T. Koether. Hampden-Sydney College. Wed, Feb 22, 2017
Linked Lists Lecture 16 Sections 17.1-17.3 Robb T. Koether Hampden-Sydney College Wed, Feb 22, 2017 Robb T. Koether (Hampden-Sydney College) Linked Lists Wed, Feb 22, 2017 1 / 24 1 Linked Lists 2 The LinkedListNode
More informationBoxplots. Lecture 17 Section Robb T. Koether. Hampden-Sydney College. Wed, Feb 10, 2010
Boxplots Lecture 17 Section 5.3.3 Robb T. Koether Hampden-Sydney College Wed, Feb 10, 2010 Robb T. Koether (Hampden-Sydney College) Boxplots Wed, Feb 10, 2010 1 / 34 Outline 1 Boxplots TI-83 Boxplots 2
More informationSampling Distribution Examples Sections 15.4, 15.5
Sampling Distribution Examples Sections 15.4, 15.5 Lecture 27 Robb T. Koether Hampden-Sydney College Wed, Mar 2, 2016 Robb T. Koether (Hampden-Sydney College)Sampling Distribution ExamplesSections 15.4,
More informationImplementing Linked Lists
Implementing Linked Lists Lecture 16 Sections 17.1-17.3 Robb T. Koether Hampden-Sydney College Wed, Feb 27, 2013 Robb T. Koether (Hampden-Sydney College) Implementing Linked Lists Wed, Feb 27, 2013 1 /
More informationThe string Class. Lecture 21 Sections 2.9, 3.9, Robb T. Koether. Wed, Oct 17, Hampden-Sydney College
The string Class Lecture 21 Sections 2.9, 3.9, 3.10 Robb T. Koether Hampden-Sydney College Wed, Oct 17, 2018 Robb T. Koether (Hampden-Sydney College) The string Class Wed, Oct 17, 2018 1 / 18 1 The String
More informationRotations and Translations
Rotations and Translations Lecture 33 Sections 11.3-11.4 Robb T. Koether Hampden-Sydney College Wed, Nov 20, 2013 Robb T. Koether (Hampden-Sydney College) Rotations and Translations Wed, Nov 20, 2013 1
More informationLR Parsing - The Items
LR Parsing - The Items Lecture 10 Sections 4.5, 4.7 Robb T. Koether Hampden-Sydney College Fri, Feb 13, 2015 Robb T. Koether (Hampden-Sydney College) LR Parsing - The Items Fri, Feb 13, 2015 1 / 31 1 LR
More informationThe Graphics Pipeline
The Graphics Pipeline Lecture 2 Robb T. Koether Hampden-Sydney College Fri, Aug 28, 2015 Robb T. Koether (Hampden-Sydney College) The Graphics Pipeline Fri, Aug 28, 2015 1 / 19 Outline 1 Vertices 2 The
More informationScope and Parameter Passing
Scope and Parameter Passing Lecture 16 Sections 6.5, 6.10, 6.13 Robb T. Koether Hampden-Sydney College Mon, Oct 7, 2013 Robb T. Koether (Hampden-Sydney College) Scope and Parameter Passing Mon, Oct 7,
More informationWhat is an algebra? A formal system of manipulation of symbols to deal with general statements of relations.
Lecture 4. Relational Algebra By now, we know that (a) All data in a relational DB is stored in tables (b) there are several tables in each DB (because of Normalization), and (c) often the information
More informationQuery 2: Pnumber Dnum Lname Address Bdate 10 4 Wallace 291 Berry, Bellaire, TX Wallace 291 Berry, Bellaire, TX
5.11 No violation, integrity is retained. Dnum = 2 does not exist. This can be solved by adding a foreign key referencing the department table, so the operation does not execute. Dnum = 4 already exists,
More informationPointers. Lecture 2 Sections Robb T. Koether. Hampden-Sydney College. Fri, Jan 18, 2013
Pointers Lecture 2 Sections 10.3-10.8 Robb T. Koether Hampden-Sydney College Fri, Jan 18, 2013 Robb T. Koether (Hampden-Sydney College) Pointers Fri, Jan 18, 2013 1 / 35 1 Introduction 2 Pointer Arithmetic
More informationDTDs and XML Attributes
DTDs and XML Attributes Lecture 33 Robb T. Koether Hampden-Sydney College Mon, Apr 8, 2013 Robb T. Koether (Hampden-Sydney College) DTDs and XML Attributes Mon, Apr 8, 2013 1 / 21 1 Attribute Definitions
More informationForm Validation. Lecture 25. Robb T. Koether. Hampden-Sydney College. Wed, Mar 23, 2018
Form Validation Lecture 25 Robb T. Koether Hampden-Sydney College Wed, Mar 23, 2018 Robb T. Koether (Hampden-Sydney College) Form Validation Wed, Mar 23, 2018 1 / 16 1 Form Validation 2 Detecting Javascript
More informationList Iterator Implementation
List Iterator Implementation Lecture 28 Section 14.6 Robb T. Koether Hampden-Sydney College Fri, Apr 10, 2015 Robb T. Koether (Hampden-Sydney College) List Iterator Implementation Fri, Apr 10, 2015 1 /
More informationECE 650 Systems Programming & Engineering. Spring 2018
ECE 650 Systems Programming & Engineering Spring 2018 Relational Databases: Tuples, Tables, Schemas, Relational Algebra Tyler Bletsch Duke University Slides are adapted from Brian Rogers (Duke) Overview
More informationRelational Algebra 1
Relational Algebra 1 Motivation The relational data model provides a means of defining the database structure and constraints NAME SALARY ADDRESS DEPT Smith 50k St. Lucia Printing Dilbert 40k Taringa Printing
More informationArray Lists. Lecture 15. Robb T. Koether. Hampden-Sydney College. Fri, Feb 16, 2018
Array Lists Lecture 15 Robb T. Koether Hampden-Sydney College Fri, Feb 16, 2018 Robb T. Koether (Hampden-Sydney College) Array Lists Fri, Feb 16, 2018 1 / 21 1 Inlining Functions 2 List Implementations
More informationXML and AJAX Lecture 28
XML and AJAX Lecture 28 Robb T. Koether Hampden-Sydney College Wed, Mar 28, 2012 Robb T. Koether (Hampden-Sydney College) XML and AJAXLecture 28 Wed, Mar 28, 2012 1 / 29 1 Navigating the XML Tree 2 The
More informationChapter 6 - Part II The Relational Algebra and Calculus
Chapter 6 - Part II The Relational Algebra and Calculus Copyright 2004 Ramez Elmasri and Shamkant Navathe Division operation DIVISION Operation The division operation is applied to two relations R(Z) S(X),
More informationDisplaying Distributions - Quantitative Variables
Displaying Distributions - Quantitative Variables Lecture 13 Sections 4.4.1-4.4.3 Robb T. Koether Hampden-Sydney College Wed, Feb 8, 2012 Robb T. Koether (Hampden-Sydney College)Displaying Distributions
More informationDatabase Technology. Topic 3: SQL. Olaf Hartig.
Olaf Hartig olaf.hartig@liu.se Structured Query Language Declarative language (what data to get, not how) Considered one of the major reasons for the commercial success of relational databases Statements
More informationRecursive Descent Parsers
Recursive Descent Parsers Lecture 7 Robb T. Koether Hampden-Sydney College Wed, Jan 28, 2015 Robb T. Koether (Hampden-Sydney College) Recursive Descent Parsers Wed, Jan 28, 2015 1 / 18 1 Parsing 2 LL Parsers
More informationThe CYK Parsing Algorithm
The CYK Parsing Algorithm Lecture 19 Section 6.3 Robb T. Koether Hampden-Sydney College Fri, Oct 7, 2016 Robb T. Koether (Hampden-Sydney College) The CYK Parsing Algorithm Fri, Oct 7, 2016 1 / 21 1 The
More informationDatabase Systems ER Model. A.R. Hurson 323 CS Building
ER Model A.R. Hurson 323 CS Building Database Design Data model is a group of concepts that helps to specify the structure of a database and a set of associated operations allowing data retrieval and data
More informationThe Coefficient of Determination
The Coefficient of Determination Lecture 46 Section 13.9 Robb T. Koether Hampden-Sydney College Wed, Apr 17, 2012 Robb T. Koether (Hampden-Sydney College) The Coefficient of Determination Wed, Apr 17,
More informationRecursive Linked Lists
Recursive Linked Lists Lecture 28 Sections 14.1-14.5, 14.7 Robb T. Koether Hampden-Sydney College Fri, Mar 31, 2017 Robb T. Koether (Hampden-Sydney College) Recursive Linked Lists Fri, Mar 31, 2017 1 /
More informationCOSC344 Database Theory and Applications. Lecture 6 SQL Data Manipulation Language (1)
COSC344 Database Theory and Applications Lecture 6 SQL Data Manipulation Language (1) COSC344 Lecture 56 1 Overview Last Lecture SQL - DDL This Lecture SQL - DML INSERT DELETE (simple) UPDATE (simple)
More informationMipmaps. Lecture 35. Robb T. Koether. Hampden-Sydney College. Wed, Nov 18, 2015
Mipmaps Lecture 35 Robb T. Koether Hampden-Sydney College Wed, Nov 18, 2015 Robb T. Koether (Hampden-Sydney College) Mipmaps Wed, Nov 18, 2015 1 / 31 Outline 1 Discrete Sampling 2 Mipmaps 3 Generating
More informationPointer Arithmetic. Lecture 4 Chapter 10. Robb T. Koether. Hampden-Sydney College. Wed, Jan 25, 2017
Pointer Arithmetic Lecture 4 Chapter 10 Robb T. Koether Hampden-Sydney College Wed, Jan 25, 2017 Robb T. Koether (Hampden-Sydney College) Pointer Arithmetic Wed, Jan 25, 2017 1 / 36 1 Pointer Arithmetic
More informationTotal Orders. Lecture 41 Section 8.5. Robb T. Koether. Hampden-Sydney College. Mon, Apr 8, 2013
Total Orders Lecture 41 Section 8.5 Robb T. Koether Hampden-Sydney College Mon, Apr 8, 2013 Robb T. Koether (Hampden-Sydney College) Total Orders Mon, Apr 8, 2013 1 / 30 1 Total Orders 2 Topological Sorting
More informationDensity Curves Sections
Density Curves Sections 3.1-3.2 Lecture 8 Robb T. Koether Hampden-Sydney College Wed, Jan 27, 2016 Robb T. Koether (Hampden-Sydney College) Density CurvesSections 3.1-3.2 Wed, Jan 27, 2016 1 / 18 Outline
More informationThe x86 Architecture
The x86 Architecture Lecture 24 Intel Manual, Vol. 1, Chapter 3 Robb T. Koether Hampden-Sydney College Fri, Mar 20, 2015 Robb T. Koether (Hampden-Sydney College) The x86 Architecture Fri, Mar 20, 2015
More informationBasic PHP Lecture 17
Basic PHP Lecture 17 Robb T. Koether Hampden-Sydney College Fri, Feb 24, 2012 Robb T. Koether (Hampden-Sydney College) Basic PHPLecture 17 Fri, Feb 24, 2012 1 / 30 1 PHP 2 Basic PHP 3 The Extended echo
More informationFunction Definition Syntax Tree
Function Definition Syntax Tree Lecture 34 Section 6.9 Robb T. Koether Hampden-Sydney College Wed, Apr 15, 2015 Robb T. Koether (Hampden-Sydney College) Function Definition Syntax Tree Wed, Apr 15, 2015
More informationBoolean Expressions. Lecture 31 Sections 6.6, 6.7. Robb T. Koether. Hampden-Sydney College. Wed, Apr 8, 2015
Boolean Expressions Lecture 31 Sections 6.6, 6.7 Robb T. Koether Hampden-Sydney College Wed, Apr 8, 2015 Robb T. Koether (Hampden-Sydney College) Boolean Expressions Wed, Apr 8, 2015 1 / 22 1 Relational
More informationProgramming Languages
Programming Languages Lecture 3 Section 1.3 Robb T. Koether Hampden-Sydney College Mon, Sep 2, 2013 Robb T. Koether (Hampden-Sydney College) Programming Languages Mon, Sep 2, 2013 1 / 25 1 Programming
More informationDatabase Technology. Topic 2: Relational Databases and SQL. Olaf Hartig.
Topic 2: Relational Databases and SQL Olaf Hartig olaf.hartig@liu.se Relational Data Model Recall: DB Design Process 3 Relational Model Concepts Relational database: represent data as a collection of relations
More informationStreet-Routing Problems
Street-Routing Problems Lecture 26 Sections 5.1-5.2 Robb T. Koether Hampden-Sydney College Wed, Oct 25, 2017 Robb T. Koether (Hampden-Sydney College) Street-Routing Problems Wed, Oct 25, 2017 1 / 21 1
More informationCourse Notes on Relational Algebra
Course Notes on Relational Algebra What is the Relational Algebra? Relational Algebra: Summary Operators Selection Projection Union, Intersection, Difference Cartesian Product Join Division Equivalences
More informationPointers. Lecture 1 Sections Robb T. Koether. Hampden-Sydney College. Wed, Jan 14, 2015
Pointers Lecture 1 Sections 10.1-10.2 Robb T. Koether Hampden-Sydney College Wed, Jan 14, 2015 Robb T. Koether (Hampden-Sydney College) Pointers Wed, Jan 14, 2015 1 / 23 1 Pointers 2 Pointer Initialization
More informationBuilding the Abstract Syntax Trees
Building the Abstract Syntax Trees Lecture 23 Section 5.3 Robb T. Koether Hampden-Sydney College Wed, Mar 18, 2015 Robb T. Koether (Hampden-Sydney College) Building the Abstract Syntax Trees Wed, Mar 18,
More informationCOSC344 Database Theory and Applications. σ a= c (P) S. Lecture 4 Relational algebra. π A, P X Q. COSC344 Lecture 4 1
COSC344 Database Theory and Applications σ a= c (P) S π A, C (H) P P X Q Lecture 4 Relational algebra COSC344 Lecture 4 1 Overview Last Lecture Relational Model This Lecture ER to Relational mapping Relational
More informationDynamic Allocation of Memory
Dynamic Allocation of Memory Lecture 4 Sections 10.9-10.10 Robb T. Koether Hampden-Sydney College Fri, Jan 25, 2013 Robb T. Koether (Hampden-Sydney College) Dynamic Allocation of Memory Fri, Jan 25, 2013
More informationIntroduction to SQL. ECE 650 Systems Programming & Engineering Duke University, Spring 2018
Introduction to SQL ECE 650 Systems Programming & Engineering Duke University, Spring 2018 SQL Structured Query Language Major reason for commercial success of relational DBs Became a standard for relational
More informationInteger Overflow. Lecture 8 Section 2.5. Robb T. Koether. Hampden-Sydney College. Mon, Jan 27, 2014
Integer Overflow Lecture 8 Section 2.5 Robb T. Koether Hampden-Sydney College Mon, Jan 27, 2014 Robb T. Koether (Hampden-Sydney College) Integer Overflow Mon, Jan 27, 2014 1 / 32 1 Signed Addition and
More informationThe Graphics Pipeline
The Graphics Pipeline Lecture 2 Robb T. Koether Hampden-Sydney College Wed, Aug 23, 2017 Robb T. Koether (Hampden-Sydney College) The Graphics Pipeline Wed, Aug 23, 2017 1 / 19 Outline 1 Vertices 2 The
More informationPointers. Lecture 2 Sections Robb T. Koether. Hampden-Sydney College. Mon, Jan 20, 2014
Pointers Lecture 2 Sections 10.3-10.8 Robb T. Koether Hampden-Sydney College Mon, Jan 20, 2014 Robb T. Koether (Hampden-Sydney College) Pointers Mon, Jan 20, 2014 1 / 35 1 Endianness 2 Pointer Arithmetic
More information