W01 Two Tier Database Development

Embed Size (px)

Citation preview

  • 8/7/2019 W01 Two Tier Database Development

    1/19

    Database Application DevelopmentDatabase Application DevelopmentEnvironmentEnvironment

    Dr. Farhi MarirHead of the Knowledge Management Research Centre (KMC),

    CCTM Department,

    London Metropolitan University

    30 January 2008 Copyright 2008 Dr. F. Marir2

    Plan of the lecturePlan of the lecture

    l Database Application Development Environment

    l Client/Server Architecture

    l Client/Server two tier architecture forDatabase Application Development

    l ORACLE Development tools for DevelopingClient/Server two tier Database Application

    l Limitation of Client Server two tierArchitecture and the Emergence of Threetier Architecture

    l DB3012 Module Scheme of Work

  • 8/7/2019 W01 Two Tier Database Development

    2/19

    30 January 2008 Copyright 2008 Dr. F. Marir 3

    Database ApplicationDatabase ApplicationDevelopment EnvironmentDevelopment Environment

    30 January 2008 Copyright 2008 Dr. F. Marir4

    Database application developmentDatabase application development

    l A database application is any application thataccesses stored data and allows you to view,modify or manipulate that data.

    l In most cases, the data is stored in a database.l A database application that requests information

    from a data source such as a database is knownas a client applicationl A DBMS (Database Management System) that

    handles data requests from various clients isknown as a database server

    l There are different architecture environmentfor developing database application

  • 8/7/2019 W01 Two Tier Database Development

    3/19

    30 January 2008 Copyright 2008 Dr. F. Marir 5

    Architecture Environment for developingArchitecture Environment for developingdatabase applicationsdatabase applications

    l There are at least three architectureEnvironment for database applicationdevelopment Mainframe architecture

    File sharing architecture

    Client/server architecture

    30 January 2008 Copyright 2008 Dr. F. Marir6

    Mainframe architectureMainframe architecture

    l All intelligence is within the central hostcomputer

    l Users interact with the host through a terminalthat captures keystrokes and sends thatinformation to the host

    l Mainframe software architectures are not tied

    to a hardware platforml User interaction can be done using PCs and UNIX

    workstationsl A limitation of mainframe software

    architectures: they do not easily support graphical user interfaces they do not access to multiple databases from

    geographically dispersed sites.

  • 8/7/2019 W01 Two Tier Database Development

    4/19

    30 January 2008 Copyright 2008 Dr. F. Marir 7

    File Sharing ArchitectureFile Sharing Architecturel The original PC networks were based on file sharing

    architectures, where the server downloads files from theshared location to the desktop environment.

    l The requested user job is then run (including logic anddata) in the desktop environment.l File sharing architectures work if :

    shared usage is low,

    update contention is low, and the volume of data to be transferred is low.

    l A limitation of file software architectures the capacity of the file sharing is strained when the number of

    online user grew (it can only satisfy about 12 userssimultaneously)

    graphical user interfaces (GUIs) became popular (makingmainframe and terminal displays appear out of date).

    30 January 2008 Copyright 2008 Dr. F. Marir8

    Client/Server ArchitectureClient/Server Architecture

  • 8/7/2019 W01 Two Tier Database Development

    5/19

    30 January 2008 Copyright 2008 Dr. F. Marir 9

    Client/Server ArchitectureClient/Server Architecture

    l As a result of the limitations of file sharingarchitectures, the client/server architectureemerged

    l The term client/server was first used in the 1980s inreference to personal computers (PCs) on a network

    l This approach introduced a database server toreplace the file server

    l Using a relational database management system,user queries could be answered directly using

    Standard query language (SQL) statements ORRemote Procedure Calls (RPCs) which are typically usedto communicate between the client and server

    30 January 2008 Copyright 2008 Dr. F. Marir10

    Benefit of Client/ServerBenefit of Client/ServerArchitecture database DevelopmentArchitecture database Development

    l It is a versatile, message-based and modularinfrastructure

    l It is intended to improve usability, flexibility,interoperability, and scalability as compared to

    centralised, mainframe, time sharing computingl It reduces network traffic by providing a query

    response rather than total file transfer

    l It also improves multi-user updating through aGraphical User Interface (GUI) front end to ashared database.

  • 8/7/2019 W01 Two Tier Database Development

    6/19

    30 January 2008 Copyright 2008 Dr. F. Marir 11

    Characteristics of a ClientCharacteristics of a Client

    l Request sender is known as client

    l

    Initiates requestsl Waits for and receives replies.

    l Usually connects to a small number ofservers at one time

    l Typically interacts directly with end-usersusing a graphical user interface (GUI)

    30 January 2008 Copyright 2008 Dr. F. Marir12

    Characteristics of a ServerCharacteristics of a Server

    l Receiver of request which is sent by client isknown as server

    l Passive (slave)l Waits for requests from clients

    l Upon receipt of requests, processes them andthen serves repliesl Usually accepts connections from a large number

    of clientsl Typically does not interact directly with end-

    users

  • 8/7/2019 W01 Two Tier Database Development

    7/19

    30 January 2008 Copyright 2008 Dr. F. Marir 13

    Client & Server locationsClient & Server locations

    l One machine is devoted to Client andanother machine is devoted to Server

    l Also a single machine can be both a clientand a server depending on the softwareconfiguration

    30 January 2008 Copyright 2008 Dr. F. Marir14

    An Example of Client/ServerAn Example of Client/ServerArchitectureArchitecture

    l When you are visiting an e-commerce web site: your computer and web browser is the client,

    the remote computers, databases, and applications which respondis the server.

    When your web browser requests specific information from theonline store, the server finds all of the data in the database you

    requested, assembles that data into a web page, and transmitsthat page back to your web browser for you to view.

    l Specific types of clients include web browsers, emailclients, and online chat clients.

    l Specific types of servers include web servers, ftpservers, application servers, database servers, mailservers, file servers, print servers, and terminal servers.

    l Most web services are also types of servers.

  • 8/7/2019 W01 Two Tier Database Development

    8/19

    30 January 2008 Copyright 2008 Dr. F. Marir 15

    Type of Client/Server ArchitectureType of Client/Server Architecture

    Client/Server architecture could bel Two tier Architecture

    l Three tier Architecture is the mostcommonly used type of client-serverarchitecture

    l Designs that contain more than two tiersare referred to as multi-tiered or n-tiered(n-tier).

    30 January 2008 Copyright 2008 Dr. F. Marir16

    Client/Server twoClient/Server two-- tiertier

    ArchitectureArchitecture

  • 8/7/2019 W01 Two Tier Database Development

    9/19

    30 January 2008 Copyright 2008 Dr. F. Marir 17

    TwoTwo-- tier Client/Server Architecturetier Client/Server Architecture

    l A two-tier client/server application architectureis implemented when a client talks directly to aserver, with no intermediate server.

    l It is typically used in small environments of lessthan 50 users.l Generally two-tier architecture separates:

    the user interface and the business logic (data logic) into onecomputer (Client or Tier1) and

    the database management server is into another computer(Server or Tier2).

    l The database management server provides storedprocedures and triggers.

    l There are a number of software vendors e.g. ORACLE

    which provide tools to simplify development of databaseapplications for the two tier client/server architecture

    30 January 2008 Copyright 2008 Dr. F. Marir18

    TwoTwo-- Tier Client/Server ArchitectureTier Client/Server Architecture

  • 8/7/2019 W01 Two Tier Database Development

    10/19

    ClientClient

    UniversalUniversalDatabaseDatabase

    Client/Server twoClient/Server two-- tier Benefitstier Benefits

    Rich GUIMulti-Tasking

    ReliabilityAvailabilityServiceability

    30 January 2008 Copyright 2008 Dr. F. Marir20

    ORACLE Tools for Developing twoORACLE Tools for Developing two--

    tier Database Applicationtier Database Application

  • 8/7/2019 W01 Two Tier Database Development

    11/19

    l

    Oracle Designer Oracle Developer

    ORACLE tools for two- tierDatabase Application Development

    30 January 2008 Copyright 2008 Dr. F. Marir22

    ORACLE DesignerORACLE Designer

    l It is used to design the database serverapplication

    l It is used to create E-R diagrams, FunctionHierarchy diagrams, Process diagrams, and DataFlow diagrams that are needed to design a

    database server and implement a user definedsystem in client's organizationl It provides a multi-user repository and is closely

    integrated with ORACLE Forms and ReportDeveloper

    l It allows organizations to design and rapidlydeliver scalable, database server application thatcan adapt to changing business needs.

  • 8/7/2019 W01 Two Tier Database Development

    12/19

    30 January 2008 Copyright 2008 Dr. F. Marir 23

    ORACLE Designer EditorORACLE Designer Editor

    30 January 2008 Copyright 2008 Dr. F. Marir24

    Creating the Entities RelationshipCreating the Entities RelationshipDiagram Using ORACLE DesignerDiagram Using ORACLE Designer

  • 8/7/2019 W01 Two Tier Database Development

    13/19

    30 January 2008 Copyright 2008 Dr. F. Marir 25

    Convert the ERD into an ORACLEConvert the ERD into an ORACLEdatabase tables using Databasedatabase tables using Database

    Design TransformerDesign Transformer

    30 January 2008 Copyright 2008 Dr. F. Marir26

    ORACLE Developer SuiteORACLE Developer Suite

    l It is a tool that helps you to create formsand reports based on the tables that youhave created using ORACLE Designer

    l You can use Developer to:

    Design and customize your forms and reports. Add various functionality, like radio buttons,

    combo boxes, and list of values to make yourforms and reports more user friendly.

    Write triggers on your objects to addfunctionality to them and capture errors.

  • 8/7/2019 W01 Two Tier Database Development

    14/19

    ORACLE Developer tool for theORACLE Developer tool for thedesign of Client Sidedesign of Client Side

    Interactive Formsand Menus

    Interactive Formsand Menus

    ProfessionalReport andDatabasePublishing

    ProfessionalReport andDatabasePublishing

    Charting and

    GraphicalApplications

    Charting and

    GraphicalApplications

    PL/SQL Editing

    and Debugging

    PL/SQL Editing

    and Debugging

    Project

    Management

    ProjectManagement

    30 January 2008 Copyright 2008 Dr. F. Marir28

    Design Client Interface usingDesign Client Interface usingForm BuilderForm Builder

  • 8/7/2019 W01 Two Tier Database Development

    15/19

    Forms BuilderForms Builderfor Creating Client sidefor Creating Client side

    l Graphical WYSIWYGEditors

    l All standard GUIControls

    l Complete Event Model

    l Thin Client and WebDeployment

    l Object Navigator

    l Property Palettes

    Reports Builder for Client sideReports Builder for Client side

    l Graphical WYSIWYGEditors

    l Multiple Formatssupported like

    tabular and matrixl Standard output

    formats includingHTML and PDFfor the Web

    l Multi-Tier support

  • 8/7/2019 W01 Two Tier Database Development

    16/19

    30 January 2008 Copyright 2008 Dr. F. Marir 31

    Limitation of Client Server twoLimitation of Client Server twotier Architecturetier Architecture

    30 January 2008 Copyright 2008 Dr. F. Marir32

    TwoTwo-- tiers Client/Servertiers Client/ServerArchitecture LimitationArchitecture Limitation

    l Client side presented two problems preventingtrue scalability:

    Fat client, requiring considerable resources on clients computerto run effectively.

    Significant client side administration overhead.

    l

    It has also a number of other limitations: When the number of users exceeds 100, performance begins todeteriorate.

    Implementation of processing management services using vendorproprietary database procedures restricts flexibility and choiceof DBMS for applications.

    Provide limited flexibility in moving (repartitioning) programfunctionality from one server to another without manuallyregenerating procedural code

  • 8/7/2019 W01 Two Tier Database Development

    17/19

    30 January 2008 Copyright 2008 Dr. F. Marir 33

    Three tier ArchitectureThree tier Architecture

    l By 1995, three tier architecture wasproposed, each potentially running on adifferent platform.

    l In the next lecture students will learnmore on three tier architecture andhow to develop it using ORACLE tools

    30 January 2008 Copyright 2008 Dr. F. Marir34

    Module Schedule of WorkModule Schedule of Work

    from Week 1 to Week 1 2from Week 1 to Week 1 2

  • 8/7/2019 W01 Two Tier Database Development

    18/19

    30 January 2008 Copyright 2008 Dr. F. Marir 35

    W1 to W2 LecturesW1 to W2 Lectures

    l Week 1 and Week 2 will focus on theintroduction of Database Application

    Development in the two differentenvironments: Client/Server two tier architecture and

    Client/Server three tier architecture

    30 January 2008 Copyright 2008 Dr. F. Marir36

    W3 to W7 Organisation of lectures,W3 to W7 Organisation of lectures,tutorials and Coursework 1tutorials and Coursework 1

    l From Week 3 to Week 8 students will learn throughlectures and tutorials how to develop two-tier databaseapplications using ORACLE Designer, ORACLE DeveloperSuite and Procedural Language (PL)/SQL

    l In particular the student will learn: How to design an ORACLE database (Server) using ORACLE

    Designer How to design ORACLE forms and reports (Client) using ORACLE

    Developer Suite How to write PL/SQL programs to develop interaction OR driven

    events interface between Client and Database Server How to use SQL and PL/SQL to develop triggers which are

    implicitly run, or fired, when and event happens

    l Tutorial on Database Development in two tierarchitecture environment will start in week 2 till Week 7

    l Coursework 1 will be given in week 2/3 and should besubmitted in week 9 and Demo of the CWK1 databaseapplication in Week11

  • 8/7/2019 W01 Two Tier Database Development

    19/19

    30 January 2008 Copyright 2008 Dr. F. Marir 37

    W8 to W12 Lectures, Tutorials andW8 to W12 Lectures, Tutorials andCoursework 2Coursework 2

    l Lectures and tutorials will focus on

    Database development in three tierarchitecture environment and also newtrends in database systems

    l Coursework 2 will be given in Week 7 andshould be submitted in Week 12