ERW is a set of specifications and tools that makes it easy to create, modify and maintain via web a database described by an entity-relationship schema. Firstly, you describe the domain of interest using ERL, an XML-based language. Then ERW creates for you an SQL database, a set of customisable forms that edit the database, graphical layouts of the schema and documentation. Of course, ERW can be used for content management, in particular when your data is structured along complex relations.

In a way, ERW is a framework (in the object-oriented sense), as it provides a general infrastructure—you just have to "fill in the blanks" by describing the basic objects (entities and relationship) you want to manipulate.

The main limit of this approach (which is intrinsic to the framework idea) is that you cannot expect to add easily features that are not present in ERW (unless, of course, you are ready to work on the framework itself, which is overkill for a single application). For instance, if you do not like the way lists of entities are displayed, there is little you can do (albeit there are hooks that let you customise several parts of the overall behaviour). This, however, has also the effect of making all ERW-based applications look very similar: a user can easily shift from one to another.

Moreover, the limitations are overwhelmed by the advantages: you have to write no code. A description of an entity-relationship schema is sufficient to generate a complete application, or, as sometimes one says, ERW is able to perform a complete reification of the description. If you need to modify your schema, you just have to modify the description (migration of the database content, however, must be handled manually).

Many tools for database design let you generate SQL code starting from an entity-relationship schema: ERW goes much farther, and uses the ontological information contained in the abstract description to build a sophististicated user interface, which, combining HTML, CSS, the W3C DOM and ECMAScript (the standardized version of JavaScript), lets the user interact with the database much in the same way as using a dedicated client application.

ERW provides support for many sophisticated schema features, such as multiple inheritance, weak entities with multiple owners, enumerative types, abstract entities, relationships with attributes, etc. Moreover, it provides useful end-user features, such as authentication and authorisation (even row-based), customisable labels and filters, internationalisation, UTF-8 support and so on. Ensuring coherence in such a generic setting required a very precise semantics of a schema, which is fully described in the manual and allows one to access the database and modify it using other clients.

Another noteworthy feature is that ERW is architecture independent and entirely based on international standards and open-source tools. Moreover, ERW is free software distributed under the GNU General Public License. However, applications built using ERW may be distributed under the license of your choice (similarly to what happens to programs compiled with a free compiler).

Probably at this point you are not really understanding what ERW does: this is not uncommon, as ERW lies at the intersection of many kind of previously known software (RAD, CASE, etc.). The easiest thing is to have a look at the preface to the documentation. This screenshot features a form automatically generated by ERW starting from this ERL file. Finally, you can browse the automatically generated diagram, which is hyperlinked to the automatically generated documentation (for a larger diagram, you can have a look at the DSI schema, but it's labelled in Italian), albeit the graphical notation used may be unfamiliar.

If you want to try more, and you have a sufficiently modern browser with JavaScript enabled, you can access a database based on the ERL file above: you can edit books, persons, subscribers and loans. You can play around (the database is restored every day), and you can change some user preferences.

There is also a simple Small Business Accounting database kindly provided as an example by Glenn R. Williams starting from this schema.


Since the first official (i.e., beyond 0.9) release, ERW development is along two parallel lines that follow the common odd/even pattern: released are numbered x.y.z. Even values of y represent stable releases, which essentially are just bug fixed. Odd values of y, on the contrary, represent development (and unavoidably less stable) releases, which however implement new features.

When significant new features are introduced in the stable release, a release candidate is distributed first, as ERW depends on a large number of system components, and needs testing on different systems.

Since everything is architecture independent, the stable versions is distributed in a tarball containing everything. There is also an RPM for lazy people, and its source RPM.


Installing ERW requires some knowledge, as you have to install a Java™ class and some PHP scripts. The documentation contains detailed installation instructions. Note that since ERW relies on a number of components being properly configured (e.g., Apache and PHP) you should follow very carefully those instructions.


ERW is currently used to edit databases used in production sites, but there are several things that must re-engineered, fixed, or written altogether.

What we consider stable is the entity-relationship language and the associated reification algorithm. This means that, even if we completely rewrite our tools and re-implement the PHP code, they will continue to work on previous databases.

Said that, this is a non-exhaustive list of what needs to be done (any help, of course, is appreciated):

The main point, however, is to redesign from scratch the system in steps, using a componentised approach. Currently, we are investigating several web applications framework as a possible base for a new-generation ERW.