© 2003-2006 M.E. Fayad SJSU -- CmpE Database Design Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I College of Engineering San José.

Slides:



Advertisements
Similar presentations
L3-S1 Practical Solutions 2003 SJSU -- CmpE Database Design Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I College of Engineering.
Advertisements

L8-S1 Datalog Queries 2003 SJSU -- CmpE Database Design Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I College of Engineering San.
Fall 2002 SJSU -- CmpE Enterprise & Application Frameworks Dr. M.E. Fayad, Professor Computer Engineering Department – RM# College of Engineering San José.
L3-1-S1 OO Concepts © M.E. Fayad SJSU -- CMPE Software System Engineering Dr. M.E. Fayad, Professor Computer Engineering Department, Room.
 Fayad SJSU -- CmpE Software Engineering Management Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I College of Engineering.
L4-1-S1 UML Overview © M.E. Fayad SJSU -- CmpE Software Architectures Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I.
SJSU – CmpE Fall 2002 Enterprise & Application Frameworks Dr. M.E. Fayad, Professor Computer Engineering Department – RM# College of Engineering San José.
L3-5c-S1 Object Diagrams © M.E. Fayad SJSU -- CmpE Software System Engineering Dr. M.E. Fayad, Professor Computer Engineering Department,
L16-S1 Object Diagrams 2003 SJSU -- CmpE Software Patterns Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I College of Engineering.
L28-S1 Interaction Diagrams 2003 SJSU -- CmpE Advanced Object-Oriented Analysis & Design Dr. M.E. Fayad, Professor Computer Engineering Department, Room.
L5-S1 Software StabilitySJSU – CmpE © M.E. Fayad Software Architectures Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I.
© M.E. Fayad SJSU -- CmpE Database Design Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I College of Engineering San José.
L19-S1 More on Class Diagrams 2003 SJSU -- CmpE Object-Oriented Analysis & Design Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I.
 Fayad SJSU – CmpE Software Engineering Management Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I College of Engineering.
L21-S1 Model-Based Arch SJSU -- CmpE Advanced Object-Oriented Analysis & Design Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I.
© M.E. Fayad SJSU -- CmpE Database Design Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I College of Engineering San José.
L3-5d-S1 Class Diagrams © M.E. Fayad SJSU -- CmpE Software System Engineering Dr. M.E. Fayad, Professor Computer Engineering Department, Room.
© M.E. Fayad SJSU -- CmpE Software System Engineering Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I College of Engineering.
L26-S1 Interactions 2003 SJSU -- CmpE Advanced Object-Oriented Analysis & Design Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I.
L06-2-S1 Activity Diagrams 2003 SJSU -- CmpE Software Engineering II Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I College of Engineering.
© M.E. Fayad SJSU -- CmpE Software System Engineering Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I College of Engineering.
P2-S1 MySQL 2003 SJSU -- CmpE-- M.E. Fayad Database Design Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I College of Engineering.
© M.E. Fayad SJSU -- CmpE Software System Engineering Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I College of Engineering.
© M.E. Fayad SJSU -- CmpE Database Design Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I College of Engineering San José.
SJSU -- CmpE © Dr. M. E. Fayad Database Design Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I College of Engineering San.
L5-S1 Class Diagrams 2003 SJSU -- CmpE Software Patterns Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I College of Engineering San.
Chapter 5 Other Relational Languages By Cui, Can B.
L8-S1 CRC Cards 2003 SJSU -- CmpE Advanced Object-Oriented Analysis & Design Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I College.
© M.E. Fayad SJSU -- CmpE Database Design Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I College of Engineering San José.
1999 – 2006 M.E. Fayad SJSU -- CmpE Software Engineering Management Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I College of Engineering.
© M.E. Fayad SJSU -- CmpE Analysis Heuristics Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I College of Engineering San.
© M.E. Fayad SJSU -- CmpE Software System Engineering Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I College of Engineering.
L18-S1 Getting Started 2003 SJSU -- CmpE Advanced Object-Oriented Analysis & Design Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I.
 Fayad SJSU -- CmpE Software System Engineering Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I College of Engineering San.
