M.P. Johnson, DBMS, Stern/NYU, Sp20041 C20.0046: Database Management Systems Lecture #17 Matthew P. Johnson Stern School of Business, NYU Spring, 2004.

Slides:



Advertisements
Similar presentations
Lecture plan Information retrieval (from week 11)
Advertisements

Copyright  Oracle Corporation, All rights reserved. 2 Java and Databases: An Overview.
Copyright © 2004 Pearson Education, Inc.. Chapter 9 More SQL: Assertions, Views, and Programming Techniques.
Chapter 9 SQL in a Server Environment Call-Level Interface Java Database Connectivity PHP.
CSC343 – Introduction to databases – A. Vaisman1 Database Application Development.
M.P. Johnson, DBMS, Stern/NYU, Sp20041 C : Database Management Systems Lecture #20 Matthew P. Johnson Stern School of Business, NYU Spring, 2004.
1 Combining SQL and Conventional Programming Languages Source: slides by Jeffrey Ullman.
Embedded SQL John Ortiz. Lecture 15Embedded SQL2 Why Isn’t Interactive SQL Enough?  How to do this using interactive SQL?  Print a well-formatted transcript.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 13 Introduction to SQL Programming Techniques.
M.P. Johnson, DBMS, Stern/NYU, Spring C : Database Management Systems Lecture #20 M.P. Johnson Stern School of Business, NYU Spring, 2005.
Fall 2001Arthur Keller – CS 18011–1 Schedule Oct. 30 (T) Embedded SQL. u Read Section 8.1. u Assignment 5 due. Not accepted late. u Project Part 4 due.
PHP CSCE 330 February 6, 2003 Group Members: Antwan B. Phan George Hwang Luat Vu Programming Language Presentation.
M.P. Johnson, DBMS, Stern/NYU, Sp20041 C : Database Management Systems Lecture #15 Matthew P. Johnson Stern School of Business, NYU Spring, 2004.
M.P. Johnson, DBMS, Stern/NYU, Spring C : Database Management Systems Lecture #16 M.P. Johnson Stern School of Business, NYU Spring, 2005.
Murali Mani SQL with other Programming Languages.
M.P. Johnson, DBMS, Stern/NYU, Sp20041 C : Database Management Systems Lecture #18 Matthew P. Johnson Stern School of Business, NYU Spring, 2004.
End of SQL: Triggers, Impedance Mismatch and Transactions February 6 th, 2004.
M.P. Johnson, DBMS, Stern/NYU, Sp20041 C : Database Management Systems Lecture #19 Matthew P. Johnson Stern School of Business, NYU Spring, 2004.
M.P. Johnson, DBMS, Stern/NYU, Spring C : Database Management Systems Lecture #22 M.P. Johnson Stern School of Business, NYU Spring, 2005.
SPRING 2004CENG 3521 SQL: Constraints, Triggers, Embedded SQL Chapters: 5, 6.
Outline IS400: Development of Business Applications on the Internet Fall 2004 Instructor: Dr. Boris Jukic Server Side Web Technologies: Part 2.
M.P. Johnson, DBMS, Stern/NYU, Sp20041 C : Database Management Systems Lecture #21 Matthew P. Johnson Stern School of Business, NYU Spring, 2004.
Matthew P. Johnson, OCL2, CISDD CUNY, January OCL2 Oracle 10g: SQL & PL/SQL Session #6 Matthew P. Johnson CISDD, CUNY Fall, 2004.
Multiple Tiers in Action
M.P. Johnson, DBMS, Stern/NYU, Spring C : Database Management Systems Lecture #17 M.P. Johnson Stern School of Business, NYU Spring, 2008.
Apache Tomcat Server Typical html Request/Response cycle
EmbeddedSQL: 1 Impedance Mismatch Problem Problem : How to connect SQL statements with conventional programming languages Different models of language.
Winter 2002Arthur Keller – CS 18011–1 Schedule Today: Feb. 7 (TH) u PL/SQL, Embedded SQL, CLI, JDBC. u Read Sections 8.1, Feb. 12 (T) Advising.
Dec 11, 2003Murali Mani SQL with other Programming Languages B term 2004: lecture 16.
Matthew P. Johnson, OCL1, CISDD CUNY, F20041 OCL1 Oracle 10g: SQL & PL/SQL Session #6 Matthew P. Johnson CISDD, CUNY Fall, 2004.
M.P. Johnson, DBMS, Stern/NYU, Spring C : Database Management Systems Lecture #21 M.P. Johnson Stern School of Business, NYU Spring, 2005.
M.P. Johnson, DBMS, Stern/NYU, Sp20041 C : Database Management Systems Lecture #14 Matthew P. Johnson Stern School of Business, NYU Spring, 2004.
M.P. Johnson, DBMS, Stern/NYU, Spring C : Database Management Systems Lecture #14 M.P. Johnson Stern School of Business, NYU Spring, 2008.
M.P. Johnson, DBMS, Stern/NYU, Spring C : Database Management Systems Lecture #16 M.P. Johnson Stern School of Business, NYU Spring, 2008.
Riyadh Philanthropic Society For Science Prince Sultan College For Woman Dept. of Computer & Information Sciences CS 340 Introduction to Database Systems.
2440: 141 Web Site Administration Web Server-Side Programming Professor: Enoch E. Damson.
SEMESTER 1, 2013/2014 DB2 APPLICATION DEVELOPMENT OVERVIEW.
Embedded SQL Host Language (record-oriented) DBMS (set-oriented) 1. Query 3. Process a tuple at a time 4. Close Cursor 2. Evaluate query. Provide cursor.
1 CSC 440 Database Management Systems JDBC This presentation uses slides and lecture notes available from
CS411 Database Systems Kazuhiro Minami 07: SQL System Aspects.
Lecture On Database Analysis and Design By- Jesmin Akhter Lecturer, IIT, Jahangirnagar University.
Announcements Read JDBC Project Step 5, due Monday.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 9- 1 DATADABASE PROGRAMMING 2Chapter 13 from our text.
PHP and MySQL by Example COMP YL Professor Mattos.
Overview of JDBC and Pro*C 1 CSE 5330 – Database Systems.
Database Application Development SQL In Application Code : 1. Embedded SQL 2. Database API’s 3. SQLJ.
Dr Gordon Russell, Napier University Unit Embedded SQL - V3.0 1 Embedded SQL Unit 5.1.
ICS 321 Fall 2009 DBMS Application Programming Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa 10/06/20091Lipyeow.
Winter 2006 Keller, Ullman, Cushing 11–1 Embedded SQL Add to a conventional programming language (C in our examples) certain statements that represent.
ICS 321 Fall 2010 SQL in a Server Environment (i) Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa 11/1/20101Lipyeow.
SQL in a Programming Environment CIS 4301 Lecture Notes Lecture /11/2006.
1 More basics on DB access Elke A. Rundensteiner.
© D. Wong Java API for XML Processing (JAXP)  For processing XML data using applications written in Java  JAXP APIs - javax.xml.parsers package.
Component 4: Introduction to Information and Computer Science Unit 5: Overview of Programming Languages, Including Basic Programming Concepts Lecture 2.
1 CS 430 Database Theory Winter 2005 Lecture 14: Additional SQL Topics.
Dr Gordon Russell, Napier University Unit Embedde SQL - V2.0 1 Embedded SQL Unit 5.1.
Different Constraint Types Type Where Declared When activated Guaranteed to hold? Attribute with attribute on insertion not if CHECK or update subquery.
SQL Programming SQL in Application Programs
CP476 Internet Computing Perl CGI and MySql 1 Relational Databases –A database is a collection of data organized to allow relatively easy access for retrievals,
© 1997 UW CSE 10/27/97H-1 Embedded SQL and the CLI Chapter 7.7.
CS422 Principles of Database Systems JDBC and Embedded SQL Chengyu Sun California State University, Los Angeles.
Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe.
SQL in the real world 1. The Three-Tier Architecture of Database Applications browser network HTTP Web server Application server Database server database.
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 Database Application Development Chapter 6.
SQL Environment.
Introduction to Database Systems, CS420
CPSC-310 Database Systems
DB Programming: SQL Programming Techniques
Lecture 17: Systems Aspects of SQL
Lecture 05: SQL Systems Aspects
Presentation transcript:

