Snap-Together Visualization Chris North Lab for Information Visualization and Evaluation Department of Computer Science Virginia Tech.

Slides:



Advertisements
Similar presentations
Chapter 11 Designing the User Interface
Advertisements

Java Database Connectivity (JDBC). 2/24 JDBC (Java DataBase Connectivity) - provides access to relational database systems JDBC is a vendor independent.
Visualization Schemas for Flexible Information Visualization Chris North, Nathan Conklin, Varun Saini Proceedings of IEEE Symposium on InforVis’02 Presented.
A Guide to Oracle9i1 Introduction To Forms Builder Chapter 5.
Object Oriented Programming Java Java’s JDBC Allows access to any ANSI SQL-2 DBMS Does its work in terms of SQL The JDBC has classes that represent:
1 C. Shahabi Application Programming for Relational Databases Cyrus Shahabi Computer Science Department University of Southern California
CSE470 Software Engineering Fall Database Access through Java.
1 Design patterns Lecture 4. 2 Three Important skills Understanding OO methodology Mastering Java language constructs Recognizing common problems and.
Adv. CoE Lab: JDBC 1 Advanced Computer Engineering Lab Objective – –to give some background on JDBC to help with the lab exercises , Semester.
Chapter 14: Advanced Topics: DBMS, SQL, and ASP.NET
Java database Programming JDBC Trademarked name of a Java API that supports Java programs that access relational databases Stand for Java DataBase Connectivity.
1 Foundations of Software Design Lecture 27: Java Database Programming Marti Hearst Fall 2002.
Visualization Schemas for Flexible Information Visualization Chris North, Nathan Conklin, Varun Saini Virginia Tech. Proceedings of IEEE Symposium on InfoVis’02.
Computer Science 101 Web Access to Databases Overview of Web Access to Databases.
JDBC Java API for Database Connectivity. Layout of this recitation Introduction to JDBC API JDBC Architecture Understanding the design of JDBC API –Classes.
TUTORIAL (1) Software installation Written by: Eng. Ahmed Mohamed Abdel Ghafar, Edited by Eng. Muhammed Hammad, Eng. Hamdy Soltan & Eng. Osama Talaat.
UFCE4Y UFCE4Y-20-3 Components and Services Julia Dawson.
Databases & Data Warehouses Chapter 3 Database Processing.
Overview 1. What is JDBC? 2. The JDBC-ODBC Bridge 3. JDBC Pseudocode 4. simpJDBC.java.
Lab: JDBC 1 Computer Engineering Lab III v Objective –to give some background on JDBC to help with the lab exercises , Semester 1,
CIS 270—App Dev II Big Java Chapter 22 Relational Databases.
Advance Computer Programming Java Database Connectivity (JDBC) – In order to connect a Java application to a database, you need to use a JDBC driver. –
Advanced Database Management System Lab no. 11. SQL Commands (for MySQL) –Update –Replace –Delete.
Jaeki Song JAVA Lecture 11 Java Database Connectivity.
© Wang Bin 2004 JDBC ----Java Database Connectivity.
CSE470 Software Engineering Fall Database Access through Java.
Database Programming in Java Corresponds with Chapter 32, 33.
Java Utility Classes CS 21b. Some Java Utility Classes Vector Hashtable StringTokenizer * import java.util.*;
Views, Indexes and JDBC/JSP tutorial Professor: Dr. Shu-Ching Chen TA: Haiman Tian 1.
CIS 270—Application Development II Chapter 25—Accessing Databases with JDBC.
Georgia Institute of Technology Making Text for the Web part 5 Barb Ericson Georgia Institute of Technology March 2006.
1 Accelerated Web Development Course JavaScript and Client side programming Day 2 Rich Roth On The Net
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,
Snap2Diverse: Coordinating Information Visualizations and Virtual Environments Nicholas F. Polys, Chris North, Doug A. Bowman, Andrew Ray, Maxim Moldenhauer,
Computer Engineering Lab
JDBC. JDBC stands for Java Data Base Connectivity. JDBC is different from ODBC in that – JDBC is written in Java (hence is platform independent, object.
JDBC Java and Databases. RHS – SOC 2 JDBC JDBC – Java DataBase Connectivity An API (i.e. a set of classes and methods), for working with databases in.
JDBC Enterprise Systems Programming. JDBC  Java Database Connectivity  Database Access Interface provides access to a relational database (by allowing.
Accessing Database using JDBC. JDBC Objectives Gain basic knowledge of Java JDBC Become familiar with the basics of interacting with a database using.
COMP201 Java Programming Topic 15: Database Connectivity JDBC Reading: Chapter 4, Volume 2.
WEB/DB1 DATABASE PROGRAMMING 3JDBC by the ASU Scholars.
Chapter 25 Databases. Chapter Scope Database concepts Tables and queries SQL statements Managing data in a database Java Foundations, 3rd Edition, Lewis/DePasquale/Chase25.
+ Information Systems and Databases 2.2 Organisation.
Computer Science [3] Java Programming II - Laboratory Course Lab 9: Accessing Databases with JDBC Instructions on Setting Accesses Connecting to and Querying.
JDBC. Java.sql.package The java.sql package contains various interfaces and classes used by the JDBC API. This collection of interfaces and classes enable.
JDBC CS 124. JDBC Java Database Connectivity Database Access Interface provides access to a relational database (by allowing SQL statements to be sent.
12/6/2015B.Ramamurthy1 Java Database Connectivity B.Ramamurthy.
COMP 321 Week 4. Overview Normalization Entity-Relationship Diagrams SQL JDBC/JDBC Drivers hsqldb Lab 4-1 Introduction.
BlackBerry Applications using Microsoft Visual Studio and Database Handling.
CSI 3125, Preliminaries, page 1 JDBC. CSI 3125, Preliminaries, page 2 JDBC JDBC stands for Java Database Connectivity, which is a standard Java API (application.
Basics of JDBC Session 14.
Advanced Java Session 5 New York University School of Continuing and Professional Studies.
Umair Javed©2005 Enterprise Application Development Java Database Connectivity (JDBC) JDBC1.
Introduction to JDBC Instructor: Mohamed Eltabakh 1.
JDBC Java and Databases. SWC – JDBC JDBC – Java DataBase Connectivity An API (i.e. a set of classes and methods), for working with databases in.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 Java Database Connectivity.
6-1 JAVA DATABASE CONNECTOR Colorado Technical University IT420 Tim Peterson.
SQL pepper. Why SQL File I/O is a great deal of code Optimal file organization and indexing is critical and a great deal of code and theory implementation.
How to Leverage Java in Oracle Forms Web Applications Duncan Mills Application Development Tools Oracle Corporation.
CS320 Web and Internet Programming Database Access with JDBC Chengyu Sun California State University, Los Angeles.
Java Access to RDB Relational databases (RDBs) dominate today, due to:
Lec - 14.
JDBC Database Management Database connectivity
CS320 Web and Internet Programming Database Access with JDBC
Advanced Web Automation Using Selenium
Java Database Connectivity
Introduction of Week 11 Return assignment 9-1 Collect assignment 10-1
Department of Computer Science
Lecture 11 Database Connection
Java Chapter 6 (Estifanos Tilahun Mihret--Tech with Estif)
Presentation transcript:

Snap-Together Visualization Chris North Lab for Information Visualization and Evaluation Department of Computer Science Virginia Tech

Example: website hits

Example: Expresso DB Schema

Snap (Fusion) Custom visualization workspace Visualization Fusion Data Fusion

Snap Flexibility: custom visualization workspaces End-users, non-programmers Rapid construction Browser based Any database Publish custom visualizations as single URL Extensible: exploits 3 rd party components Integrates diverse tools Data extraction Data mining Visualization

Relational Databases Relations (tables) Tuples (rows ) Attributes (columns) Values Associations (links)

Data Schemas Associations (links) Primary key (unique identifier) Foreign key (pointer) One to One (1:1) One to Many (1:M) Many to Many Join (follow link)

Snap Model Visualization Comp. = Display of a Relation Visual items = Tuples UI actions = Tuple subsets States in a mapStates in a scatterplot States: Load Select Zoom States: Load Select

Model Link between vis. = Join between tuples in UI action subsets States in a mapStates in a scatterplot Select states Select states 1 : 1

Model Select states Select counties 1 : M Link between vis. = Join between tuples in UI action subsets States in a scatterplot Counties in a scatterplot

Model Select states Load counties 1 : M Link between vis. = Join between tuples in UI action subsets States in a scatterplot Counties in a scatterplot

Relational Model → Snap Model Vis. = relation Item = tuple Link = join

Dialogs Data into visualization Choose table and fields Coordinating visualizations Choose actions

Software Architecture JDBC-ODBC Snap Visual- ization Actions Data Visual- ization Actions Data … Database Link graph Snap API

Snap Component API Implement “Snapable” Load data (jdbc resultset) fireEvent (vector of primary keys) doEvent (vector of primary keys) Events: Select, mouseover, zoom onto, scroll to, …

Component Design Generality, any data table Resizable to frame Conserve screen space, small Focus on components main visualization and interaction Let other components do other functions Actions that link to other components

Project Design Scenarios, tradeoffs Design description, pictures Implementation plan Scenarios can consider component within Snap environment

Component Development See instructions document Jdk Snap code Add new component Folder Html file Java Snapplet Use EmptySnapplet as example

Implementing Snapable Components Option 1: Applet Implement “Snapable” interface (Snapable.java) Option 2: (easier!) Extend “Snapplet” (Snapplet.java) Use “EmptySnapplet” as template (EmptySnapplet.java)

Snapplet Done for you: Extends JApplet, implements Snapable addSnapEventListener(SnapEventListener sel) removeSnapEventListener(SnapEventListener sel) fireSnapEvent(SnapEvent snapEvent) You need to write: load(ResultSet rs, String primaryKeyColName) performSnapEvent(SnapEvent e) Calls to fireSnapEvent(e) Enumeration getSupportedActions()

Snapplet load( ) getSupportedActions( ) performSnapEvent( ) fireSnapEvent( ) Snap

Snapplet: load load(ResultSet rs, String primaryKeyColName) rs is a JDBC data table primaryKeyColName is column in rs containing unique IDs –Used in events Display the data: –Process data, Make internal data structure? –Repaint(), paint the visualization?

Snapplet: actions Enumeration getSupportedActions() Return list of action names (e.g “select”, “zoom”, …) performSnapEvent(SnapEvent e) Do the event (e.g. select the given items) SnapEvent e: –String eventType(e.g. “select”) –Vector keys(e.g. 5, 32, 417, …) In various user events: Send event to Snap(e.g. user selected some items) fireSnapEvent(e)(e.g. “select”, 5,32,417)

Snapplet: Optional Icon getIcon( ) Return component’s icon String getAppletInfo( ) Return component’s name

JDBC ResultSet import java.sql.* ResultSet represents a table Access to 1 row at a time current row, “cursor” rs.next( ) move to next row Getting column values in current row: rs.getString(col),.getInt(col), … col = string name or int index (1,…) Column meta-data: rs.getMetaData( ) columnCount, column names, column types, …

JDBC (See sample code file) import java.sql.* Class.forName(“sun.jdbc.odbc.JdbcOdbcDriver”); Connection conn = DriverManager.getConnection( “jdbc:odbc:MyDatabaseName”); Statement st = conn.createStatement( ); ResultSet rs =st.executeQuery( “SELECT * FROM TableName”); MyComponent.load(rs, “ID”);

ODBC Open DataBase Connectivity Setup “System DSN” for database

Examples EmptySnapplet TableSnapplet ScatterPlot

MVC Model, View, Controller Separate UI from underlying system functionality UI: Data: Model (data, data logic) View (display) Controller (user input)

Multiple Views Model UI 2UI 1

Java MVC Lumps View/Controller together Model, UI UI can listen to model changes E.g. TreeModelListener Model (e.g. TreeModel) UI (e.g. JTree)

Data models TableModel, JTable (code in snap table component) TreeModel, JTree (code on website) Wrapper Converter