CF Database I Jeff Peters Why Are You Here? Data and Persistence ODBC Relational vs. Flat SQL CFQUERY, CFOUTPUT, CFLOOP Practicum.

Slides:



Advertisements
Similar presentations
Murach’s Java SE 6, C21© 2007, Mike Murach & Associates, Inc.Slide 1.
Advertisements

IiWAS2002, Bandung, Indonesia Teaching and Learning Databases Dr. Stéphane Bressan National University of Singapore.
Chapter 10 ADO. What is ADO? ADO is a Microsoft technology ADO stands for ActiveX Data Objects ADO is a programming interface to access data in a database.
The SQL Language Presented by Reggie James, Isel Liunoras, and Chris Rollins.
15 Chapter 15 Web Database Development Database Systems: Design, Implementation, and Management, Fifth Edition, Rob and Coronel.
1 Foundations of Software Design Lecture 27: Java Database Programming Marti Hearst Fall 2002.
Confidential ODBC May 7, Features What is ODBC? Why Create an ODBC Driver for Rochade? How do we Expose Rochade as Relational Transformation.
Financial Information Management How do I talk to a DBMS? SQL In one hour.
ODBC Open DataBase Connectivity a standard database access method developed by Microsoft to access data from any application regardless of which database.
1 Web Database Processing. Web Database Applications Static Report Publishing a report is prepared from a database application and exported to HTML DB.
ASP.NET Programming with C# and SQL Server First Edition
Interacting With Data Databases.
Chapter 7 PHP Interacts with Ms. Access (Open DataBase Connectivity (ODBC))
PHP Data Object (PDO) Khaled Al-Sham’aa. What is PDO? PDO is a PHP extension to formalise PHP's database connections by creating a uniform interface.
SQL HW1 Turn in as a hardcopy at the start of next class period. You may work this assignment in groups.
1 PHP and MySQL. 2 Topics  Querying Data with PHP  User-Driven Querying  Writing Data with PHP and MySQL PHP and MySQL.
© D. Wong  Indexes  JDBC  JDBC in J2EE (Java 2 Enterprise Edition)
Database Overview College of Alameda Copyright © 1999 Patrick McDermott
Web Server Administration Chapter 7 Installing and Testing a Programming Environment.
©2007 · Georges Merx and Ronald J. NormanSlide 1 Chapter 10 Information Management in Java.
Introduction to MySQL Lab no. 10 Advance Database Management System.
Web Scripting [PHP] CIS166AE Wednesdays 6:00pm – 9:50pm Rob Loy.
NMED 3850 A Advanced Online Design January 12, 2010 V. Mahadevan.
CPS120: Introduction to Computer Science Lecture 19 Introduction to SQL.
Mainframe (Host) - Communications - User Interface - Business Logic - DBMS - Operating System - Storage (DB Files) Terminal (Display/Keyboard) Terminal.
Hibernate 3.0. What is Hibernate Hibernate is a free, open source Java package that makes it easy to work with relational databases. Hibernate makes it.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 Introduction to ADO.NET ADO.NET - Lesson 01  Training time: 10 minutes  Author:
Web Server Administration Chapter 7 Installing and Testing a Programming Environment.
CF101: Welcome to ColdFusion Simon Horwith CTO, Etrilogy Ltd.
CIS 375—Web App Dev II SQL. 2 Introduction SQL (Structured _______ Language) is an ANSI standard language for accessing databases.ANSI SQL can execute.
What’s a database? Data stored in a structured format that lends itself to easy manipulation and recall.
CIS 375—Web App Dev II SQL. 2 Introduction SQL (Structured _______ Language) is an ANSI standard language for accessing databases.ANSI SQL can execute.
SQL Jan 20,2014. DBMS Stores data as records, tables etc. Accepts data and stores that data for later use Uses query languages for searching, sorting,
THE WEBMASTERS: SENG + WAVERING.  On account of construction, we will be having class in room 1248 next week.
PHP Workshop ‹#› PHP Data Object (PDO). PHP Workshop ‹#› What is PDO? PDO is a PHP extension to formalise PHP's database connections by creating a uniform.
CS453: Databases and State in Web Applications (Part 2) Prof. Tom Horton.
Li Tak Sing COMPS311F. Database programming JDBC (Java Database Connectivity) Java version of ODBC (Open Database Connectivity) ODBC provides a standard.
DATABASE CONNECTIVITY TO MYSQL. Introduction =>A real life application needs to manipulate data stored in a Database. =>A database is a collection of.
Web Scripting [PHP] CIS166AE Wednesdays 6:00pm – 9:50pm Rob Loy.
Database Design And Implementation. Done so far… Started a design of your own data model In Software Engineering, recognised the processes that occur.
PHP Workshop ‹#› أطلق إبداعك 2 أطلق إبداعك 2 مدرس معتمد من مركز زووم PHP Data Object (PDO)
Accessing mySQL relational database. MySQL database.  Today, we will attempt and open a connection to the MySQL server.  We need to specify the database.
ECMM6018 Enterprise Networking For Electronic Commerce Tutorial 6 CGI/Perl and databases.
Financial Information Management FIM: Databases Stefano Grazioli.
In the Name Of Almighty Allah. Java Application Connection To Mysql Created by Hasibullah (Sahibzada) Kabul Computer Science Faculty Afghanistan.
CS320 Web and Internet Programming SQL and MySQL Chengyu Sun California State University, Los Angeles.
1 Section 1 - Introduction to SQL u SQL is an abbreviation for Structured Query Language. u It is generally pronounced “Sequel” u SQL is a unified language.
Introduction to Database Programming with Python Gary Stewart
 MySQL is a database system used on the web  MySQL is a database system that runs on a server  MySQL is ideal for both small and large applications.
