Published on

Published in: Technology, Education
  • Be the first to comment

  • Be the first to like this

No Downloads
Total Views
On Slideshare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide


  2. 2. Topics : <ul><li>ODBC overview </li></ul><ul><li>History </li></ul><ul><li>What is ODBC </li></ul><ul><li>ODBC architecture </li></ul><ul><li>The ODBC Solution </li></ul>
  3. 3. ODBC overview <ul><li>ODBC stands for - </li></ul><ul><li>Open Database Connectivity </li></ul><ul><li>ODBC is an API introduced by Microsoft that allows applications to access databases by using SQL </li></ul><ul><li>Purpose - the ability of a single application to access different DBMS </li></ul><ul><li>(database management system) </li></ul><ul><li>with the same source code </li></ul>
  4. 4. History –why was ODBC created ? <ul><li>Companies : </li></ul><ul><li>A single DBMS applications </li></ul><ul><li>Acquiring of different DBMSs </li></ul><ul><li>Reasons : </li></ul><ul><li>- what was cheapest and fastest </li></ul><ul><li>- what they already knew </li></ul><ul><li>- what was latest in the market </li></ul><ul><li>- what worked best for a single </li></ul><ul><li>applications </li></ul>
  5. 5. <ul><li>Clients : </li></ul><ul><li>The advent of personal computers. </li></ul><ul><li>Different tools for querying ,analyzing , and displaying data </li></ul><ul><li>The advent of client/server computing </li></ul>
  6. 6. <ul><li>Software vendors : </li></ul><ul><li>Usually wrote one DBMS-specific code for each DBMS they wanted to access </li></ul><ul><li>Maintaining data access routines and applications </li></ul><ul><li>Applications were sold not on there quality but on whether they could access data in a given DBMS </li></ul>
  7. 7. <ul><li>What all those group needed was : </li></ul><ul><li>* A way to access data in different DBMSs </li></ul><ul><li>* A way to merge data from different DBMSs in a single application </li></ul><ul><li>* The ability to write a single application that was independent of any one DBMS </li></ul>
  8. 8. <ul><li>They needed interoperable way to access data : </li></ul><ul><li>Open Database Connectivity - ODBC </li></ul>
  9. 9. What is ODBC ? <ul><li>Many misconceptions exist about ODBC : </li></ul><ul><li>End users see it as an icon in the control panel </li></ul><ul><li>Programmers see it as a library containing data access routines </li></ul><ul><li>Others see it as the answer to all database access problems ever imagined. </li></ul>
  10. 10. <ul><li>ODBC is : </li></ul><ul><li>A specification for a database API </li></ul><ul><li>This API is independent of any one DBMS, operating system or language </li></ul><ul><li>API’s functions are implemented by developers of DBMS-specific drivers </li></ul><ul><li>Applications call this drivers functions </li></ul><ul><li>to access data in a DBMS-independent manner </li></ul><ul><li>A Driver Manager manages communication between applications and drivers. </li></ul>
  11. 11. <ul><li>Developing : </li></ul><ul><li>Microsoft provides a Driver Manager for computer running windows 95 and later </li></ul><ul><li>Although Microsoft has written several ODBC drivers and applications, today most of them are written by other companies ,and some of them exist on the Macintosh and a variety of UNIX platforms </li></ul>
  12. 12. <ul><li>Microsoft offers an ODBC Software Development kit to help applications and drivers developers </li></ul><ul><li>ODBC is designed to expose database capabilities , not supplement them </li></ul>
  14. 14. Applications • Generic applications • Vertical applications • Custom applications Driver Manager Loads and unloads drivers on behalf of an application. Processes ODBC function calls or passes them to a driver.
  15. 15. Drivers • Connecting to and disconnecting from the data source. • Checking for function errors not checked by the Driver Manager. • Initiating transactions; this is transparent to the application. • Submitting SQL statements to the data source for execution. The driver must modify ODBC SQL to DBMS- specific SQL. • Sending data to and retrieving data from the data source, including converting data types as specified by the application. Data Sources
  16. 16. ODBC model 1: Program Program calls an ODBC function. ODBC Manager ODBC Manager determines what to do. ODBC Driver ODBC Driver performs actual processing. Database File The database file is opened by the driver and data is manipulated.
  17. 17. <ul><li>ODBC model 2 : </li></ul>Client Server Program Program calls an ODBC function. ODBC Manager ODBC Manager determines what to do. ODBC Driver ODBC Driver prepares the request and passes it on to the DBMS. Database File The DBMS processes the request. DBMS Server
  18. 18. The ODBC Solution <ul><li>Requirements : </li></ul><ul><li>1.Application must be able to access multiple DBMSs using the same source code without recompiling or relinking. </li></ul><ul><li>2.Applications must be able to access multiple DBMSs simultaneously. </li></ul>
  19. 19. <ul><li>Solution : </li></ul><ul><li>A different driver is required for each DBMS that supports ODBC </li></ul><ul><li>The driver implements the functions in the ODBC API </li></ul><ul><li>To use a different driver the application simply loads the new driver and call the functions in it </li></ul><ul><li>To access multiple DBMSs simultaneously, the application needs to load multiple drivers </li></ul>
  20. 20. <ul><li>Which DBMS features should ODBC expose ? </li></ul><ul><li>Options : </li></ul><ul><li>Common DBMS features  little use </li></ul><ul><li>All DBMSs features  impossible for drivers to implement </li></ul>
  21. 21. <ul><li>Solution : </li></ul><ul><li>ODBC exposes a significant number of </li></ul><ul><li>DBMS features but does not require drivers to support all of them but only a subset of those features. </li></ul><ul><li>The remaining features are implement usually only by drivers which supported by their underlying DBMS. </li></ul><ul><li>ODBC provide two functions for application to determine what features a driver and DBMS supports : </li></ul><ul><li>-SQLGetInfo  general information </li></ul><ul><li>-SQLGetFunctions  supported functions </li></ul>
  22. 22. <ul><li>Questions ? </li></ul>
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.