© M.E. Fayad SJSU -- CmpE Software System Engineering Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I College of Engineering.
L3-6b-S1 Sequence Diagrams © M.E. Fayad SJSU -- CmpE Software System Engineering Dr. M.E. Fayad, Professor Computer Engineering Department, Room.
L6-1-S1Design Heuristics - 1 © M.E. Fayad SJSU -- CmpE Software System Engineering Dr. M.E. Fayad, Professor Computer Engineering Department,
L1-S1Introduction 2003 SJSU -- CmpE Advanced Object-Oriented Analysis & Design Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I College.
L4-S1 Modeling Concepts 2003 SJSU -- CMPE Advanced Object-Oriented Analysis & Design Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I.
L6-S1 UML Overview 2003 SJSU -- CmpE Advanced Object-Oriented Analysis & Design Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I College.
Source: Database System Concepts, Silberschatz etc Edited: Wei-Pang Yang, IM.NDHU, Introduction to Database CHAPTER 5 Other Relational Languages.
L8-2-S1 Misc Topics © M.E. Fayad SJSU -- CmpE Database Design Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I College of.
Fall 2002 SJSU -- CMPE Object-Oriented Analysis & Design Dr. M.E. Fayad, Professor Computer Engineering Department – RM# College of Engineering San José.
L6-S1 MLPQ 2003 SJSU -- CmpE-- M.E. Fayad Database Design Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I College of Engineering.
L3-S1Analysis Heuristics 2003 SJSU -- CmpE Advanced Object-Oriented Analysis & Design Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I.
L1-S1 Infinite R-DB 2003 SJSU -- CmpE Database Design Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I College of Engineering San.
L12-S1 Spatiotmporal DB 2003 SJSU -- CmpE Database Design Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I College of Engineering.
SJSU – CmpE © M.E. Fayad Software Engineering Management Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I College of Engineering.
Object-Oriented Analysis & Design
Advanced Object-Oriented Analysis & Design
7/4/2018.
7/5/2018.
Database Design Dr. M.E. Fayad, Professor
Software Engineering Management
Software Patterns Dr. M.E. Fayad, Professor
Component-Based & Software Reuse
Software System Engineering
Object-Oriented Analysis & Design
Software Engineering Management
Software System Engineering
Enterprise & Application Frameworks
Database Design Dr. M.E. Fayad, Professor
Object-Oriented Analysis & Design
Database Design Dr. M.E. Fayad, Professor
Advanced Object-Oriented Analysis & Design
Component Based & Software Reuse
Database Design Dr. M.E. Fayad, Professor
Database Design Dr. M.E. Fayad, Professor
Software System Engineering
Object-Oriented Analysis & Design
Presentation transcript:

© M.E. Fayad SJSU -- CmpE Database Design Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I College of Engineering San José State University One Washington Square San José, CA

L8-2-S2 MLPQ © M.E. Fayad SJSU -- CmpE-- M.E. Fayad 2 Lesson 08-II: The MLPQ System

L8-2-S3 MLPQ © M.E. Fayad SJSU -- CmpE-- M.E. Fayad Lesson Objectives 3 Understand the MLPQ System Learn about: î Database System Architecture î MLPQ Input Files î MLPQ Graphical User Interface î Recursive Queries

L8-2-S4 MLPQ © M.E. Fayad SJSU -- CmpE-- M.E. Fayad MLPQ MLPQ is short for Management of liner programming queries. MLPQ is a constraint database system for rational linear constraint databases. It allows: –Datalog Queries –Minimum and maximum aggregation operations over linear objective functions –And other operators 4

L8-2-S5 MLPQ © M.E. Fayad SJSU -- CmpE-- M.E. Fayad Two Main Application Areas Operations research when the available data in a database needs to be reformulated by some database query before we can solve a problem by linear programming. Dealing with spatial and spatiotemporal data. The MLPQ allows the ability to go beyond two or three dimensions of mutually constrained data. 5

L8-2-S6 MLPQ © M.E. Fayad SJSU -- CmpE-- M.E. Fayad System consists of six main modules: –Representation –Query Evaluation –Visualization –Approximation –Update –Export Conversion Refer to Chapter 18 for a diagram and more details The MLPQ Database System Architecture 6

