+ All Categories
Home > Documents > CHAPTER 1

CHAPTER 1

Date post: 23-Feb-2016
Category:
Upload: mircea
View: 28 times
Download: 0 times
Share this document with a friend
Description:
CHAPTER 1. Client/Server Database Environment. Learning Outcomes. At the end of this chapter, you should be able to: - PowerPoint PPT Presentation
Popular Tags:
52
CHAPTER 1 Client/Server Database Environment
Transcript
Page 1: CHAPTER 1

CHAPTER 1Client/Server Database

Environment 

Page 2: CHAPTER 1

Client/Server Database Environment

CISB344 Database 2

LEARNING OUTCOMES At the end of this chapter, you should be

able to:› Define client/server systems, file server, fat

client, database server, stored procedure, three-tier architecture, thin client, application partitioning, middleware, middleware and application program interface (API)

› Explain the three components of client server systems: presentation, processing, and storage

› Distinguish between file server, database server and three-tier architectures

Page 3: CHAPTER 1

Client/Server Database Environment

CISB344 Database 2

CLIENT/SERVER SYSTEMS

A networked computing model that distributes processes between clients and servers which supply requested services

Client–Workstation (usually a PC) that requests and uses a service

Server–Computer (PC/mini/mainframe) that provides a service

For DBMS, server is a database server

Page 4: CHAPTER 1

Client/Server Database Environment

CISB344 Database 2

CLIENT/SERVER ARCHITECTURES

Client/server architectures that have evolved can be distinguished by the distribution of application logic components across clients and servers.

Three components of application logic:1. Presentation logic @ Input/output (I/O) 2. Processing Logic3. Storage Logic

Page 5: CHAPTER 1

Client/Server Database Environment

CISB344 Database 2

CLIENT/SERVER ARCHITECTURES

Formatting & presenting data on user’ screen or other output

devices.

Managing user input from a keyboard or other input devices

GUI Interface

Page 6: CHAPTER 1

Client/Server Database Environment

CISB344 Database 2

CLIENT/SERVER ARCHITECTURES

I/O @ data processing: Data validation and identification of processing errors.

Procedures, functions,programs

Page 7: CHAPTER 1

Client/Server Database Environment

CISB344 Database 2

CLIENT/SERVER ARCHITECTURES

BR that have not been coded at the DBMS level may be coded in the processing component.

Business rules describe the operations, definitions and constraints that apply

to an organization in achieving its goals.

Procedures, functions,programs

Page 8: CHAPTER 1

Client/Server Database Environment

CISB344 Database 2

CLIENT/SERVER ARCHITECTURES

Identifies the data necessary for processing the transaction or query.

Procedures, functions,programs

Page 9: CHAPTER 1

Client/Server Database Environment

CISB344 Database 2

CLIENT/SERVER ARCHITECTURES

Responsible for data storage & retrieval from physical storage devicesActivities of a DBMS

DBMS activities

Page 10: CHAPTER 1

Client/Server Database Environment

CISB344 Database 2

PARTITIONING AN APPLICATION

No one optimal client/server architecture that is the best solution for all business problems.

Flexibility in client/Server architecture possibility of tailoring their configurations to fit their particular processing needs.

Page 11: CHAPTER 1

Client/Server Database Environment

CISB344 Database 2

APPLICATION PARTITIONING

The process of assigning portions of application code to client or server partitions after it is written to achieve better performance and interoperability.

Advantages› Improved performance› Improved interoperability› Balanced workloads

Page 12: CHAPTER 1

Client/Server Database Environment

CISB344 Database 2

APPLICATION PARTITIONING

Helps in tailoring› Gives developer opportunity to write

application code place either on a client workstation or on a server

Application code can be developed and tested on a client workstation

Page 13: CHAPTER 1

Client/Server Database Environment

CISB344 Database 2

APPLICATION PARTITIONING

Possible to add Transaction Processing Monitors (TP)

TP monitors – balance workload, directing transactions to servers that are not busy

TP also useful in distributed environments distributed transaction from a single unit of work can be managed across a heterogeneous environment.

Page 14: CHAPTER 1

Client/Server Database Environment

CISB344 Database 2

APPLICATION PARTITIONING

Common Logic Distributions – Two tier client server environments

Processing logic could be at client, server, or both

Page 15: CHAPTER 1

Client/Server Database Environment

CISB344 Database 2

APPLICATION PARTITIONING

Common Logic Distributions – n-tier client server environments

Processing logic will be at application server or Web server

Page 16: CHAPTER 1

Client/Server Database Environment

CISB344 Database 2

CLIENT/SERVER ARCHITECTURES

File Server Architecture

Database Server Architecture(Two Tier Architecture)

Three-tier Architecture

Client does extensive processing

Client does little processing

Page 17: CHAPTER 1

File server architecture

Page 18: CHAPTER 1

