Outline Accessing SQL From a Programming Language Functions and Procedural Constructs Triggers Recursive Queries Advanced Aggregation Features OLAP Database System Concepts-6th Edition 5.2 @Silberschatz,Korth and Sudarshan
Database System Concepts - 6 5.2 ©Silberschatz, Korth and Sudarshan th Edition Outline Accessing SQL From a Programming Language Functions and Procedural Constructs Triggers Recursive Queries Advanced Aggregation Features OLAP
Accessing SQL From a Programming Language Database System Concepts-6th Edition 5.3 @Silberschatz,Korth and Sudarshan
Database System Concepts - 6 5.3 ©Silberschatz, Korth and Sudarshan th Edition Accessing SQL From a Programming Language
Accessing SQL From a Programming Language API (application-program interface)for a program to interact with a database server Application makes calls to Connect with the database server Send SQL commands to the database server Fetch tuples of result one-by-one into program variables Various tools: ODBC (Open Database Connectivity)works with C,C++,C#, and Visual Basic.Other APl's such as ADO.NET sit on top of ODBC JDBC (Java Database Connectivity)works with Java Embedded SQL Database System Concepts-6th Edition 5.4 @Silberschatz,Korth and Sudarshan
Database System Concepts - 6 5.4 ©Silberschatz, Korth and Sudarshan th Edition Accessing SQL From a Programming Language API (application-program interface) for a program to interact with a database server Application makes calls to Connect with the database server Send SQL commands to the database server Fetch tuples of result one-by-one into program variables Various tools: ODBC (Open Database Connectivity) works with C, C++, C#, and Visual Basic. Other API’s such as ADO.NET sit on top of ODBC JDBC (Java Database Connectivity) works with Java Embedded SQL
ODBC Open DataBase Connectivity (ODBC)standard standard for application program to communicate with a database server. application program interface (API)to open a connection with a database, send queries and updates, get back results. Applications such as GUl,spreadsheets,etc.can use ODBC Database System Concepts-6th Edition 5.5 @Silberschatz,Korth and Sudarshan
Database System Concepts - 6 5.5 ©Silberschatz, Korth and Sudarshan th Edition ODBC Open DataBase Connectivity (ODBC) standard standard for application program to communicate with a database server. application program interface (API) to open a connection with a database, send queries and updates, get back results. Applications such as GUI, spreadsheets, etc. can use ODBC
JDBC JDBC is a Java API for communicating with database systems supporting SQL. JDBC supports a variety of features for querying and updating data, and for retrieving query results. JDBC also supports metadata retrieval,such as querying about relations present in the database and the names and types of relation attributes. Model for communicating with the database: Open a connection Create a“statement”object Execute queries using the Statement object to send queries and fetch results Exception mechanism to handle errors Database System Concepts-6th Edition 5.6 ©Silberschat乜,Korth and Sudarshan
Database System Concepts - 6 5.6 ©Silberschatz, Korth and Sudarshan th Edition JDBC JDBC is a Java API for communicating with database systems supporting SQL. JDBC supports a variety of features for querying and updating data, and for retrieving query results. JDBC also supports metadata retrieval, such as querying about relations present in the database and the names and types of relation attributes. Model for communicating with the database: Open a connection Create a “statement” object Execute queries using the Statement object to send queries and fetch results Exception mechanism to handle errors