The Bookstore Problem. Contents I.Problem Description II.Solution III.Exercise.

Slides:



Advertisements
Similar presentations
COMP 321 Week 1. Application Server Programming Introduction to server-based programming using an object-oriented approach You will learn and reflect.
Advertisements

Murach’s Java SE 6, C21© 2007, Mike Murach & Associates, Inc.Slide 1.
Using Eclipse. Getting Started There are three ways to create a Java project: 1:Select File > New > Project, 2 Select the arrow of the button in the upper.
Bin Fu 03/27/ Spring 2012 Homework 7 Building A Web Application School of Computer Science.
James Tam Introduction To Design Patterns You will learn about design techniques that have been successfully applied to different scenarios.
Computer Monitoring System for EE Faculty By Yaroslav Ross And Denis Zakrevsky Supervisor: Viktor Kulikov.
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.
James Tam Introduction To Design Patterns You will learn about design techniques that have been successfully applied to different scenarios.
Eclipse for Jena & ARQ. File needed Jena ( ARQ-2.2 (
ECE356 – Database Systems Lab 1 – Building a Web Project with NetBeans Tiuley Alguindigue Lab Instructor – University of Waterloo, E & CE Dept. Fall 2013.
Eclipse IDE. 2 IDE Overview An IDE is an Interactive Development Environment Different IDEs meet different needs BlueJ and DrJava are designed as teaching.
03 Using Eclipse. 2 IDE Overview An IDE is an Interactive Development Environment Different IDEs meet different needs BlueJ and DrJava are designed as.
® IBM Software Group © 2006 IBM Corporation How to read/write XML using EGL This Learning Module shows how to utilize an EGL Library to read/write an XML.
Label production Solution with Label Gallery programs Label Gallery is used for general label design and print GalleryData is used to create small database.
CSCI 6962: Server-side Design and Programming
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved Bookstore Web Application Introducing Visual Web Developer 2008 Express and the.
SUSE Linux Enterprise Server Administration (Course 3037) Chapter 4 Manage Software for SUSE Linux Enterprise Server.
CIS 270—Application Development II Chapter 25—Accessing Databases with JDBC.
TDDD05 EJB Lab (Part of slides reused from Mikhail’s) Lu Li
Liang, Introduction to Java Programming, Seventh Edition, (c) 2009 Pearson Education, Inc. All rights reserved Chapter 38 Advanced Java Database.
CSC 411/511: DBMS Design Dr. Nan WangCSC411_L12_JDBC_MySQL 1 MySQL and JDBC.
Designing and Developing WS B. Ramamurthy. Plans We will examine the resources available for development of JAX-WS based web services. We need an IDE,
ISP666 MVC & Design Patterns. Outline Review Event Programming Model Model-View-Controller Revisit Simple Calculator Break Design Patterns Exercise.
James Tam Introduction To Design Patterns You will learn about design techniques that have been successfully applied to different scenarios.
INDIANAUNIVERSITYINDIANAUNIVERSITY OneStart page types  Tab – pages across the top, immutable  Section – pages down the left  Subsection – pages under.
PHP and MySQL CS How Web Site Architectures Work  User’s browser sends HTTP request.  The request may be a form where the action is to call PHP.
COMP201 Java Programming Topic 15: Database Connectivity JDBC Reading: Chapter 4, Volume 2.
Advanced samples Printing two types of labels from two different custom forms We have two different labels that contain the same data. One is suitable.
SQL by Example By convention SQL keywords are written in uppercase. SELECT * FROM Books –This query returns all rows in the Books table. –SQL statements.
JDBC Tutorial CSCI 201L Jeffrey Miller, Ph.D. HTTP :// WWW - SCF. USC. EDU /~ CSCI 201 USC CSCI 201L.
DEVS M&S Tutorial with eclipse IDE Chungman Seo
By N.Gopinath AP/CSE Cognos Impromptu. What is Impromptu? Impromptu is an interactive database reporting tool. It allows Power Users to query data without.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Outline 31.1 Reviewing the Bookstore Application 31.2.
Computer Science [3] Java Programming II - Laboratory Course Lab 9: Accessing Databases with JDBC Instructions on Setting Accesses Connecting to and Querying.
Introduction Database integral part of our day to day life Collection of related database Database Management System : software managing and controlling.
Oracle Data Integrator Agents. 8-2 Understanding Agents.
1 Introduction to Web Applications & APIs. 2 Agenda  Architecture of Web Applications Three layer architecture  Web Server (Tomcat) Installation Data.
XP New Perspectives on Microsoft Office FrontPage 2003 Tutorial 7 1 Microsoft Office FrontPage 2003 Tutorial 8 – Integrating a Database with a FrontPage.
Installing SAS 1. Requirements If you do not have an old copy of SAS installed on your computer, go directly to Slide 6. Make sure you have uninstalled.
Database Access Using JDBC BCIS 3680 Enterprise Programming.
JDBC CS 260 Database Systems. Overview  Introduction  JDBC driver types  Eclipse project setup  Programming with JDBC  Prepared statements  SQL.
© 2012 LogiGear Corporation. All Rights Reserved FitNesseFitNesse Authors: Nghia Pham 1.
Building the CarryDrop simulation in Eclipse Creating a new project with existing code from John Murphy’s RePast tutorial.
® IBM Software Group © 2006 IBM Corporation Rational Asset Manager v7.2 Using Scripting Tutorial for using command line and scripting using Ant Tasks Carlos.
Seung Ha.  Façade is generally one side of the exterior of a building, especially the front.  Meaning “frontage” or “face”  In software architecture,
In the Name Of Almighty Allah. Java Application Connection To Mysql Created by Hasibullah (Sahibzada) Kabul Computer Science Faculty Afghanistan.
Intro to JDBC Joseph Sant Applied Computing and Engineering Sciences Sheridan ITAL.
THE PHOENIX ARCHITECTURE A New Approach to Student Satellite Software Riley Pack University of Colorado at Boulder.
A Presentation Presentation On JSP On JSP & Online Shopping Cart Online Shopping Cart.
Destiny: It’s more than a Catalog. Menu What is the Dashboard - What does it tell me? Catalog Tab - Did you know we could do that? Search Setup Visual.
How To Start a SQL server Connecting to SQL Server.
Database Programming Basic JDBC Programming Concepts.
Introduction To Design Patterns
ATS Application Programming: Java Programming
Antenna Gain Plugin (AGP)
A very brief introduction
Advanced Web Automation Using Selenium
Department of Information Technology
15-415/615 Spring 2013 Homework 7 Building A Web Application
Security Managers and Permissions
CCA Skill Certification
Please play this as a Slide Show – it will be helpful
MSIS 655 Advanced Business Applications Programming
INFO/CSE 100, Spring 2006 Fluency in Information Technology
Software design and architecture
Introduction to Design Patterns
School of Computer Science
Storing and Processing Sensor Networks Data in Public Clouds
Working with Libraries
CSCE156: Introduction to Computer Science II
Presentation transcript:

The Bookstore Problem

Contents I.Problem Description II.Solution III.Exercise

I. Problem Description ● Develop a GUI application that allows the user to – Search books if info about authors and publishers are given – Change prices of all books from a given publisher. Changing prices for all publishers at once is not allowed ● A sample GUI is given in the next slides

● A book has – A title, – An ISBN (International Standard Book Number), – A price – Info about its publisher, – Info about its author(s) ● A publisher has a name, a URL, and a list of books ● An author has a name, consisting of first name and last name, and the author writes one or more books – In each book, the author has an order of writing

Ex 1: A book is written by one author ● Title: The Mythical Man-Month ● ISBN: ● Price: $29.95 ● Publisher – Name: Addison-Wesley – URL: – Books:... ● Author – First name: Frederick P.; last name: Brooks – Order of authors: 1 – Books:...

Ex 2: A book is written by many authors ● Title: Design Patterns ● ISBN: ● Price: ● Publisher – Name: Addison-Wesley – URL: – Books:... ● Author – First name: Erich; last name: Gamma; Order of authors: 1 – First name: Richard; last name: Helm; Order of authors: 2 – First name: Ralph; last name: Johnson; Order of authors: 3 – First name: John; last name: Vlissides; Order of authors: 4

Ex 3: An author writes many books First name: Donald E.; last name: Knuth Order of authors : 1 Books – Title: The Art of Computer Programming vol. 1; ISBN: ; Price: – Title: The Art of Computer Programming vol. 2; ISBN: ; Price: – Title: The Art of Computer Programming vol. 3; ISBN: ; Price: 59.99

II. Solution 1.The 3-Tier Software Architecture 2.Developing the Data Tier 3.Developing the View 4.Developing Java Code

1. The 3-Tier Software Architecture Presentation Tier Data Tier Business Logic Tier Java Swing Logical Code + Data Manager RDBMS Data Manager

2. Developing the Data Tier 2.1. The Object Model 2.2. The Database Model 2.3. Creating the Database 2.4. Creating the Java Project 2.5 Creating a Connection Profile 2.6. Creating and Running SQL Scripts

2.1. The Object Model

2.2. The Database Model

2.3. Creating the Database ● Database Name: BOOKSTORE

2.4. Creating the Java Project ● File > New Project... ● New Java Project: Bookstore

2.5 Creating a Connection Profile

2.6. Creating and Running SQL Scripts

3. Developing the View

4. Developing Java Code 4.1. Adding the JDBC Driver JAR File to the Project's Libraries 4.2. Creating the Database Configuration File 4.3. Managing the Database Connection 4.4. Declaring a Data Manager to Interact to the Data Tier 4.5. Adding Author' names to the Author Combo Box 4.6. Adding Data to the Publisher Combo Box 4.7. Developing Action for the Query Button 4.8. Developing Action for the Change prices Button

4.1. Copying the JDBC Driver JAR File to the Project Folder ● JAR File: mysql-connector-java bin.jar ● In Eclipse – Create the lib folder: Right-click the project's root folder > New > Folder > Folder name: lib > Finish – Copy the JAR file to the lib folder – Right-click the JAR file > Build Path > Add to Build Path

4.2. Creating a Database Configuration File ● Right-click the project's root folder > New > File > File name: persistence.properties > Finish drivers=com.mysql.jdbc.Driver url=jdbc:mysql://localhost:3306/BOOKSTORE username=... password=...

4.3. Managing the Database Connection Developing a Utility to Create and Close a Database Connection Getting the Connection Closing the Connection When the Frame is Closed

Developing a Utility to Create and Close a Database Connection

Getting the Connection

Closing the Connection When the Frame is Closed

4.4. Declaring a Data Manager to Interact to the Data Tier

4.5. Adding Authors' Names to the Author Combo Box

4.6. Adding Data to the Publisher Combo Box

4.7. Developing Action for the Query Button Both Author and Publisher are “Any” Author is Specific and Publisher is “Any” Author is “Any” and Publisher is Specific Both Author and Publisher are Specific

Both Author and Publisher are “Any”

Author is Specific and Publisher is “Any”

Author is “Any” and Publisher is Specific

Both Author and Publisher are Specific

4.8. Developing Action for the Change Prices Button

III. Exercise ● Improve the application so that it can change prices of all books from a given author and a given publisher