Client/Server Database Environment

CISB344 Database 2

FILE SERVER ARCHITECTURE

All processing is done at the PC that requested the data FAT CLIENT

Each client PC is authorized to use the DBMS when a database application program runs on that PC

Entire files are transferred from the server to the client for processing

Page 19: CHAPTER 1

Client/Server Database Environment

CISB344 Database 2

FILE SERVER ARCHITECTURE

CLIENT

Presentation Logic

Processing Logic

Storage Logic

Page 20: CHAPTER 1

Client/Server Database Environment

CISB344 Database 2

FILE SERVER ARCHITECTURE

Limitations:› Huge amount of data transfer on the network› Each client must contain full DBMS

Heavy resource demand on clients› Client DBMSs must recognize shared locks,

integrity checks.

Page 21: CHAPTER 1

Client/Server Database Environment

CISB344 Database 2

FILE SERVER ARCHITECTURE

A device that manages file

operations & shared by each of the client attached to the LAN

Page 22: CHAPTER 1

Client/Server Database Environment

CISB344 Database 2

FILE SERVER ARCHITECTURE

FAT CLIENT

Most processing occurs on the

client rather than on a server

Page 23: CHAPTER 1

Database server architecture

Page 24: CHAPTER 1

Client/Server Database Environment

CISB344 Database 2

DATABASE SERVER ARCHITECTURE

CLIENT

Presentation Logic

Data Processing

Logic

Business Rules Logic

Page 25: CHAPTER 1

Client/Server Database Environment

CISB344 Database 2

DATABASE SERVER ARCHITECTURE

Database Server

Database storage

Access

Processing

Page 26: CHAPTER 1

Client/Server Database Environment

CISB344 Database 2

DATABASE SERVER ARCHITECTURE

DBMS

Database Server

LAN traffic is reduced

SO

ON

Page 27: CHAPTER 1

Client/Server Database Environment

CISB344 Database 2

DATABASE SERVER ARCHITECTURE

Thinner clients

DBMS only on server

Page 28: CHAPTER 1

Client/Server Database Environment

CISB344 Database 2

DATABASE SERVER ARCHITECTURE

Database server not clients Database server can be tuned

optimize database processing performance

User authorization, integrity checking, data dictionary maintenance and query

Page 29: CHAPTER 1

Client/Server Database Environment

CISB344 Database 2

CHARACTERISTICS OF TWO-TIER CLIENT/SERVER SYSTEMS

Departmental in scope (few users) Not mission-critical Low transaction volumes Common programming languages:

› Java, VB .NET, C# Interface database via middleware,

APIs

Page 30: CHAPTER 1

Client/Server Database Environment

CISB344 Database 2

MIDDLEWARE AND API’s Middleware – software that allows an

application to interoperate with other software without requiring user to understand and code low-level operations

Application Program Interface (API) – routines that an application uses to direct the performance of procedures by the computer’s operating system

Common database APIs – ODBC, ADO .NET, JDBC

Page 31: CHAPTER 1

Client/Server Database Environment

CISB344 Database 2

STEPS FOR USING DATABASES VIA MIDDLEWARE API’s

1. Identify and register a database driver.2. Open a connection to a database.3. Execute a query against the database.4. Process the results of the query.5. Repeat steps 3–4 as necessary.6. Close the connection to the database.

Page 32: CHAPTER 1

Client/Server Database Environment

CISB344 Database 2

Page 33: CHAPTER 1

Three Tier Architecture

Page 34: CHAPTER 1

Client/Server Database Environment

CISB344 Database 2

THREE TIER ARCHITECTURE

A client/server configuration that includes three layers:› A client layer› 2 server layers

Additional server if compared to dbase server (2 tier)

Additional server may be used for different purposes:› Application programs: Application Server› Local database

Page 35: CHAPTER 1

Client/Server Database Environment

CISB344 Database 2

THREE TIER ARCHITECTURE

Thin 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)

Browser

Business rules Web Server

Data storage DBMS

Client

Application server

Database server

Page 36: CHAPTER 1

Client/Server Database Environment

CISB344 Database 2 THREE TIER ARCHITECTUREThin

clients

Business rules on application server

DBMS only on DB server

Page 37: CHAPTER 1

2 TIER VS 3 TIERFirst Tier

Client

Second TierDatabase

Server

TASK• User Interface

First TierClient

Second TierApplication

Server

Third TierDatabase

Server

TASK• Server-side validation• Database Access

TASK• User Interface• Main Business

TASK• Business Logic• Data Processing Logic

TASK• Data Validation• Database Access

Page 38: CHAPTER 1

Client/Server Database Environment

CISB344 Database 2

CLIENT VS. SERVERCLIENT SERVERManages the User Interface Accepts and processes database

requests from clientsAccepts and checks syntax of user input

Checks authorization

