DOC PREVIEW
SJSU CMPE 226 - The MLPQ System

This preview shows page 1-2-3-4-5-6 out of 18 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 18 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 18 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 18 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 18 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 18 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 18 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 18 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Database DesignSlide 2Slide 3MLPQTwo Main Application AreasThe MLPQ Database System ArchitectureMLPQ Input FilesDifferences between Datalog and MLPQ Input FileDifferences ( continued )Example Database file – regions.txtThe MLPQ Graphical User InterfaceSQL QueryPreparing a SQL QueryResultsMany OperatorsWhere to get the MLPQ DB SystemDatabase SetupQuestions?2003SJSU -- CmpE -- M.E. Fayad L6-S1 MLPQDatabase Design Dr. M.E. Fayad, ProfessorComputer Engineering Department, Room #283I College of EngineeringSan José State UniversityOne Washington SquareSan José, CA 95192-0180 http://www.engr.sjsu.edu/~fayad2003SJSU -- CmpE -- M.E. Fayad L6-S2 MLPQ 2Lesson 6: The MLPQ System2003SJSU -- CmpE -- M.E. Fayad L6-S3 MLPQ Lesson ObjectivesObjectives 3 Understand the MLPQ System Learn about:  The Database’s System Architecture MLPQ Input Files MLPQ Graphical User Interface Database Setup2003SJSU -- CmpE -- M.E. Fayad L6-S4 MLPQMLPQ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 42003SJSU -- CmpE -- M.E. Fayad L6-S5 MLPQTwo 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. This System allows the ability to go beyond two or three dimensions of mutually constrained data. 52003SJSU -- CmpE -- M.E. Fayad L6-S6 MLPQ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 62003SJSU -- CmpE -- M.E. Fayad L6-S7 MLPQMLPQ Input FilesEach Input File has this structure:begin %moduleName%12..nend %moduleName%Where i is a Datalog Rule or Rational Linear Constraint Tuple. 72003SJSU -- CmpE -- M.E. Fayad L6-S8 MLPQDifferences between Datalog and MLPQ Input FileEach Linear constraint has the form:a1x1 + a2x2 + … + anxn  b Where each ai is a constant and each xi is a variable, and i is a relation operator of the from =, <, >, <=, or >=.The optional aggregate operator has the from OP(f) where OP is one of the aggregate operators: max, min, MAX, MIN, sum_max, sum_min, and f is a liner function of the variables in the rule. 82003SJSU -- CmpE -- M.E. Fayad L6-S9 MLPQDifferences ( continued )For negation the symbol ! Is used instead of the word 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 92003SJSU -- CmpE -- M.E. Fayad L6-S10 MLPQExample Database file – regions.txtbegin%Test%country(id,x,y,t):- id = 1, x >= 0, x <= 4, y >=5 , y <= 15, t >=1800 , t <=1950.country(id,x,y,t):- id = 1, x >= 0, x <= 8, y >=5, y <=15, t >=1950 , t <= 2000.country(id,x,y,t):- id = 2, x >= 4, x <= 12, y >=5 , y <=15 , t >= 1800, t <=1950 .country(id,x,y,t):- id = 2, x >= 8, x <= 12, y >=5 , y <=15 , t >= 1950, t <= 2000.country(id,x,y,t):- id = 3, x >= 0, x <= 12, y >=0 , y <=5 , t >= 1800, t <= 2000.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 <= 2000.growth(t,c,p):- c = 102, p = 20000 , t >=1800 , t <= 2000.growth(t,c,p):- c = 103, p = 10000 , t >=1800 , t <= 2000.growth(t,c,p):- c = 104, p = 30000 , t >=1800 , t <= 2000.growth(t,c,p):- c = 105, p = 40000 , t >=1800 , t <= 2000.growth(t,c,p):- c = 106, p = 35000 , t >=1800 , t <= 2000.end%Test%102003SJSU -- CmpE -- M.E. Fayad L6-S11 MLPQThe MLPQ Graphical User Interface112003SJSU -- CmpE -- M.E. Fayad L6-S12 MLPQSQL QueryFind all cities that in 1900 belonged to the USA and had a population of over 10000.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”122003SJSU -- CmpE -- M.E. Fayad L6-S13 MLPQPreparing a SQL Query132003SJSU -- CmpE -- M.E. Fayad L6-S14 MLPQResults142003SJSU -- CmpE -- M.E. Fayad L6-S15 MLPQMany Operators152003SJSU -- CmpE -- M.E. Fayad L6-S16 MLPQWhere to get the MLPQ DB SystemGo to Dr. Fayad’s web site for this courseClick the MLPQ-PRESTO System executable and sample database link near the bottom of the page.Also read the Getting started, Tips, and Specification documents162003SJSU -- CmpE -- M.E. Fayad L6-S17 MLPQDatabase SetupThere is not a installer included with this databaseJust create a directory, unzip the contents of the archive file into this directoryLocate and double click the mlpq_nt.exe file.172003SJSU -- CmpE -- M.E. Fayad L6-S18


View Full Document

SJSU CMPE 226 - The MLPQ System

Documents in this Course
SQL-99

SQL-99

71 pages

XML

XML

52 pages

XML

XML

14 pages

Chapter 9

Chapter 9

45 pages

Load more
Download The MLPQ System
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view The MLPQ System and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view The MLPQ System 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?