Copyright © Curt Hill Connectivity Communicating with the Database
Copyright © Curt Hill Introduction Most DBMSs are servers that respond to clients How do the two connect over a LAN, Intranet or the Internet? Numerous ways This discusses some of them
Locations If the server is running on the same machine as the client it is rather easy SQL Server likes: –Named pipes –TCP/IP –Shared memory If this is not the case then other options are needed Copyright © Curt Hill
Some of the possibilities CLI (Call Level Interface) ODBC (Open DataBase Connectivity) JDBC (Java DataBase Connectivity) Copyright © Curt Hill
CLI Call Level Interface Defined for C and COBOL language programs Standardized by ISO Determines the Application Program Interface between a program and a remote database –Program could be as simple as an SQL client or much more complicated Copyright © Curt Hill
ODBC Based on CLI Developed by Microsoft A driver that takes SQL commands –Translates them to specific DB –Transmits them to particular DB –Receives the result –Returns to the program Each DB manufacturer generally produces the ODBC driver for each platform Copyright © Curt Hill
ODBC Again Like any driver, the goal is to bridge the differences between DBMSs Eg. an application that deals with Oracle through the Oracle ODBC can change to SQL Server by only changing the ODBC The OS will have a ODBC driver manager –It chooses the best of the installed drivers for the DBMS in question Copyright © Curt Hill
JDBC Java DataBase Connectivity Connects Java appliations with DBMSs Usually just an interface to ODBC from within Java Copyright © Curt Hill
Some Others ADO – ActiveX Data Object The.NET version is how.NET programs communicate OLE DB – Object Linking and Embedding for DataBases Extends ODBC to allow access to programs that do not accept SQL Such as object databases and spreadsheets DAO – object oriented API Usually for local data sources RDO – remote data objects Uses DAO and ODBC Copyright © Curt Hill
Finally Each of these described protocols is middleware It sits between an application program and a target database Makes it easier to change databases with changing the application Copyright © Curt Hill