L8-2-S7 MLPQ © M.E. Fayad SJSU -- CmpE-- M.E. Fayad MLPQ Input Files Each Input File has this structure: begin %moduleName%  1  2.  n end %moduleName% Where  n is a Datalog Rule or rational linear constraint tuple. 7

L8-2-S8 MLPQ © M.E. Fayad SJSU -- CmpE-- M.E. Fayad Differences between Datalog and MLPQ Input File Each Linear constraint has the form: a 1 x 1 + a 2 x 2 + … + a n x n  b Where each a i is a constant and each x i is a variable, and  i is a relation operator of the from =,, =. The optional aggregate operator has the from OP(f) where OP is one of the aggregate optators: max, min, MAX, MIN, sum_max, sum_min, and f is a liner function of the variables in the rule. 8

L8-2-S9 MLPQ © M.E. Fayad SJSU -- CmpE-- M.E. Fayad Differences ( continued ) For the negation the symbol ! Is used instead of not. The Module Name controls what type of query evaluation methods will be used. It should be one of these strings: –MLPQ – to evaluate only non-recursive Datalog Queries. –RECURSIVE – to evaluation recursive Datalog Queries –GIS – to evaluate both Datalog and iconic queries 9

L8-2-S10 MLPQ © M.E. Fayad SJSU -- CmpE-- M.E. Fayad Example Database file – regions.txt begin%Test% country(id,x,y,t):- id = 1, x >= 0, x =5, y =1800, t <=1950. country(id,x,y,t):- id = 1, x >= 0, x =5, y =1950, t <= country(id,x,y,t):- id = 2, x >= 4, x =5, y = 1800, t <=1950. country(id,x,y,t):- id = 2, x >= 8, x =5, y = 1950, t <= country(id,x,y,t):- id = 3, x >= 0, x =0, y = 1800, t <= location(c,x,y):- x = 3, y = 2, c = 101. location(c,x,y):- x = 7, y = 3, c = 102. location(c,x,y):- x = 5, y = 6, c = 103. location(c,x,y):- x = 7, y = 10, c = 104. location(c,x,y):- x = 10, y = 8, c = 105. location(c,x,y):- x = 1, y = 7, c = 106. location(c,x,y):- x = -8, y = 6, c = 107. growth(t,c,p):- c = 101, p = 10000, t >=1800, t <= growth(t,c,p):- c = 102, p = 20000, t >=1800, t <= growth(t,c,p):- c = 103, p = 10000, t >=1800, t <= growth(t,c,p):- c = 104, p = 30000, t >=1800, t <= growth(t,c,p):- c = 105, p = 40000, t >=1800, t <= growth(t,c,p):- c = 106, p = 35000, t >=1800, t <= end%Test% 10

L8-2-S11 MLPQ © M.E. Fayad SJSU -- CmpE-- M.E. Fayad The MLPQ Graphical User Interface 11

L8-2-S12 MLPQ © M.E. Fayad SJSU -- CmpE-- M.E. Fayad SQL Query Find all cities that in 1900 belonged to the USA and had a population of over Click [Qs], click SQL - Basic button In Create View field enter: “cityUSA1900” In Select field enter: “growth.c, location.x, location.y” In From field enter: “growth, location, country” In Where field enter: “growth.c = location.c, location.x = country.x, location.y = country.y, growth.t = 1900, growth.p > 10000, country.id = 1, country.t = 1900” 12

L8-2-S13 MLPQ © M.E. Fayad SJSU -- CmpE-- M.E. Fayad Results 13

L8-2-S14 MLPQ © M.E. Fayad SJSU -- CmpE-- M.E. Fayad Many Operators 14

L8-2-S15 MLPQ © M.E. Fayad SJSU -- CmpE-- M.E. Fayad Recursive Queries Recursive Datalog queries are entered the same way as non-recursive queries except that the module name is changed to RECURSIVE. This activates some special evaluation routines that are applicable for recursive queries only.