LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   genarating ddl in mysql (https://www.linuxquestions.org/questions/linux-newbie-8/genarating-ddl-in-mysql-924425/)

mlnm 01-18-2012 08:57 AM

genarating ddl in mysql
 
hi, i am trying to generate ddl in mysql in a rhel server and create a database.I have a data model.
I am new to this and cant find any helpful topics about this on net.
Please guide me through procedure about how can i do that.

chrism01 01-18-2012 11:39 PM

Depends exactly what you mean.
If you want to generate the DDL that corresponds to an existing schema, see 'show create table' and/or mysqldump
http://stackoverflow.com/questions/1...and-sql-server
http://dev.mysql.com/doc/refman/5.1/...mysqldump.html


If you have the schema design in another format eg text, then you'll need to write a prog eg Perl to parse that to create the DDL.
Note that most (all?) schema design tools usually have a built-in fn or associated tool that will do that for you.
It may or may not be MySQL compatible if the tool is designed eg for Oracle

HTH

mlnm 01-19-2012 08:27 AM

I have my data model in visio format and i have 2007 visio but i hav read that in visio 2007 & 2010 forward engineering has been removed.And i have downloaded 2010 visio and installed a add-on for forward engineering ,but its is saying not compatible.Now what shall i do to forwaard engineer this visio file.

chrism01 01-19-2012 05:18 PM

I'm afraid I know little about MS tools, but it seems to me your first step is to extract the info into some kind of text format.
Basically you just need the table/column defns and indexes also.
Decide if you want ISAM or InnoDB engine.
Have you defined any foreign keys?

visio is all very well for diagramming relationships, but for actually specifying table/col & index definitions I know of no way to put that straight into a DB.
Its possible(??) that MS may have a tool to extract into an MSSQL schema, but as above, that may not be MySQL compatible.


All times are GMT -5. The time now is 01:27 AM.