Bruce Mills

BSc(Hons) student in 2010

Project: Integrating S.E.A.L into PostgreSQL

Supervisor: PavleMogin and Peter Andreae


SEAL (Simple Entity Association Language) is a declarative language for specifying entity-association queries and queries against EAV (Entity Attribute Value) databases. Entity-association queries return instances of an entity type which satisfy some constraints involving participation in relationships. EAV databases are special relational structures to cope with sparse, multi-valued data and ad-hoc user defined attributes. SQL (Structured Query Language) by itself is poorly suited for expressing entity-association queries and queries against EAV databases, because queries must be nested and involve complex join conditions. S.E.A.L. is an extension of SQL that allows expressing entity association queries in an easy and natural way. This project has been broken into three parts. The first part (successfully completed by Eddie Stanley in 2007) involved defining basic syntax and semantics of the SEAL language and building a Java prototype interpreter as a proof of the concept. The second part (successfully completed by Kunal Madhav in 2009) was extending S.E.A.L. syntax and semantics to provide a wider support for entity-association queries and running a usability test. The third part is integrating SEAL into PostgreSQL and further fine tuning of syntax and semantics. Each part is a separate project. Integration of S.E.A.L. into PostgreSQL may be accomplished in a number of different ways. One is to integrate the SEAL parser into the PostgreSQL parser. The two major steps of this integration are: - Modifying the parser of PostgreSQL to include a new type of Select Statement, which supports the SEAL syntax, and - Rewriting the existing SEAL Java code in C and compile it into PostgreSQL (using Java for this step seems to be a less elegant option). The other possible way of integration is to make a JDBC application that calls S.E.A.L. interpreter and submits generated SQL queries to PostgreSQL. The project needs to analyze available ways of integration and to implement one. Fine tuning of S.E.A.L. syntax and semantics should also be done.