Visual Query Language for Database - PowerPoint PPT Presentation

1 / 24
About This Presentation
Title:

Visual Query Language for Database

Description:

Six steps scanning. Process the operators. Generate the 'Select...As ...' clause ... Photo Park. select_one. title. inColor select_one. size. filetype ... – PowerPoint PPT presentation

Number of Views:23
Avg rating:3.0/5.0
Slides: 25
Provided by: leiw9
Category:

less

Transcript and Presenter's Notes

Title: Visual Query Language for Database


1
Visual Query Language for Database
  • CS501 Final Project
  • Lei Wang

2
Outline
  • Overview
  • Design
  • Implementation
  • User interface issue
  • Evaluation
  • Future Work
  • Reference

3
Overview
  • Goals
  • Keyboardless programming
  • Easy to draw the query (intuitively)
  • Potential user
  • Novice, ordinary people

4
Design
  • Functionality
  • Basic query
  • Join
  • Arithmetic operations
  • Logical operations
  • Conditional query
  • Group by
  • Show Image

5
Design
  • Functionality
  • Basic query
  • Join
  • Arithmetic operations
  • Logical operations
  • Conditional operations
  • Group by
  • Show Image

Schema Result Attribute
Attribute V
6
Design
  • Functionality
  • Basic query
  • Join
  • Arithmetic operations
  • Logical operations
  • Conditional query
  • Group by
  • Show Image

7
Design
  • Functionality
  • Basic query
  • Join
  • Arithmetic operations
  • Logical operations
  • Conditional query
  • Group by
  • Show Image

SUM AVG MAX MIN COUNT
8
Design
  • Functionality
  • Basic query
  • Join
  • Arithmetic operations
  • Logical operations
  • Conditional query
  • Group by
  • Show Image

AND OR NOT
9
Design
  • Functionality
  • Basic query
  • Join
  • Arithmetic operations
  • Logical operations
  • Conditional query
  • Group by
  • Show Image

gt lt gt lt
10
Design
  • Functionality
  • Basic query
  • Join
  • Arithmetic operations
  • Logical operations
  • Conditional query
  • Group by
  • Show Image

Group
11
Design
  • Functionality
  • Basic query
  • Join
  • Arithmetic operations
  • Logical operations
  • Conditional query
  • Group by
  • Show Image

Image
12
Design
  • Graph translator
  • Six steps scanning
  • Process the operators
  • Generate the SelectAs clause
  • Generate the From clause
  • Generate the Where clause
  • Generate the Group ByHaving clause
  • Adding Image to Select clause if Image
    operator used
  • SQL statement

13
Design
  • How to process operators
  • Value is generated accordingly
  • Value assigned to the operator as well as the
    fromData of Arrow that point to the operator
    when two fromData found, assign value to the
    upper or left most fromData.
  • Age SUM SUM(age)
  • Age lt 20 age lt 20

14
Design
  • Example
  • Park Source
  • Attraction Animal
  • hunting yes
  • Park_name Park_name Image
  • Result
  • Park_address Address
  • SELECT Park_address As Address, Image
    From Park, Source
  • Where Park.Park_name Source.Park_name
  • AND Attraction hunting AND Animal
    yes

15
Implementation
  • Platform Windows NT
  • Language Java 1.3 (Java AWT)
  • Editor JFE editor
  • Compiler Javac
  • Run Java

16
Implementation
  • Class Hierarchy
  • SGE package
  • Attribute AttributeType
  • Schema RB SchemaType
  • Result ResultType
  • Variable SGEShape ShapeType
    Type
  • HotSpot OpenType
  • OvalOperator SaveType
  • BoxOperator CutType
  • Group Type
  • Image DataflowType

17
Implementation
  • Method List
  • SGEShape
  • constructor, copyShape, getType, getBounds,
    get/setName, get/calculate/setValue,
    get/setControlpoints, save, destroy.
  • ShapeType
  • constructor, mouseListener methods
  • RB
  • constructor, drawLast, drawNext

18
Interface Issue
  • Menu File, Edit, DataTypes, Operators, Run, Help
  • Buttons
  • Dynamically Generated Input Selections
  • Require minimum keyboard input
  • Reduce the error generated from invalid input

19
Interface Issue
  • Example
  • Photo Park
  • select_one
  • title
  • inColor
  • size
  • filetype

20
Interface Issue
  • Example
  • Photo Park
  • select_one
  • title
  • inColor select_one
  • size
  • filetype

21
Interface Issue
  • Example
  • Photo Park
  • select_one select_one
  • title park_name
  • inColor select_one
    park_attraction
  • size park_address
  • filetype

22
Evaluation
  • Easy to draw and input
  • Run fast
  • Lines of Code 3000 lines
  • Hours spent about 60 hours so far
  • Plan to have some testers

23
Future Work
  • Add image processing operations
  • Error report and Imbedded help
  • Add more query operators
  • Add database management tools
  • Dynamically generate database

24
Reference
  • A Visual Language for Keyboardless Programming,
    Takayuki Dan Kimura, Julie W. Choi, Jane M. Mack
  • Movie Relational Database, Ullman WidomA First
    Course in Database Systems
  • Rubberband Code, David Geary.
  • HotSpot Code, Java World, Todd Sundsted.
Write a Comment
User Comments (0)
About PowerShow.com