Presentation is loading. Please wait.

Presentation is loading. Please wait.

Client-server database systems and ODBC l Client-server architecture and components l More on reliability and security l ODBC standard.

Similar presentations


Presentation on theme: "Client-server database systems and ODBC l Client-server architecture and components l More on reliability and security l ODBC standard."— Presentation transcript:

1

2 Client-server database systems and ODBC l Client-server architecture and components l More on reliability and security l ODBC standard

3 Database processing functions

4 The client-server architecture l The network “cut” is between applications and the DBMS l Database processing is on the server

5 DBMS Driver l Receive processing requests from applications l Format requests and deliver to DBMS l Receive responses from DBMS l Format responses for application l Communication layer on client and server to exchange messages between DBMS and driver

6 Roles of client and server Client »Manage the user interface »Enforce business rules »Process application logic »Generate database requests (SQL) »Transmit database requests to server »Receive results from server »Format results Server »Accept database request from clients »Process database requests »Format results and transmit to client »Enforce business rules »Perform integrity checking »Maintain database overhead data »Provide concurrent access control »Provide recovery and security services

7 Advantages & disadvantages l Pro »Applications use client CPUs in parallel –More powerful applications »Network traffic is reduced l Con »Concurrency control »Multiple client OS’s

8 Multithreading

9 Client requests l Native library calls (API) »DBMS-specific l Embedded SQL »Static SQL –SQL structure fixed at compile time –Faster »Dynamic SQL –SQL structure determined at run time –More flexible

10 Business rules: client-enforcement

11 Business rules: server-enforcement

12 Enforcement of business rules l Client »Triggers »Duplication »What about using DML directly? l Server »All in one place »What if DBMS cannot enforce business rules?

13 Concurrency control l Pessimistic locking »Assume things will go wrong »Prevent problems all the time l Optimistic locking »Assume things will go well »If problem, do it over

14 Pessimistic locking: same page, different records

15 Optimistic locking: same page, different records What if same record?

16 Concurrency control, take 2 l Pessimistic versus optimistic locking, which is better? »Depends on application... »What is the common case? –If conflict is frequent, use pessimistic! –If conflict is rare, use optimistic!

17 ODBC l Open DataBase Connectivity l Industry-standard interface between client applications and server DBMS products l The idea is to write DBMS-independent applications, as long as they conform to the ODBC standard l To conform or not to conform?

18 ODBC architecture

19 ODBC components l On the server: »Data source(s) - database, DBMS, OS, network platform l On the client: »DBMS drivers - one per data source –Receive ODBC request –Process if not standard SQL –Submit to specific data source »Driver manager - one per client –Receive ODBC request from application –Load appropriate driver and forward request

20 ODBC drivers l Single-tier: process both ODBC calls and SQL statements l Multiple-tier: process ODBC calls and pass SQL statements to data source

21 ODBC conformance levels l 3 levels of driver API conformance »Core (connect, commit/rollback, error...) »Level 1 (partial results, catalog, driver gestalt...) »Level 2 (browse, scrollable cursors...) l 3 levels of SQL conformance »Minimum (simple select, create, drop, insert, update, delete, simple expressions...) »Core (indices, views, grant, revoke, sub- queries, aggregate functions...) »Extended (outer joins, cursors, scalar functions, procedures...)


Download ppt "Client-server database systems and ODBC l Client-server architecture and components l More on reliability and security l ODBC standard."

Similar presentations


Ads by Google