1. "Fabrik 4" helpers needed!

    You are invited to join other community members active in coding, maintaining and improving Fabrik. Please visit https://fabrik.help for more information!
    Dismiss Notice

Installing wwwsqldesigner

Jul 2, 2013
Installing wwwsqldesigner

  • Introduction (top)

    Creating an application framework usually consists of:

    • the idea - what is it that you want to create?
    • the implementation - how are you going to implement this?
    • the execution - running the application live
    Good database designis an essential part of this journey and part of the implementation process.

    Main Features (top)

    wwwsqldesigner allows you to 'plot out' your ideas in an ER diagram and has these main features:

    • the ability to save these diagram
    • the ability to load saved diagrams
    • the ability to import existing databases
    • the ability to import and export xml files
    • the ability to generate mysql from your diagrams
    You can see the demonstration installation here.

    Installation (top)

    These are the steps required if you are using MySQL and phpMyAdmin and collation is OK as utf8_general_ci.

    • Download zip file from http://code.google.com/p/wwwsqldesigner/
    • Extract to your system
    • Upload contents to a directory on your site
    • Create a database (in cPanel for example)
    • Create a database table in phpMyadmin consisting of three (3) columns:
      • Column 1 called keyword, varchar(255), Default is 'None', utf8_unicode_ci
      • Column 2 called data, mediumtext, Default is 'NULL', utf8_unicode_ci, null checkbox checked
      • Column 3 called dt, timestamp, Default is CURRENT_TIMESTAMP, attributes 'on update CURRENT_TIMESTAMP'
    • Set the 'keyword' column as the index - not sure if this is necessary but phpMyAdmin prompts to set an index.
    • Note: You can import the database at backend/php-mysql/database.sql into your new database if you would like to see what the database table should look like.
    • Edit the file at backend/php-mysql/index.php so that the first three (3) functions match your new database settings.
    You should now be able to 'Save' and 'Load' schemas by their keyword.

    Example index.php (top)

    The following is a commented configuration for the first three (3) functions in your backend/php-mysql/index.php file.


    function setup_saveloadlist() {
    // define your server, usually localhost
    // define the user who has access to your wwwsqldesigner database
    //define their password
    // define the wwwsqldesigner database where your keywords will be saved and loaded from
    // define the wwwsqldesigner database table where you keywords will be saved and loaded from
    function setup_import() {
    // define the server where you will be importing databases from, usually localhost
    // define the user who has access to the database you wish to import
    // define their password
    // leave this as is - do NOT adjust this
    // ================== generally you do not need to edit below this line ==================
    function connect() {
    $conn = mysql_connect(SERVER,USER,PASSWORD);
    if (!$conn) return false;
    $res = mysql_select_db(DB);
    if (!$res) return false;
    return true;

    Password Protecting Your Directory (top)

    You may wish to password protect your directory by following the steps mentioned here: