Assistance with ER Diagram Installation

rw1

Moderator
In order to illustrate concepts such as primary and foreign keys and also the structures required for cascading dropdowns and database joins i have been wanting to find a visual solution that makes it easy to understand what is going on.

I have come across wwwsqldesigner and am using this as a starting ground for some of these explanations.

I've written a tutorial here on how to install it, however am myself having trouble importing databases to it.

In chrome I am getting the error:

XML error: null document.

In Firefox, a blank grid loads, although with firebug > console on it shows '200 OK 512ms' but then also shows 'Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/ttt/public_html/ttt/backend/php-mysql/index.php on line 38'.

If anyone could have a look at the tutorial and possibly troubleshoot the error i am getting when trying to import a database it would be much appreciated.

Thank You!
 
I went through the tutorial - worked fine for me!
In chrome the only thing that was a bit odd was that when I loaded my test diagram I had to use the navigator to scroll over to where the entities were shown.
 
ah rats, well thanks for going through the tute! glad you got it working!

i take it you are defining the database you want to import from in the second function in backend/php-mysql/index.php ie:

Code:
function setup_import() {
// define the server where you will be importing databases from, usually localhost 
define("SERVER","localhost");
// define the user who has access to the database you wish to import 
define("USER","prefix_username");
// define their password 
define("PASSWORD","password");
// leave this as is - do NOT adjust this 
define("DB","information_schema");

and then when you click save/load > import from db are you typing in 'prefix_databasename' or 'prefix_databasetable' (the table within the database) that the user defined above has access to?

i've tried both and, after setting up again, i don't get any error message just a blank grid :(

firebug > console > all shows:
Code:
GET http://www.***.com/sqldesigner/backend/php-mysql/?action=import&database=prefix_databasetablename  200 OK  685ms

<?xml version="1.0"?>

<sql db="mysql">
<datatypes db="mysql">

	<group label="Numeric" color="rgb(238,238,170)">

		<type label="Integer" length="0" sql="INTEGER" re="INT" quote="" />

		<type label="Decimal" length="1" sql="DECIMAL" re="DEC" quote="" />

		<type label="Single precision" length="0" sql="FLOAT" quote="" />

		<type label="Double precision" length="0" sql="DOUBLE" re="DOUBLE" quote="" />

	</group>



	<group label="Character" color="rgb(255,200,200)">

		<type label="Char" length="1" sql="CHAR" quote="'"/>

		<type label="Varchar" length="1" sql="VARCHAR"  quote="'"/>

		<type label="Text" length="0" sql="MEDIUMTEXT" re="TEXT" quote="'"/>

		<type label="Binary" length="1" sql="BINARY" quote="'"/>

		<type label="Varbinary" length="1" sql="VARBINARY" quote="'"/>

		<type label="BLOB" length="0" sql="BLOB" re="BLOB" quote="'"/>

	</group>



	<group label="Date &amp; Time" color="rgb(200,255,200)">

		<type label="Date" length="0" sql="DATE" quote="'" />

		<type label="Time" length="0" sql="TIME" quote="'" />

		<type label="Datetime" length="0" sql="DATETIME" quote="'" />

		<type label="Year" length="0" sql="YEAR" quote="" />

		<type label="Timestamp" length="0" sql="TIMESTAMP" quote="'" />

	</group>

	

	<group label="Miscellaneous" color="rgb(200,200,255)">

		<type label="ENUM" length="1" sql="ENUM" quote="" />

		<type label="SET" length="1" sql="SET" quote="" />

		<type label="Bit" length="0" sql="bit" quote="" />

	</group>

</datatypes>


</sql>
 
and then when you click save/load > import from db are you typing in 'prefix_databasename' or 'prefix_databasetable' (the table within the database) that the user defined above has access to?
I saved as 'test', then could load 'test' :)
I think all diagrams you save/load are going to be stored in the db specified in the config, so I wouldnt be using those same values when saving
 
thanks very much for your reply.

yes, that is for saving and loading diagrams.

there is also the option to 'import from db' which i think is a different function ie you can import an existing database table (or database, not sure) into the designer.

this is good if you don't want to redraw your existing database tables etc.

and i am not able to 'import from db'.
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top