H ECATAEUS A Framework for Representing SQL Constructs as Graphs George Papastefanatos 1, Kostis Kyzirakos 1, Panos Vassiliadis 2, Yannis Vassiliou 1 1 National Technical University of Athens-KDBMS Laboratory 2 University of Ioannina
G.Papastefanatos, K.Kyzirakos, P.Vassiliadis, Y. Vassiliou. A Framework for Representing SQL Constructs as Graphs EMMSAD’05, Porto, Outline Background & Motivation A Graph-based Model for SQL Constructs Implementation of the Framework Case study: Modeling TPC-C benchmark Conclusions and Future Work
G.Papastefanatos, K.Kyzirakos, P.Vassiliadis, Y. Vassiliou. A Framework for Representing SQL Constructs as Graphs EMMSAD’05, Porto, Outline Background & Motivation A Graph-based Model for SQL Constructs Implementation of the Framework Case study: Modeling TPC-C benchmark Conclusions and Future Work
G.Papastefanatos, K.Kyzirakos, P.Vassiliadis, Y. Vassiliou. A Framework for Representing SQL Constructs as Graphs EMMSAD’05, Porto, Contribution A graph modeling framework that uniformly covers relational tables, views, database constraints and SQL queries An implementation of the framework, named H ECATAEUS.
G.Papastefanatos, K.Kyzirakos, P.Vassiliadis, Y. Vassiliou. A Framework for Representing SQL Constructs as Graphs EMMSAD’05, Porto, Why bother modeling SQL queries as graphs? Visualization and analysis of both the structure and the workload of the system Forecasting of the impact of changes Evaluation of the quality of the database design Framework stakeholders Database Administrators Database Designers / Developers
G.Papastefanatos, K.Kyzirakos, P.Vassiliadis, Y. Vassiliou. A Framework for Representing SQL Constructs as Graphs EMMSAD’05, Porto, Motivation Queries Evolution Which part(s) of the system is (are) affected if we delete an attribute and how? Performance Which part(s) of the system has (have) the most workload? Database Analysis and Quality Evaluation Which tables are correlated the most ? Is design A better than design B and why?
G.Papastefanatos, K.Kyzirakos, P.Vassiliadis, Y. Vassiliou. A Framework for Representing SQL Constructs as Graphs EMMSAD’05, Porto, Background Traditional database modeling techniques, like ER diagrams, focus on conceptual level modeling. Visual Query Languages – Visualization techniques Graph-based Icon-Based Diagram-Based
G.Papastefanatos, K.Kyzirakos, P.Vassiliadis, Y. Vassiliou. A Framework for Representing SQL Constructs as Graphs EMMSAD’05, Porto, Outline Background & Motivation A Graph-based Model for SQL Constructs Implementation of the Framework Case study: Modeling TPC-C benchmark Conclusions and Future Work
G.Papastefanatos, K.Kyzirakos, P.Vassiliadis, Y. Vassiliou. A Framework for Representing SQL Constructs as Graphs EMMSAD’05, Porto, Graph Model A graph modeling technique that uniformly covers relational tables, views, database constraints and SQL queries Directed Labeled Graph Relations Conditions Queries/Views
G.Papastefanatos, K.Kyzirakos, P.Vassiliadis, Y. Vassiliou. A Framework for Representing SQL Constructs as Graphs EMMSAD’05, Porto, Graph Model (continued) The proposed modeling technique represents all the aforementioned database parts as a directed labeled graph with specific types of nodes and edges for each database part and relationship. Graphs are employed as a modeling technique because they can address the large size and complexity that characterize a database schema.
G.Papastefanatos, K.Kyzirakos, P.Vassiliadis, Y. Vassiliou. A Framework for Representing SQL Constructs as Graphs EMMSAD’05, Porto, Representing Relations Relation: EMP(Empid, Name, Salary)
G.Papastefanatos, K.Kyzirakos, P.Vassiliadis, Y. Vassiliou. A Framework for Representing SQL Constructs as Graphs EMMSAD’05, Porto, Representing Conditions Primary Key on EMPID Query condition SELECT EMPID, NAME FROM EMP WHERE AGE>30 AND SALARY>5000;
G.Papastefanatos, K.Kyzirakos, P.Vassiliadis, Y. Vassiliou. A Framework for Representing SQL Constructs as Graphs EMMSAD’05, Porto, SELECT EMP.EMPID,Sum(WORKS.Hours) as T_Hours FROM EMP, WORKS WHERE EMP.EMPID = WORKS.EMPID GROUP BY EMP.EMPID; Representing Queries
G.Papastefanatos, K.Kyzirakos, P.Vassiliadis, Y. Vassiliou. A Framework for Representing SQL Constructs as Graphs EMMSAD’05, Porto, SELECT EMP.EMPID,Sum(WORKS.Hours) as T_Hours Representing Queries - SELECT Subgraph
G.Papastefanatos, K.Kyzirakos, P.Vassiliadis, Y. Vassiliou. A Framework for Representing SQL Constructs as Graphs EMMSAD’05, Porto, FROM EMP,WORKS Representing Queries – FROM Subgraph
G.Papastefanatos, K.Kyzirakos, P.Vassiliadis, Y. Vassiliou. A Framework for Representing SQL Constructs as Graphs EMMSAD’05, Porto, WHERE EMP.EMPID = WORKS.EMPID Representing Queries - WHERE Subgraph
G.Papastefanatos, K.Kyzirakos, P.Vassiliadis, Y. Vassiliou. A Framework for Representing SQL Constructs as Graphs EMMSAD’05, Porto, GROUP BY EMP.EMPID Representing Queries - GROUPBY Subgraph
G.Papastefanatos, K.Kyzirakos, P.Vassiliadis, Y. Vassiliou. A Framework for Representing SQL Constructs as Graphs EMMSAD’05, Porto, Outline Background & Motivation A Graph-based Model for SQL Constructs Implementation of the Framework Case study: Modeling TPC-C benchmark Conclusions and Future Work
G.Papastefanatos, K.Kyzirakos, P.Vassiliadis, Y. Vassiliou. A Framework for Representing SQL Constructs as Graphs EMMSAD’05, Porto, H ECATAEUS Input Database schemas(DDL Files) Queries (SQL scripts) Representation in the proposed graph model Dynamic Graph – Holds all the semantics for the types of nodes and edges
G.Papastefanatos, K.Kyzirakos, P.Vassiliadis, Y. Vassiliou. A Framework for Representing SQL Constructs as Graphs EMMSAD’05, Porto, H ECATAEUS Functionality Different views of the graph(zoom in zoom out) Subgraph Isolation/Highlighting Manipulation of the graph components(e.g. add edge/ remove node) Output graph to various formats (PostScript, SVG) Definition and application of graph algorithms and metrics
G.Papastefanatos, K.Kyzirakos, P.Vassiliadis, Y. Vassiliou. A Framework for Representing SQL Constructs as Graphs EMMSAD’05, Porto, Architecture Parser Graph Manager Metrics Manager Catalog
G.Papastefanatos, K.Kyzirakos, P.Vassiliadis, Y. Vassiliou. A Framework for Representing SQL Constructs as Graphs EMMSAD’05, Porto, Development Platform MS Visual Studio.NET Platform Parser and Catalog: SharpHSQL, an open-source database in C#. Graph Manager and Metrics Manager: LEDA C++ libraries for.NET technology
G.Papastefanatos, K.Kyzirakos, P.Vassiliadis, Y. Vassiliou. A Framework for Representing SQL Constructs as Graphs EMMSAD’05, Porto, Outline Background & Motivation A Graph-based Model for SQL Constructs Implementation of the Framework Case study: Modeling TPC-C benchmark Conclusions and Future Work
G.Papastefanatos, K.Kyzirakos, P.Vassiliadis, Y. Vassiliou. A Framework for Representing SQL Constructs as Graphs EMMSAD’05, Porto, Demo – Modeling TPC-C Benchmark
G.Papastefanatos, K.Kyzirakos, P.Vassiliadis, Y. Vassiliou. A Framework for Representing SQL Constructs as Graphs EMMSAD’05, Porto, Outline Background & Motivation A Graph-based Model for SQL Constructs Implementation of the Framework Case study: Modeling TPC-C benchmark Conclusions and Future Work
G.Papastefanatos, K.Kyzirakos, P.Vassiliadis, Y. Vassiliou. A Framework for Representing SQL Constructs as Graphs EMMSAD’05, Porto, Conclusions Contributions A graph modeling framework that uniformly covers relational tables, views, database constraints and SQL queries An implementation of the framework, named H ECATAEUS. Potential Benefits Visualization of both the structure and the workload of the system Evaluation of quality of Database Design Forecasting of the impact of changes
G.Papastefanatos, K.Kyzirakos, P.Vassiliadis, Y. Vassiliou. A Framework for Representing SQL Constructs as Graphs EMMSAD’05, Porto, Future Work - Research in Progress Definition of Metrics and Algorithms for Evolution Definition of Metrics for Design Quality Application of graph-theoretic metrics and algorithms Reverse functionality. Automatic DDL and SQL code creation from graphs Integration of Hecataeus with a Repository
G.Papastefanatos, K.Kyzirakos, P.Vassiliadis, Y. Vassiliou. A Framework for Representing SQL Constructs as Graphs EMMSAD’05, Porto, Thank you! Many thanks to our hosts! (Muitos agradecimentos a nossos anfitriões!) Any questions?