Download BICS546 Client/Server Database Application Development

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Extensible Storage Engine wikipedia , lookup

Oracle Database wikipedia , lookup

IMDb wikipedia , lookup

Microsoft Access wikipedia , lookup

Ingres (database) wikipedia , lookup

Btrieve wikipedia , lookup

Team Foundation Server wikipedia , lookup

Relational model wikipedia , lookup

Concurrency control wikipedia , lookup

Database wikipedia , lookup

Microsoft Jet Database Engine wikipedia , lookup

Open Database Connectivity wikipedia , lookup

Microsoft SQL Server wikipedia , lookup

Database model wikipedia , lookup

ContactPoint wikipedia , lookup

Clusterpoint wikipedia , lookup

Versant Object Database wikipedia , lookup

Transcript
ISYS 546
Client/Server Database
Application Development
Database Application
• Database application is a program that
interacts with the database at some point in
its execution.
• It consists of an organized set of menus,
forms, reports, business rules, and the
database it operates on.
Evolution of Multi-User Database Application
Architectures
• Teleprocessing:
– One computer with a single CPU and a number of dumb terminals.
– Add burden on the central computer, which not only had to run the
application programs and DBMS, but also had to carry out a
significant amount of work on behalf of the terminals (such as
formatting data for display)
• File-Server:
– Applications run on workstations that contain a full copy of the
DBMS. File-server acts as a shared hard disk drive. The DBMS on
each workstation sends requests to the file-server for data, but none of
the processing is done by the server.
– Generate a significant amount of network traffic.
• Client-Server:
– Computer network development
– Balanced distributed processing
SQL queries
Client
Database Server
Results
Database Server: A high processing power computer with
advanced DBMS.
Client: A PC that runs database applications.
SQL interface.
Client Functions
•
•
•
•
Manages the user interface.
Accepts and checks syntax of user input.
Implements business rules.
Generates database requests and transmits
to server.
• Passes response back to user.
Database Server Functions
• Checks authorization.
• Accepts and processes database requests from
clients.
• Ensures integrity constraints not violated.
• Performs query/update processing and transmits
response to client.
• Provides concurrent database access, transaction
management, and recovery control.
Advantages of Client-Server
Architecture
• Enables wider access to databases.
• Increased performance: Different CPUs can be
processing applications in parallel.
• Hardware costs may be reduced: Only server
requires higher storage and processing power to
manage the database.
• Network traffic is reduced: Only database requests
and results are sent.
• Increased database integrity.
The three components in a
database application
1. Presentation – user interface
• Menus, forms, reports, etc
2. Processing logic
• Business rules
3. Database
Categories of Database
Applications
• One-Tier
– Legacy online transaction processing
– PC database application
• Two-Tier client/server
– Client-based presentation.
– Processing logic is buried either inside the user
interface on the client or within the database on the
server, or both.
• Three-Tier, N- tier
– Processing logic is separated from the interface and
database.
Two-tier
• Simplicity
• Provides a basic separation of tasks. The client is
primarily responsible for the presentation of data
to user, and the server is primarily responsible for
supplying data services to the client.
• Fat client:
– More functions are placed on the client
• Fat server:
– More functions are placed on the server.
Three-Tier
• 1. User interface, 2. Business logic and data
processing layer, 3. Database server.
• Advantage:
– Implementing business rules as components.
• Objects that provide services to other client applications.
– Application maintenance is centralized.
– Separation of the business logic from the database
functions.
– Fit naturally to the Internet environment.
Benefits of Building Applications from
Components
• Reusability
– Many applications can share the services provided
by the same component.
• Manageability
– By dividing a program into components, a project
can be divided into smaller, more manageable
tasks, and each individual programmers can build
components for which their skills are best suited.
• Maintenance
– Each component can be maintained as an
individual unit.
Progression of the Internet
• Hypertext web
– Publishing static web pages
• Simple response web – Dynamic database pages
– Stateless
– Cookies
– Maintain session with server side scripts, ASP, JSP
• Object web
– Provides object- to –object interactions between client
object and server object.
– Require web server to mediate between objects running on
the client and objects running on the server.
The Web as a Database Application Platform
• Three-tier architecture
– Browser, web server, database server,
processing logic
• Advantages:
– Cross-platform support
– Graphical user interface
The Web as a Database Application Platform
• Disadvantages
– Reliability: Internet is unreliable and slow.
– Security
– Costs: hardware and software 20%, marketing
24%, content development 56%.
– Potentially enormous peak load.
Approaches to Integrating the Web and
DBMSs
• Common Gateway Interface (CGI)
– Lack of transaction support due to the
statelessness of HTTP. The database server
must perform the same logon and logout for
every query submitted by the same user.
• JAVA 2 Platform
• Microsoft Platform
• Others
Java 2 Platform
• Presentation Tier:
– JavaScript, Java applet
• Server site scripting:
– Java Server Pages
• Business tier:
– Enterprise Java Beans (EJB): A standard for building
server-site components in Java.
• Database access:
– JDBC
– SQLJ: Static embeded SQL in Java.
Old Microsoft Platform
• Presentation Tier:
– VBScript, JScript
• Web server and Server site scripting:
– Internet Information Server, Active Server Pages
• Business tier:
– COM ActiveX components
• Component Object Model consists of a specification that defines
the interface between objects and an implementation packaged
as a Dynamic Link Library (DLL).
• Database access:
– ODBC: An interface to access relational databases.
.Net Architecture
VB.Net
C#
C++
Common Language Specification
ASP.Net
Windows Forms
Data and XML
Base Class Library
Common Language Runtime
Microsoft’s .Net
• Language must compliance with Common
Language Specification, CLS.
• Compile the language into Microsoft Intermediate
Language (MSIL) code.
• The MSIL code is then executed in the
Common Language Runtime (CLR), which
conceptually is same as the JVM, where it is
translated into machine code by a compiler.
• Common Language Runtime:
– Manages execution of compiled .NET program.
– Provides .Net basic services, such as memory
management, garbage collection, etc.
• Base Class library: define all the basic data types
such as system.object, numeric, date, etc.
• Data and XML: Classes work with database
(ADO.NET) and XML document.
• ASP.Net and Forms: Classes that generate user
interface.
• CLS: CLS dictates the minimum group of features
that a .Net language must have.
.Net Advantages
• It is independence from a specific language.
Developers can create a .Net application in any
.Net compatible language.
– .Net moves most of the functionality from the language
to the .Net Framework. All .Net languages can use
these classes.
• It can exist on multiple platforms, further
extending the portability of .Net programs.
• Facilitate internet application development:
– ASP.Net: Web Forms and XML Web services.
• Universal data access: Data can be accessed by
any Internet-connected device.
Programming in the .Net
Framework
• Programming in the .Net Framework means
making use of the classes, objects, and
members exposed by the Framework,
building your own classes on top of these
and manipulating the resulting objects using
a .Net language.
Techniques Covered in ISYS546
• Prerequisites: Programming, Database, SQL
• .Net Framework
• Visual Basic .NET
– Interface and event-driven programming
– Class and component programming
• Database programming
– ADO.NET programming model
• Web Techniques:
– Server side scripting: ASP.NET
– Web services:
• Introduction to XML