Top Banner
1 © Prentice Hall, 2002 The Client/Server The Client/Server Database Environment Database Environment
28
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
  • The Client/Server Database Environment

  • Client/Server SystemsNetworked computing modelProcesses distributed between clients and serversClient Workstation (usually a PC) that requests and uses a serviceServer Computer (PC/mini/mainframe) that provides a serviceFor DBMS, server is a database server

  • Application Logic in C/S SystemsPresentation LogicInput keyboard/mouseOutput monitor/printerProcessing LogicI/O processingBusiness rulesData managementStorage LogicData storage/retrievalGUI InterfaceProcedures, functions,programsDBMS activities

  • Client/Server ArchitecturesFile Server ArchitectureDatabase Server ArchitectureThree-tier Architecture

  • File Server ArchitectureAll processing is done at the PC that requested the data Entire files are transferred from the server to the client for processing.Problems:Huge amount of data transfer on the networkEach client must contain full DBMS Heavy resource demand on clientsClient DBMSs must recognize shared locks, integrity checks, etc.

    FAT CLIENT

  • FAT CLIENT

  • Database Server Architectures2-tiered approachClient is responsible for I/O processing logic Some business rules logicServer performs all data storage and access processing DBMS is only on serverAdvantagesClients do not have to be as powerfulGreatly reduces data traffic on the networkImproved data integrity since it is all processed centrallyStored procedures some business rules done on server

  • Advantages of Stored ProceduresCompiled SQL statementsReduced network trafficImproved securityImproved data integrityThinner clients

  • Database server architectureThinner clientsDBMS only on server

  • Three-Tier ArchitecturesThree layers:ClientApplication serverDatabase serverThin Client PC just for user interface and a little application processing. Limited or no data storage (sometimes no hard drive)GUI interface (I/O processing)BrowserBusiness rulesWeb ServerData storageDBMS

  • Three-tier architectureThinnest clientsBusiness rules on separate serverDBMS only on DB server

  • Advantages of Three-Tier ArchitecturesScalabilityTechnological flexibilityLong-term cost reductionBetter match of systems to business needsImproved customer serviceCompetitive advantageReduced risk

  • Challenges of Three-tier ArchitecturesHigh short-term costsTools and trainingExperienceIncompatible standardsLack of compatible end-user tools

  • Application PartitioningPlacing portions of the application code in different locations (client vs. server) AFTER it is writtenAdvantagesImprove performanceImprove interoperabilityBalanced workloads

  • Processing Logic Distributions2-tier distributionsn-tier distributionsProcessing logic could be at client, server, or both Processing logic will be at application server or Web server

  • Parallel Computer ArchitecturesTightly CoupledSymmetric Multiprocessing (SMP)Multiple CPUsShared RAMLoosely CoupledMassively Parallel Processing (MPP)Multiple CPUsEach CPU has its own RAM space

  • Parallel Computer Architectures

    Tightly-coupled CPUs share common memory spaceLoosely-coupled CPUs each have their own memory space

  • Query Processing with Parallel Processors

    Parallel transactionsParallel query

  • MiddlewareSoftware which allows an application to interoperate with other softwareNo need for programmer/user to understand internal processingAccomplished via Application Program Interface (API)The glue that holds client/server applications together

  • Types of MiddlewareRPC Remote Procedure Calls (RPC) client makes calls to procedures running on remote computerssynchronous and asynchronousMessage-Oriented Middleware (MOM) asynchronous calls between the client via message queuesPublish/Subscribepush technology server sends information to client when availableObject Request Broker (ORB)Object-oriented management of communications between clients and serversSQL-oriented Data AccessMiddleware between applications and database servers

  • Database MiddlewareODBC Open Database ConnectivityMost DB vendors support thisOLE-DBMicrosoft enhancement of ODBCJDBC Java Database ConnectivitySpecial Java classes that allow Java applications/applets to connect to databases

  • Client/Server SecurityNetwork environment complex security issuesSecurity levels:System-level password securityfor allowing access to the systemDatabase-level password securityfor determining access privileges to tables; read/update/insert/delete privilegesSecure client/server communication via encryption

  • Query-by-Example (QBE)Direct-manipulation database languageGraphical approachAvailable in MS AccessMS Access translates QBE to SQL and vice versaUseful for end-user database programmingGood for ad hoc processing and prototyping

  • QBE view of a 2-table join queryEquivalent query in SQL

  • Access usability hierarchyFoundation of MS AccessSimple processesStored modules of pre-existing VBA codeVisual Basic for Applicationslanguage for customizing the applicationAPI to call functions in DLLs external to MS Access

  • Using ODBC to Link External Databases Stored on a Database ServerOpen Database Connectivity (ODBC)API that provides a common language for application programs to access and process SQL databases independent of the particular RDBMS that is accessedRequired parameters:ODBC driver Back-end server nameDatabase nameUser id and passwordAdditional information:Data source name (DSN)Windows client computer nameClient application programs executable name

    Java Database Connectivity (JDBC) is similar to ODBC built specifically for Java applications

  • ODBC Architecture

    Each DBMS has its own ODBC-compliant driverClient does not need to know anything about the DBMSApplication Program Interface (API) provides common interface to all DBMSs

  • Visual Basic for ApplicationsVBA is the programming language that accompanies Access 2000VBA provides these features:Ability to perform complex functionalityError handlingFaster execution than macrosEasier maintenanceOLE automationProgrammatic controlEase of reading for programmersEvent-driven nonprocedural programming that detects events and generates appropriate responses