M1G505190 Introduction to Database Development 6. Building Applications.

Slides:



Advertisements
Similar presentations
Copyright 2004 Monash University IMS5401 Web-based Systems Development Topic 2: Elements of the Web (g) Interactivity.
Advertisements

Technical Architectures
Distributed Systems Architectures
Introduction to Web Database Processing
Web Servers How do our requests for resources on the Internet get handled? Can they be located anywhere? Global?
Dynamic Web Pages. Web Programming  All our web pages so far have been static pages. 1. We create a web page 2. We upload it to the web server 3. People.
Week 2 IBS 685. Static Page Architecture The user requests the page by typing a URL in a browser The Browser requests the page from the Web Server The.
Multiple Tiers in Action
©Silberschatz, Korth and Sudarshan1.1Database System Concepts Chapter 1: Introduction Purpose of Database Systems View of Data Data Models Data Definition.
How Clients and Servers Work Together. Objectives Learn about the interaction of clients and servers Explore the features and functions of Web servers.
M1G Introduction to Database Development 1. Databases and Database Design.
Chapter 7 Managing Data Sources. ASP.NET 2.0, Third Edition2.
1 © Prentice Hall, 2002 The Client/Server Database Environment.
Lecture The Client/Server Database Environment
The Client/Server Database Environment
Chapter 2 Database System Concepts and Architecture
Introduction to Databases Transparencies 1. ©Pearson Education 2009 Objectives Common uses of database systems. Meaning of the term database. Meaning.
Sys Prog & Scripting - HW Univ1 Systems Programming & Scripting Lecture 15: PHP Introduction.
1 Web Database Processing. Web Database Applications Static Report Publishing a report is prepared from a database application and exported to HTML DB.
IT – DBMS Concepts Relational Database Theory.
CSCI 6962: Server-side Design and Programming Course Introduction and Overview.
Computing for Bioinformatics Introduction to databases What is a database? Database system components Data types DBMS architectures DBMS systems available.
Database System Concepts and Architecture Lecture # 3 22 June 2012 National University of Computer and Emerging Sciences.
Copyright © cs-tutorial.com. Introduction to Web Development In 1990 and 1991,Tim Berners-Lee created the World Wide Web at the European Laboratory for.
Databases and the Internet. Lecture Objectives Databases and the Internet Characteristics and Benefits of Internet Server-Side vs. Client-Side Special.
1 DATABASE TECHNOLOGIES BUS Abdou Illia, Fall 2012 (September 5, 2012)
4-1 INTERNET DATABASE CONNECTOR Colorado Technical University IT420 Tim Peterson.
Basics of Web Databases With the advent of Web database technology, Web pages are no longer static, but dynamic with connection to a back-end database.
Introduction to distributed systems Dr. S. Indran 23 January 2004.
1 PHP and MySQL. 2 Topics  Querying Data with PHP  User-Driven Querying  Writing Data with PHP and MySQL PHP and MySQL.
Chapter 1 Introduction to Databases Pearson Education ©
Web-Enabled Decision Support Systems
DATABASE PROGRAMMING Lecture on 16 – 05 – PREVIOUS LECTURE QUIZ: - Some students were very creative in transforming 2NF to 3NF. Excellent! - Some.
Part 1. Persistent Data Web applications remember your setting by means of a database linked to the site.
HOW WEB SERVER WORKS? By- PUSHPENDU MONDAL RAJAT CHAUHAN RAHUL YADAV RANJIT MEENA RAHUL TYAGI.
MET280: Computing for Bioinformatics Introduction to databases What is a database? Not a spreadsheet. Data types and uses DBMS (DataBase Management System)
I Information Systems Technology Ross Malaga 4 "Part I Understanding Information Systems Technology" Copyright © 2005 Prentice Hall, Inc. 4-1 DATABASE.
Database Design and Management CPTG /23/2015Chapter 12 of 38 Functions of a Database Store data Store data School: student records, class schedules,
The Client/Server Database Environment Ployphan Sornsuwit KPRU Ref.
1 Welcome to CSC 301 Web Programming Charles Frank.
Mainframe (Host) - Communications - User Interface - Business Logic - DBMS - Operating System - Storage (DB Files) Terminal (Display/Keyboard) Terminal.
COMU114: Introduction to Database Development 1. Databases and Database Design.
5 - 1 Copyright © 2006, The McGraw-Hill Companies, Inc. All rights reserved.
Lesson Overview 3.1 Components of the DBMS 3.1 Components of the DBMS 3.2 Components of The Database Application 3.2 Components of The Database Application.
1 Web Servers (Chapter 21 – Pages( ) Outline 21.1 Introduction 21.2 HTTP Request Types 21.3 System Architecture.
DATABASE CONNECTIVITY TO MYSQL. Introduction =>A real life application needs to manipulate data stored in a Database. =>A database is a collection of.
Database Management Supplement 1. 2 I. The Hierarchy of Data Database File (Entity, Table) Record (info for a specific entity, Row) Field (Attribute,
Web Technologies Lecture 8 Server side web. Client Side vs. Server Side Web Client-side code executes on the end-user's computer, usually within a web.
JS (Java Servlets). Internet evolution [1] The internet Internet started of as a static content dispersal and delivery mechanism, where files residing.
JSP Server Integrated with Oracle8i Project2, CMSC691X Summer02 Ching-li Peng Ying Zhang.
WEB SERVER SOFTWARE FEATURE SETS
The World Wide Web. What is the worldwide web? The content of the worldwide web is held on individual pages which are gathered together to form websites.
IS2803 Developing Multimedia Applications for Business (Part 2) Lecture 1: Introduction to IS2803 Rob Gleasure
CP476 Internet Computing Perl CGI and MySql 1 Relational Databases –A database is a collection of data organized to allow relatively easy access for retrievals,
JavaScript 101 Introduction to Programming. Topics What is programming? The common elements found in most programming languages Introduction to JavaScript.
8 th Semester, Batch 2009 Department Of Computer Science SSUET.
CSC 480 Software Engineering Lecture 17 Nov 4, 2002.
DAT602 Database Application Development Lecture 1 Course Structure & Background knowledge.
CS 440 Database Management Systems Stored procedures & OR mapping 1.
E-commerce Architecture Ayşe Başar Bener. Client Server Architecture E-commerce is based on client/ server architecture –Client processes requesting service.
Web Technologies IT230 Dr Mohamed Habib.
Chapter 2 Database System Concepts and Architecture
Web Development Web Servers.
Chapter 2 Client/Server Applications
MVC and other n-tier Architectures
PHP / MySQL Introduction
DATABASE TECHNOLOGIES
Objectives Explain the role of computers in client-server and peer-to-peer networks Explain the advantages and disadvantages of client- server and peer-to-peer.
Presentation transcript:

M1G Introduction to Database Development 6. Building Applications

Databases and applications Up to now you have been working directly with the tables and queries in a database However, it’s unlikely that you would want the end-users of your database to work with those tables and queries The users of the GCUTours system, for example, just want an easy way to book holidays Introduction to Database Development 6. Building applications 2

Databases and applications To be useful, a database usually needs to be part of an application. There are two main reasons for creating an application: to provide a user-friendly interface for getting information into and out of the database to provide processing of information, or business logic, over and above the capability of SQL queries Introduction to Database Development 6. Building applications 3

Business logic An example of a piece of business logic in the GCUTours system might be: when a new booking is created, the system should update the value of the sales value for the appropriate package Introduction to Database Development 6. Building applications 4

Different viewpoints on databases and applications Introduction to Database Development 6. Building applications 5

RDBMS application Uses tools provided by the RDBMS Form and report designers create the interface forms and reports can be created as web pages or as desktop applications A programming language built into the RDBMS can be used to write business logic, e.g. Oracle PL/SQL Introduction to Database Development 6. Building applications 6

Client-server application Desktop client application written in a programming language such as C# or Java Connects to a database server to store and retrieve data Database server is usually on a separate computer which can be accessed over a network by many clients Introduction to Database Development 6. Building applications 7

Web application HTML web pages with code included which queries the database and allows results to be embedded in page Needs a web application server Code written in a programming language such as C# or Java Code to query database runs on a server and HTML page with data is sent to web browser Suitable for very simple applications Introduction to Database Development 6. Building applications 8

Enterprise application Uses same technology as web application but designed for larger, more complex applications Application is organised in layers/tiers, each with their own role, e.g. database access Information is represented as classes and objects within the application, and passed to a database for long-term storage Introduction to Database Development 6. Building applications 9

What they have in common Forms allow users to enter information Reports or summaries of information are presented to users User actions result in business logic being carried out Introduction to Database Development 6. Building applications 10

Application Design Regardless of the tools used, applications must be carefully designed to allow the user to carry out the tasks associated with the use cases of the system Users focus on tasks Should not be required to understand the structure of the underlying database Introduction to Database Development 6. Building applications 11

Application Design The interface should: present the user with information in a way which matches the task rather than the database gather information from the user which needs to be stored An application is not just an interface to the database Needs to have interface and business logic implemented by writing code in a programming language Introduction to Database Development 6. Building applications 12

Database servers In many applications the database needs to be shared by many clients at the same time. Databases which need to be accessed concurrently are located on database servers Software running on the same computer as the client, or on a separate computer which clients access over a network Sometimes the computer which hosts the database is known as a database server Introduction to Database Development 6. Building applications 13

Database servers Many popular RDBMSs are designed to work in this client-server mode e.g. Oracle, MySQL and Microsoft SQL Server SQL Server Compact and Microsoft Access are designed mainly to be embedded within a single application Not suitable for large-scale applications However, the principles of database design and the SQL language are the same Introduction to Database Development 6. Building applications 14

Web applications with WebMatrix Demo Introduction to Database Development 6. Building applications 15

Reports A report should give an easily readable summary of data in a database Often present information to company managers For example, monthly sales reports Some RDBMSs and development tools have report generators Other specialised reporting tools available, e.g. Crystal Reports Introduction to Database Development 6. Building applications 16

Report example Introduction to Database Development 6. Building applications 17

Connecting to a database In the WebMatrix examples we have seen here, the database is a SQL Server Compact database which is included in the application Code simply opens the database file. var db = Database.Open("gcutourswm"); In many cases, however, applications which use databases are separate from the application Need to connect to database server Introduction to Database Development 6. Building applications 18

Information needed to make a connection The database driver – a piece of software which provides an interface between the application language (e.g. Java, Visual Basic) and a specific type of database (e.g. Access, Oracle, JavaDB) The network address or name of the computer where the database is located The name of the specific database on that computer (e.g. the gcutours database) Introduction to Database Development 6. Building applications 19

Database connections Connection details often combined into a string of characters called the database URL It’s possible to connect to just about any type of database from just about any programming language, as long as you have a suitable database driver Once the connection has been made the application usually communicates with the database by sending SQL queries Introduction to Database Development 6. Building applications 20

Connecting to a JavaDB database The GCUTours case study application connects to a JavaDB database The following lines of Java code sets up the connection information In this case, the database is on the same computer as the application, so the network name is localhost Introduction to Database Development 6. Building applications 21

That’s all for now, but... Some database topics to be covered in other modules include: Entity-relationship modelling More SQL Other database systems (e.g. Oracle) Database programming Database administration and security Transactions Handling large numbers of users Databases and object-oriented languages... Introduction to Database Development 6. Building applications 22