Databases Stefano Grazioli.
Accessing the Database Server: ODBC, OLE DB, and ADO
Introduction to Dynamic Web Programming
CS320 Web and Internet Programming SQL and MySQL
CF101: Welcome to ColdFusion
Introduction to Web programming
JDBC.
CS1222 Using Relational Databases and SQL
ISC440: Web Programming 2 Server-side Scripting PHP 3
PHP and MySQL.
Chapter 10 ADO.
CS1222 Using Relational Databases and SQL
CS1222 Using Relational Databases and SQL
CS3220 Web and Internet Programming SQL and MySQL
CS3220 Web and Internet Programming SQL and MySQL
Database Connections.
CS1222 Using Relational Databases and SQL
Introduction to Web programming
CS4540 Special Topics in Web Development SQL and MS SQL
CS1222 Using Relational Databases and SQL
Presentation transcript:

CF Database I Jeff Peters

Why Are You Here? Data and Persistence ODBC Relational vs. Flat SQL CFQUERY, CFOUTPUT, CFLOOP Practicum

Data and Persistence Persistence = Turn off, turn on—data still there. Secondary storage (disk or other nonvolatile) DBMS Excel Text file

ODBC Open DataBase Connectivity Allows a common interface to many databases. Does not homogenize SQL Must be configured on the CF server

Relational vs. Flat Relational: Tables may be linked (related) to make storage more efficient. E.F. Codd Flat: Tables cannot be linked. Think of a spreadsheet.

CFQUERY Allows any SQL statement to be run. Returns a recordset depending on SQL. Can pass authentication attributes: USERNAME PASSWORD Can cache data for better performance.

CFOUTPUT Refers to a CFQUERY recordset to generate output to the browser. May be nested using the GROUP attribute. May NOT be nested without the GROUP attribute (see CFLOOP).

CFLOOP Refers to a CFQUERY recordset; does not produce output to the browser. CFLOOP may also be used for incremental loops, lists, and objects—not the scope of this session.

SQL Structured Query Language Common syntax for interacting with a database. (Beware variations) SELECT, INSERT, UPDATE, DELETE More complex commands available; related to DBA functions.

Caching Queries Improves performance by storing data in server memory. Implemented through CFQUERY CACHEDWITHIN attribute

Practicum – ODBC MS Access: CFDB101 webroot\cfun03\CFDB101.mdb MS Excel: CFDB101Excel webroot\cfun03\Members.xls Text File: CFDB101Text webroot\cfun03\TextDB\Members

Practicum – CFQUERY SELECT INSERT DELETE UPDATE

Practicum – CFQUERY SELECT SELECT memberNumber, lastName, firstName, , phone, memberSince FROM Members

Practicum – CFQUERY SELECT

Practicum – CFQUERY INSERT INSERT INTO Members ( memberNumber, lastName, firstName, , phone, memberSince ) VALUES ( 4, 'Adams', 'John Q.', ' ', #CreateODBCDate(Now())# )

Practicum – CFQUERY INSERT

Practicum – CFQUERY DELETE DELETE FROM Members WHERE memberNumber = '4'

Practicum – CFQUERY DELETE

Practicum – CFQUERY UPDATE UPDATE Members SET phone = ' ' WHERE memberNumber = '1'

Practicum – CFQUERY UPDATE

Practicum – CFOUTPUT SELECT lastName, firstName, memberSince FROM Members ORDER BY memberSince #DateFormat(memberSince,"mm/dd/yyyy")# : #firstName# #lastName#

Practicum – CFOUTPUT

Practicum – CFLOOP SELECT lastName, firstName, memberSince FROM Members ORDER BY memberSince #firstName# #lastName# - Member for #memberYears# years.

Practicum – CFLOOP Thomas Jefferson - Member for 226 years. John Adams - Member for 226 years. George Washington - Member for 226 years.

Practicum – Caching <cfquery name="qryGetMembers" datasource="CFDB101" dbtype="ODBC" cachedwithin="#CreateTimeSpan(1, 0, 0, 0)#"> SELECT memberNumber, lastName, firstName, , phone, memberSince FROM Members

Bonus – Aqua Data Studio Interfaces with DB2, Informix, MySQL, Oracle, PostgreSQL, SQL Server, SyBase, any JDBC source.

Q & A