Processes application logic Ensures integrity constraints not violated

Generates database requests and transmits to server

Performs query/update processing and transmits response to client

Passes response back to user Maintains system catalogProvides concurrent database accessProvides recovery control

Page 39: CHAPTER 1

Client/Server Database Environment

CISB344 Database 2

THIN CLIENT An application where the client (PC)

accessing the application primarily provides the user interfaces and some application processing, usually with no or limited local data storage.

Most commonly, the thin client application is a Web browser and the 3-tier architecture involves a Web application.

Page 40: CHAPTER 1

Client/Server Database Environment

CISB344 Database 2

A database-enabled intranet/internet environment

Page 41: CHAPTER 1

Client/Server Database Environment

CISB344 Database 2 WEB APPLICATION COMPONENTS

Database server – hosts storage logic for the application and hosts the DBMS› e.g. Oracle, SQL Server, Informix, MS Access, MySql

Web server – receive and respond to browser requests using HTTP/HTTPS protocol› e.g. Apache, Internet Information Services (IIS)

Application server – software building blocks for creating dynamic web sites and web based application› e.g. MS ASP .NET framework, Java EE, ColdFusion, PHP,

Python and PERL Web browser – client program that sends web

requests and receives web pages› e.g. Internet Explorer, Firefox, Safari, Google Chrome

Page 42: CHAPTER 1

Client/Server Database Environment

CISB344 Database 2LANGUAGES FOR CREATING WEB PAGES

Hypertext Markup Language (HTML)› Markup language specifically for Web pages

Standard Generalized Markup Language (SGML)› Markup language standard

Extensible Markup Language (XML)› Markup language allowing customized tags

XHTML› XML-compliant extension of HTML

JavaScript/VBScript › Scripting languages that enable interactivity in HTML

documents Cascading Style Sheets (CSS)

› Control appearance of Web elements in an HML document XSL and XSLT

› XMS style sheet and transformation to HTML

Standards and Web conventions established by

World Wide Web Consortium (W3C)

Page 43: CHAPTER 1

Client/Server Database Environment

CISB344 Database 2

PROCESSING IN 3-TIER APPLICATIONS

Static page requests › .htm or .html requests are handled by the

Web server only Dynamic page requests

› .jsp, .aspx, and .php requests are routed to the application server

› Server-side processing by JSP servlet, ASP .NET application, ColdFusion, or PHP

› Database access via JDBC, ADO .NET, or other database middleware

Page 44: CHAPTER 1

Client/Server Database Environment

CISB344 Database 2

INFORMATION FLOW IN A THREE-TIER ARCHITECTURE

Page 45: CHAPTER 1

Client/Server Database Environment

CISB344 Database 2

A REGISTRATION PAGE WRITTEN IN ASP.NET

Page 46: CHAPTER 1

Client/Server Database Environment

CISB344 Database 2

A REGISTRATION PAGE WRITTEN IN ASP.NET

Form for the ASP .NET application

Page 47: CHAPTER 1

Client/Server Database Environment

CISB344 Database 2

CONSIDERATIONS IN 3-TIER APPLICATIONS

Stored procedures› Code logic embedded in DBMS› Improve performance, but proprietary

Transactions› Involve many database updates› Either all must succeed, or none should

occur Database connections

› Maintaining an open connection is resource-intensive

› Use of connection pooling

Page 48: CHAPTER 1

Client/Server Database Environment

CISB344 Database 2

BENEFITS OF STORED PROCEDURES

Performance improves for compiled SQL statements

Reduced network traffic Improved security Improved data integrity Thinner clients

Page 49: CHAPTER 1

Client/Server Database Environment

CISB344 Database 2

THREE TIER ARCHITECTURE

Advantages› Scalability› Technological Flexibility› Long-term cost reduction› Better match of systems to business needs› Improved customer service› Competitive advantage› Reduced risk

Page 50: CHAPTER 1

Information in this slides were taken from Modern Database Management System, Ninth edition by Jeffrey A.Hoffer, Mary B.Prescott & Heikki Topi.

END OF CHAPTER

Page 51: CHAPTER 1

Client/Server Database Environment

CISB344 Database 2

STORED PROCEDURE SQL:

› SELECT Product, QuantityFROM InventoryWHERE Warehouse = ‘Kajang‘

CREATE PROCEDURE sp_GetInventory@location varchar(10)ASSELECT Product, QuantityFROM InventoryWHERE Warehouse = @location

EXECUTE sp_GetInventory ‘Kajang'

Page 52: CHAPTER 1

Client/Server Database Environment

CISB344 Database 2

STORED PROCEDURE CREATE PROCEDURE Delete_Employee       (@EmployeeId INT)   

AS    

BEGIN      DELETE FROM  Employees       WHERE  EmployeeId = @EmployeeId;   

END 

EXECUTE Delete_Employee(8)  


Recommended