Fetch data from heterogenous tables(Rails SQL views, SQL Union)

Let’s say you have a ‘cars’ table and a ‘bikes’ table, and the schema can not be changed. Some fields are the same, and you want to display ( paginate, search etc) a list with products that are both cars and bikes (from both the car and the bike models),┬ásorted by their creation date.

This post is about how this can be accomplished using sql views.

Continue reading

Database UML tool for MySQL – automatic UML schema from DB

MySQL has a UML tool that also can reverse engineer the existing tables.
It is free (of course ­čÖé ) and you can grab it from here: http://dev.mysql.com/workbench/