lec10 - Database Application Programming Chapter 6(JDBC...

Info iconThis preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon
1 2/8/11 EECS 484: Database Management Systems, Kristen LeFevre 1 Database Application Programming Chapter 6 (JDBC Section) 2/8/11 EECS 484: Database Management Systems, Kristen LeFevre 2 Databases “In the Wild” So far, we’ve talked about the DBMS as a standalone system Access interactively by writing SQL queries (e.g., using SQL*Plus) In practice, DBMS is often part of a larger software infrastructure Multi-tiered system architecture Access database from another program
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
2 2/8/11 EECS 484: Database Management Systems, Kristen LeFevre 3 Database “Ecosystem” (1) DBMS “Server” Client SQL Query Result “Client-Server Architecture” 2/8/11 EECS 484: Database Management Systems, Kristen LeFevre 4 Many Clients DBMS “Server” Client “Client-Server Architecture” Client Client Client
Background image of page 2
3 2/8/11 EECS 484: Database Management Systems, Kristen LeFevre 5 Database “Ecosystem” (2) DBMS “Server” Client SQL Query Result Web Server HTTP Request Result “3-Tier Architecture” Common to add more tiers, too 2/8/11 EECS 484: Database Management Systems, Kristen LeFevre 6 Embedding SQL in Application DBMS “Server” Client SQL Query Result Client is often a program, written in a language like C++ or Java Challenge: How to access SQL from application code?
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
4 2/8/11 EECS 484: Database Management Systems, Kristen LeFevre 7 SQL Integration with PL Ugly Problem: Database supports SQL queries Application written in programming language (e.g., Java, C++) What is the interface between the two? A Common Solution: “Embed” SQL in host language Provide an API for processing query results Also object-relational mapping tools LINQ to SQL, Ruby on Rails, … 2/8/11 EECS 484: Database Management Systems, Kristen LeFevre 8 JDBC (“Java-Database Connectivity”) Standard for embedding SQL in Java programs Basic concepts: Connection Statement, PreparedStatement ResultSet
Background image of page 4
5 2/8/11 EECS 484: Database Management Systems, Kristen LeFevre
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 6
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 13

lec10 - Database Application Programming Chapter 6(JDBC...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online