WHAT IS SOCRATES
All it requires as an input is your Mysql dump sql script. Just paste the sql and it generates a schema diagram. Simple and fast. Please note that this is a work in progress and I am in the process of adding in more features.
WHY SOCRATES WAS MADE
As part of our documentation of projects, we are often needed to create database schema diagrams of our existing MySQL databases. Now the only way to do that is :
- Use a commercial application/tool which automatically creates a schema diagram
- Create a schema diagram by hand by entering everything manually
I did a lot of searching over the web to look for a free online tool which could immediately show me a schema diagram of my MySQL database, but there is nothing like that available. As a result I decided I would make an online application for this purpose.
FEATURES IN VERSION 1.0 (Feb 19th, 2015)
- Ability to handle “CREATE IF NOT” table clause
- Display foreign keys
- Show relations between tables
FEATURES IN VERSION 0.5 (Aug 2nd, 2012)
- Takes in a maximum of 750k characters for the sql dump input.
- Parses the sql file to generate information about tables,fields and primary keys
- Ability to extract table name, field info, default values and primary key info.
- Shows the parsed information as a diagram.
- The boxes in the diagram are draggable so that you can achieve your desired layout
A sample screenshot of a Joomla CMS database schema is shown below:
EXPLANATION OF THE SCHEMA DIAGRAM
Each table is shown as a block. Within each table it shows
- The table name
- The field list. For each field it shows the name, field type and default value if any
- If a field is part of a primary key it is marked as (P)
- If a field is allowed to have a null value is marked with an N
- If a field is defined as a foreign key from another table , it is marked with (F)
SAVE THE DIAGRAM AS A SCREENSHOT
Since its not possible for any server-side language to save a web page as an image, without using external server hosted applications, I would recommend that you install any of the several free browser-addons which lets you save the current page in the browser as an image. Any of these add-ons would save the entire diagram as an image.
As mentioned before, this is a work in progress, so I will be continually adding more features. I am particularly aiming to automatically show foreign key linkages using connectors between the blocks as thats something which is very useful.
I would be very interested in your feedback and comments on any bugs or ideas that you want to convey.