ERMaker

Final Report

Final Report

Motivation

Entity Relationship diagrams(ER-diagrams) are typically used in computing to organize data within databases and information systems. These graphical representations of entities and their relationships to each other are particularly useful during the conceptual-design and review phases of databases.

Often drag and drop software as to other programming languages are tedious to use, resulting in complex learning processes and time consumption. ERMaker is a high-level programing language developed as an alternative for drawing ER-diagrams.

Language Features

ERmaker will allow the user to draw, through a console, the following major components of an ER-diagram:

  1. Rectangles divided into two parts: These will represent entity sets. The top part will represent the name of the entity set. The bottom part will contain the names of the attributes corresponding to that particular entity set.
  2. Small Rectangles: These will represent relationship sets.
  3. Lines: link relationship sets to entity sets.
  4. Mapping cardinality:The user will be able to specify if the cardinality is one-to-one, one-to-many, many-to-one or many-to-many.
  5. Modality: State whether an entity’s participation in a relationship is mandatory or optional.

Video

Sample Code:

>> many Professor can teach many course
>> many Student take many Course
>> a university has many Student
>> a University Offers many Course
>> a University employs many Professor
>> Student composed of ID, Name, Phone
>> University composed of Name, Address
>> Professor composed of ID, Name
>> Course composed of Name, Subject, Section

hi

Approach

Modules and Interfaces

The libraries that comprise the application are PLY and Graphviz . PLY contains the Yacc and the Lex modules that are used as the base for the implementation of the parser and lexer. Then, the Graphviz library was used to render the graphs by using raw dot language to describe them.

Our custom modules include ERLex, ERModel and ERGraph. The ERLex module contains the main code of the application, which implements the different elements of the language in the lexer using Lex and the grammatical elements using Yacc. The ERModel module contains the definition and implementation of the graph object used to store the model for the ER. It consists of methods to instantiate a graph and add, edit, and traverse through the nodes and edges, where nodes represent entities and edges represent relations.The ERGraph module contains the elements needed for the construction of the raw dot structure, required to draw the graph in graphviz.

Development Environment

Team

ER Maker team is comprised of Luis Padro and Lumaris Rios. This project was developed as part of the Programming Language course (ICOM4036) directed by Dr. Wilson Rivera.