Document

|||l|||||||l|||||||||||||||l|||ll||ll||||||||||||ll|||||||||||||||lllllllll
.
US005418950A
Umted States Patent [19]
[11] Patent Number:
Li et a1.
[45]
[54]
4,953,080 8/1990 Dysart et a1. ............... .. 364/DIG. 1
4,984,152 1/1991 Muller ............. ..
364/DIG. 1
SYSTEM FOR INTERACTIVE CLAUSE
WINDOW CONSTRUCI'ION 0F SQL
QUERIES
Date of Patent:
Inventors: Shih-Gong Li; Theodore J. L.
_
_
_
_
APP1'N°"
[22] Filed:
[51]
c
1'
1'
8/1991
.... .. 364/192
Torres ........................... .. 364/521
5,041,967 8/1991 Ephrath et al.
8/1991 Rathnam ....................... .. 364/443
5,121,477
6/1992
Koopmans et a1.
.... .. 395/156
. . . .. 395/161
5,175,814 12/1992
Sep. 21, 1994
5,228,723 7/1993 Heckel
.
fSe . N . 878,954, M
‘
°
“y
a a“
395/155
5,261,093 11/1993
Asmuth ................. .. 395/600
5,263,167 11/1993
Conner, Jr. et a1.
5,276,870
4, 1992, b
364/DIG. 1
Anick et a1. . . . . . . .
310907
£362“ ‘°“ °
Int. 01.6
5/1991 Addesso et a1. ..
5,040,131
5,041,982
.
63
5,019,961
lntemtlqnal Busmess Machmes
Related U's' Amman“ Data
[ 1
364/DIG. 1
Rosenow ....................... .. 364/521
corporatwn, Armonk, NY
_
[21]
2/1991
5,001,697 3/1991 Torres ................... .. 364/521
Shrader, both of Austin, Tex,
[73] Asslgnw
May 23, 1995
4,989,132 1/1991 Mellender et a1.
4,996,654
[75]
5,418,950
-
.... .. 395/700
1/1994 Shan et a1. ........................ .. 495/600
OTHER PUBLICATIONS
........................................ .. G06F 15/40
TSVDA 6‘ a1’ “I°°"i° Bmwse’ And I°°“i° Retreval
[52] us. (:1. .................................. .. 395/600, 395/155;
System for Object-Oriented Databases”, IEEE Work
395/156; 395/157; 364/DIG_ 1; 364/26Q4;
shop on Visual Languages, 4-6 Oct. 1989, Rome, Italy,
364/232_1
[58] Field 6: Search .............. .. 395/155, 156, 157, 600
_
ISBN 08186 2002 1, pp. 130-137.
IBM Technical Disclosure Bulletin, Interactive Schema
Diagram to Visually Represent Tables of Related Data
[56]
and Meaningful joins between tables, V01. 33, No. 9,
'ke‘ere'lces Cm“
US. PATENT DOCUMENTS
4,068,304
Feb., 1991, pp. 243-246.
1/1978 Beausoleil et a1. ......... .. 364/DIG.1
‘
pn'mmy Examiner--Thomas G. Black
4,087,794 5/1978 Beausoleil et al.
364/DIG. 2
Assistant Examiner__wayne Amsbury
1232333 12323 i‘éili‘ei‘nfiiiit
.1111: £23513?
Ame» Age", 0' ‘FM-Keith Stephens; Dim L
4,686,522 8/1987 Hernandez et a1.
340/709
4,815,029
3/1989
Barker et a1
4,821,211
4/1989
Torres
.... .
.. . . _ . .
. . . .. 364/900
. . . . ..
4,343,533 6/[939 Lane at a]. .
4,853,843
8/1989 Epklund ...... ._
3154/1316. 1
364/522
4,373,623 10/ 1989 Lam et al
3:322:13}
4’933’514
M1990 Bowers
4,939,507
7/1990
Beard et a1
_
. . . . . ..
[57]
364/521
364/138
4,868,766 9/1989 Oosterholt
R°bem
ABSTRACT
_
_
,
_
_
A method and system for viewing mformatlon stored in
one or more rows and columns in a database. The sys
tem having a logical progression of choosing a column,
364/133
determining conditions for a row to be included in a
3364/3252";
panel, specifying a column to be used as a base to group
‘‘ ‘'"
178/18
. . . . .. 345/156
4,945,475 7/1990 Bruffey e161.
364/DIG.1
4,951,190 8/1990 Lane et a1. ........................ .. 364/188
FUILSHECTS'I’ATBBIE
rows in a panel and a display for viewing the informa
11°“
.
26 Claims, 31 Drawing Sheets
381
“SELECT ’ FROM NULUDDRG WHERE ORG.DEPTNAME='USER INTERFACE‘ AND OHGLOCAT 5
UNION
SELECT " FROM NULUDDRG WHERE ORGMANAGER=23 AND 0F1G.LOCAT1ON=‘LAS CRUCE
+1
1+1
I
FULLSELECT
US. Patent
May 23, 1995
5,418,950
Sheet 2 of 31
A: Select * from T1
B : Select Dept from T2
C : Select DP No. from T3
“
(AUB) nc
C?
SelectedString
WhereString
GroupByString
HavingString
FromString
=
=
=
=
=
- 2a
FIG.
2""
contents of SELECTed Columns Pane
contents of WHERE Clause Pane
contents of GROUP BY Clause Pane
contents of HAVING Clause Pane
contents of FROM Clause Pane
l
rm '
Concatenate the SelectedString, FromString,
WhereString, GroupByString, and HaviniString in the
proper syntax order to create the TempSu selectString.
l
@f‘“
FIG- 8
9””
User wants to display the User De?ned Columns Panel. / 91°
"
l
User performs operations within the window. J 94°
.
I
‘
Action selected from the action bar.
J 95°
l
@915
FIG. 9
US. Patent
May 23, 1595
Sheet 7 of 31
5,418,950
Data Structures (Part I)
400
Logical Table Column List
(Contains a library list for the columns in a Logical Table)
\ Column Name String1 ->- - --> Column Name String N -> nil
SubselectList
410
'
(Contains a library list of subselect statements.)
\ Subselect Statement Stringr1 -» ..
Subselect Statement String N ~> nil
(FullselectString
(Contains the iullselect string.)
420
\ Fullselect Statement Shim '
ColumnList
(Contains a list of column names.)
430
\
_
Column Namel
->---—>
FIG. 4
Column NameN
- nil
US. Patent
May 23, 1995
Sheet 8 of 31
Table Name 1 ->- . .
Table Name N
5,418,950
5°°\
502
\LAiias
Name
ColumnList
LAiiasColumnList
Name N,
i-a Logical Table 1‘ ->- -- - Logical Table N -> nil
I: ColumnList
L ColumnList
510\
Base ColumnName -->- - -—> Base ColumnName ~> nil
View ColumnName 1
Wew CoiumnName N
* 52°\
View Name
View Comment
Wlth Check Option
Other Attributes
_
View Column Names List
Fullselect String
FIG. 5
US. Patent
May 23, 1995
Sheet 9 of 31
5,418,950
Get the iilename that contains the
stored data structures from the user.
t
Read in old data structures.
FIG. 6
User wants to open a new Create
View De?nition.
can)
1
initialize data structures:
VrewColumnNameList = nil
FullselectString = nil
m)
l
The following structures are built according to the user's
authorization in the database and the existence of these
objects: UserDeiinedColumnList, SubselectList,
-
can)
TableViewList
6/690
US. Patent
May 23, 1995
Sheet 10 of 31
5,418,950
@_+
User wants to displaythe Subselect Panel.
(715
Break apart the Subselect
string Definition into the
FROM,SELECT,WHERE,
GROUP BY, and HAVING
clause tlext panes. Create
'
Clear out the fields in the Panel.
m\ o is | a the s ubse
+ lect Panel.
p y
t
t '
.
a ‘as en "es 132
Fl9StOre mFe
1
clauses from
User perlorms operations within the window.
mJ
w
the temporary
structure.
Action selected from the action bar.
742/
15°
- i F
134
736
Save clauses in
a temporary
selects to o to the
Logical ables
structure.
Panel?
selects to go to the
Fullsele'ct Panel
'
FIG. 7
the user want to
save it
Append the
TempSubselectString
to the SubselectList.
r z...
US. Patent
May 2a, 1995
Sheet 11 of 31
5,418,950
User wants to display the Fullselect Panel.
r1012
Fill in the listbox at the
top of the panel with
entries from the
SubselectList.
Fill in the Fullselect
statement text pane
with the
Ful selectStringk.
1°30“- Display the Fullselect Panel. <—————
l
User performs operations within the window. ~10“)
-
t
Action selected from the action bar. ~1o5o
User selects
to construct and execute
the CREATE VlEW
Subselect Panel by opening an
existing subselect entry or by
reating a) new on -
User
selects to go to the
Main Wew
Panel?
1022
US. Patent
May 23, 1995
Sheet 12 of 31
5,418,950
User wants to display the Main \?ew Panel.
11
1110
x
F." .qwmo
there values for name,
oommentwith check Option,“
0W3; a?rslttil?gts ' the
aparélriaig
values into the
text areas in the
rew oru ur
' 11
panel.
.
Clear out the fields in the panel. ~11”
1124
Does the
FullselectString
exist?
.
/1130
Fill in the toplevel column names into the \?ewColumnNamesList
by deleting/appending/or replacing existing entries and place
these entries in the listbox in the Main \?ew Panel.
l
——> Display the Main View Panel. ~114o
‘
.
User perlorms operations in the window.
~115o
i
Action selected from the action bar. ~11so
User selects
to go to the Fullselect
1180
selects to construct
and execute the CREATE
VlEW statement
1182
FIG. 11
US. Patent
May 23,1995
Sheet 13 of 31
5,418,950 »
mow-t
/-120
User wants to construct a CREATE VIEW
1
statement usigq the values in the ViewStructure.
1
Submit the statement to the DB
1212 )
1214
Any errors
(-1220
Post the errors.
I)
the User Execute
the command from the
Main View Panel
FIG. 12
User wants to close the interface. ~1242
1252“
1254“
Prompt for filename.
1
Save the data structures in the ?le.
U.S. Patent
May 23, 1995
Sheet 14 of 31
‘300%
selected_columns_string = nil
from__string = nil
where__string = nil
~1ao2
groupby_string = nil
.
having_string = nil
.
HQ, 133
cursoripos = in_select=pane
Fill the table lists with the table and view
names to which the user has access.
~13“
0
K13“
Read in the list of user defined columns in each of the logical
tables and store them into the table and column list structures
cursor_pos= in__v
the Comparison
whereJane or In_
‘ Operator Button
hav|ng_pane
9
1354\
m0
: :
Y
Contents of the button (the name of the
button) is copied to after where the cursor
was last using the cursor_pos value.
US. Patent
May 23, 1995
Does
Sheet 15 of 31
1362
the cursor_pos= in_
trom_pane and is the selected
e""y“°la'°gica'
table.‘7
1363
5,418,950
Corresponding
°°!“",‘" "51 Pane
'5 “"9? “"th h
Z‘ZEEZZE’SFJO?
\_
View.
1365
1367
Add table name
entry exist in the t
to the from pane
from pane
with its alias as
‘ ?
‘366 \.
its table name.
Prompt tor the alias
name, if any.
‘
$1368
Is
the alias name
blank?
- Add the table name with the f‘371
speci?ed alias to the from pane.
:
1364
‘
1373
Add a new entry to the table list /‘372
name
consisting
and itsof new
the base
alias.table
Sort
the list when finished.
FIG. 13b
'
US. Patent
May 23, 1995
Sheet 16 of 31
5,418,950
1374
1375
1376
1377
1378
the selected
column from a logical
table?
the table alias
for the column exist in
/
Add the base table name to the from
pane with its alias as its table name.’
clause?
N
[1385
dggelttg‘fi ?rst arr
u
ases o
the table columns
and place them in
the from pane.
.1388
13893
Co y~the full
P rompt the user ror an al'ms t0
use. (Could be a list to select
from based on all the alias for a
j
iven table )
.'
1
K1387
After the user selects
the alias to use, copy
fthe rbaseltable naéne
..
ualmed
9' t e co umn an its
coll’umn namyéqwith its _
alias to the from pane.
specified/selected alias
after the cursor in the ->®_/‘39°
|:|G_ 13c
appropriate pane.
US. Patent
May 23, 1995
a)”
Sheet 17 of 31
5,418,950
1410
Execute
action?
~ Construct select_string.
1412—/
1414/
y
Execute the select_string.
1420'
l
1416/ Return report or error.
1422
Construct select_string.
1430'J
l
1432/
Store select_string in
the library structure.
l
1440/
Return okay or error.
1442
1450
Retrieve a stored
SELECT statement
(select_string) from the
library structure.
1452J
‘
Parse select_string
and ?ll the text panes
with their appropriate
1460/
contents and aliases
l
Refresh the interface
1462/
@1148"
with the new values.
FIG. 14
1470
US. Patent
May 23, 1995
_®\/1soo
Sheet 18 of 31
5,418,950
1510
Post save confirmation
message. User answers.
1512 ‘J
+
.
1514 _/ Construct s+elect_str|ng.
1522
1520/ Store
select_string in __,®
the library structure.
1530
A
Cursor appears where
it last was located in
text pane
the pane. ll pane is _
7
empty, it appears at the
-
1532J
top.
1
cursor_pos =
in_<appropriate>_pane
where <appropriate> is
‘534
J the name of the text
pane that the user
selected.
User selected an item not listed. Scroll
bars, editing functions, and the like have
not been included in this flowchart.
They are oonside red generic actions
and the interface or application will
>
perlorm them.
FIG. 15
US. Patent
May 23, 1995
Sheet 19 of 31
5,418,950
m@
1610/
iullselect_string = nil
cursor_pos = in_fullselect_pane
'
l
Fill the select library list pane with the
1612/ contents of the select_library list.
1614\/é
FIG. 16
new?
User selects:
- \,171o
172°
Contents of the entry
1724
copied to after where
the select library
the cursor was last
list pane?
using the cursor_pos
"22¢
value.
Contents of the button
(the name of the
Relation Button
button) is copied to
Grgup
alter where the cursor
was last using the
"32¢
FIG. 17
cursor_pos value.
1734