140 likes | 571 Views
Database Middleware. Early client/server database systems Two tier Server does business logic (data analysis & report generation) Server does database logic Client communicates directly with database on the server Client does data formatting and display
E N D
Database Middleware • Early client/server database systems • Two tier • Server does business logic (data analysis & report generation) • Server does database logic • Client communicates directly with database on the server • Client does data formatting and display • Primitive middleware is simply for enabling communication
Database middleware • Business logic – data analysis and report generation takes place on client • Data is needed at the client • Server logic to selectively extract needed data from tables for transmission to client – not entire files
SQL • Structured Query Language • ANSI standard American National Standards Institute • Standard allows interoperability Provides • Create & modify tables and databases • Add, delete, modify and manipulate data • Query • Interfaces through programming languages • Vendors provide enhanced features not part of ANSI SQL • Competitive advantage • Compromises transparent interoperability
SQL processing • Application generates SQL query • Query goes to client middleware • Query is passed (through layers) across network • Server middleware submits query • Database interprets query – result is a dataset • Dataset is transmitted across network to client middleware • Data is presented to the client application Final execution of query is on the local dataset
Proprietary API • Most database vendors provide a proprietary API to link to their database platform (Oracle uses SQL*NET) • Applications then become bound to a particular database • Separate application versions needed for different databases • One solution – a universal API translator into a specific API • Microsoft ODBC – Open Database Connectivity • Provides a set of non-database specific APIs • Layer inserted between client application and middleware • What about interfacing to multiple databases?
ODBC Client Application Oracle Server ODBC Oracle SQL*NET Oracle SQL*NET NOS NOS Physical NW Layers Physical NW Layers
Oracle Server Client Application Sybase Server Oracle SQL*NET Client Middleware Sybase mid-ware NOS NOS NOS Physical NW Layers Physical NW Layers Physical NW Layers 3 Tier ODBC SequelLink SQL*NET ClientMiddle-ware Sybase API NOS Physical NW Layers
Universal Data Access • An alternative solution (newer) • OLE DB: Object Layering and Embedded Database API • Inserts another layer of middleware on the server side • Clients generate OLE DB rather than a proprietary API or SQL
SQL Database Client Application ODBC OLE DB Client Client Middleware OLE NOS NOS Physical NW Layers Physical NW Layers OLE DB SQL Database ODBC OLE DB Client NOS Physical NW Layers
Web Middleware • Middleware to make the application browser-compatible • Development environments • Examples • ActiveX • Java • CGI (Common Gateway Interface)