M.P. Johnson, DBMS, Stern/NYU, Sp20041 C : Database Management Systems Lecture #17 Matthew P. Johnson Stern School of Business, NYU Spring, 2004

M.P. Johnson, DBMS, Stern/NYU, Sp Agenda Previously: Pro*C, Midterm, break Next: Discuss midterm Project part 3 is up More programming for SQL  Embedded SQL Pro*C, SQLJ  PSMs  CLI SQL/CLI in C JDBC in Java DBI/DBDs in Perl PHP (HTML?)

M.P. Johnson, DBMS, Stern/NYU, Sp First: Evals Speed Varying depth of coverage Grades One-minute responses

M.P. Johnson, DBMS, Stern/NYU, Sp Recap: Embedded SQL Host language + Embedded SQL Preprocessor Host Language + function calls Host language compiler Executable Preprocessor Host language compiler Oracle’s Pro*C gcc prog.pc prog.c a.out

M.P. Johnson, DBMS, Stern/NYU, Sp Embedded SQL/Pro*C Benefits? Problems? Solutions?

M.P. Johnson, DBMS, Stern/NYU, Sp Interface: SQL/Host Language Two languages: SQL, host (C/Java/whatever) Benefits:  DB code (SQL is portable)  SQL, host language focus on own strengths SQL code placed in host language code SQL and host language have diff. data types  “impedance mismatch”  Data transferred with “shared variables” Use cursors to access/modify data Error messages placed in SQLSTATE

M.P. Johnson, DBMS, Stern/NYU, Sp Recall: Pro*C on sales Example script: sample1.pc  See Pro*C tutorialPro*C tutorial Pro*C compiler is proc  Must include /oracle/precomp/public  Must link with shared library /oracle/lib/libclntsh.so  Includes makefile proc.mk, but may require modifications sales% cp /oracle/precomp/demo/proc/*.pc. sales% proc sample1.pc sales% gcc -I/oracle/precomp/public /oracle/lib/libclntsh.so -osample1 sample1.c sales% sample1 sales% cp /oracle/precomp/demo/proc/*.pc. sales% proc sample1.pc sales% gcc -I/oracle/precomp/public /oracle/lib/libclntsh.so -osample1 sample1.c sales% sample1

M.P. Johnson, DBMS, Stern/NYU, Sp Embedded SQL example Example script: sample2.pc  See Pro*C tutorialPro*C tutorial Goal: display all salespeople  Use cursor to scroll through results sales% proc sample2.pc sales% gcc -I/oracle/precomp/public /oracle/lib/libclntsh.so –osample2 sample2.c sales% sample2 sales% proc sample2.pc sales% gcc -I/oracle/precomp/public /oracle/lib/libclntsh.so –osample2 sample2.c sales% sample2