views:

1156

answers:

19

One of the first things I do when I'm on a new project is design a database model. To visualize the model I use a 7 year old version of Smartdraw. Maybe it's time for something new. What is the ultimate program to make a drawing of a database model. Smartdraw is for Windows only. Is there something that can be used on unix as well?

+13  A: 

The best tool is pencil and paper.

Perhaps not the answer you are looking for, but sometimes the most simple solution is the best. :-)

andyuk
I wonder if everyone who upvoted this also write their code in the same way...
F.D.Castel
It's about designing code, not writing code. And yes, I usually sketch the most important structures of a bigger program with "pencil and paper", because it helps concentrating on the important questions.
vog
And that way you can easily re-arrange tables and relationships after they're drawn. And then you can export the diagram to SQL code.Oh wait...
JoeCool
I thought the question was clear: What is the ultimate program to make a drawing ... I need a tool to document my database model.
Frans
+2  A: 

I don't know if it's the "ultimate" program for drawing database models, but I use Visio. Unfortunately, it only runs in Windows.

On the upside, I can create my own shapes, or modify existing ones, and save them in collections called stencils. I can also make my shapes "smart" by programming them to do various things when I double click on them.

The Hoss
Voted down. In my experience Visio sucks big time for that.
Alvaro Rodriguez
+9  A: 

A whiteboard (and camera to take a picture afterwards)

RichH
+1  A: 

DIA is not bad, and there are tools to actually generate some code from some types of models. If you are using PostgreSQL, there is even a tool for going the other way, pg-autodoc.

DIA is available for Unix, and I believe Windows as well.

Grant Johnson
+1  A: 

I used to use Viso but now, as I'm more Mac based I use Omnigraffle.

I do have to admit though, as andyUK does, I do a rough sketch on paper.

It also depends on what Database you're using. If it's MySQL then there are quite a few visual development tools available, just have a google

Katy
A: 

There may be more technical programs, but I use SmartDraw. I would also like to note that 'ultimate' is up to your circumstances. Find what works best for you or you and your company. What works for you is the 'ultimate'.

Arthur Thomas
A: 

OpenOffice has a vector drawing tool, and Inkscape is a another good one.
Otherwise, you can use Graphviz (dot language) to generate such diagram out of a textual description.
There are also some tools to generate such diagram out of an existing database (I first thought it was what you were asking).

PhiLho
A: 

If you don't need much take Dia.

unexist
+1  A: 

Brainstorm/sketch the database on paper/whiteboard first, and then go with a diagram tool.

Which tool depends on your target database. We use SQL Server and thus the designer in SQL Server Management Studio works great for us, since we create the database itself at the same time.

Geir-Tore Lindsve
+3  A: 

Did you take a look at Visio 2007 SQL Server Add-In?

You can find it here: http://dbalink.wordpress.com/2008/04/24/microsoft-office-visio-2007-professional-sql-server-add-in/

MarlonRibunal
+2  A: 

I use a whiteboard and a camera as well. I second the pencil and paper. I keep a pen(cil) and pad of paper with me almost always because I am forever designing something in my head and need to jot it down. I like Visio as well but my favorite software program to use has always been ERWin. The price of that thing is just way out line, but it is great.

Optimal Solutions
+3  A: 

I'm happy using Sybase PowerDesigner for years now.

+2  A: 

WWW SQL Designer is one of the best that I've seen, which is pretty amazing since it is all javascript. It can also import and export xml and sql code of everything you draw. And they've added nifty bezier curves since I last used it.

Paul Wicks
A: 

I used Power Designer. It's powerful but rather complex.

chitza
+1  A: 

For linux I use umbrello

+6  A: 

Your brain is the best drawing tool.

I prefer to develop a database schema in a simple text file. At first it contains just the table names, attributes and foreign keys:

company:
    company_name
    ...

employee:
    name
    age
    company_name -> company
    ...

...:

The syntax is not important. It just needs to be clearly arranged and easy to change. Later I add types and CHECK() constraints, so the text file gradually transforms into valid SQL code.

Using a drawing tool in that early stage is just distracting, because it encourages to waste your time with moving reactangles. Instead, let your brain build a picture of the schema in the same way it creates fantasy pictures while reading a book.

As the schema grows, it becomes necessary to support the brain by creating an overview. Here, however, pencil and paper are faster than any drawing software. Also note that there is no need to clutter an overview with unimportant details. Just sketch the table names and the most important relationships (foreign keys). Any further details will decrease the value of this overview.

However, if you really feel more comfortable with extremely detailed graphics than with text files and overview graphics, you might want to try DBDesigner4 or WWW SQL Designer.

vog
I'd second DBDesigner4 for MySQL - quite intuitive to use and easy to gets to grips with. Works well at constructing the tables from your diagram, and reverse engineering existing databases.
iAn
I second the text file idea. Not sure I consider the brain a drawing tool.
harpo
+2  A: 

I like ERWin. Not Cheap, but it can reverse engineer or do initial design + generate CRUD and manipulate db structure. Viso is pretty good for this too, but its not as complete and of course as strong MS SQL leanings is capabilities.

MikeJ
+1  A: 

I used to use Visio, but if your database server is MySQL, try MySQL Workbench. It has a linux version as well as a win32 version. Like their other GUI products it has its fair share of quirks, but it works quite well and has the ability to create a diagram of a schema and a schema from a diagram.

I also agree that a pencil and paper, or whiteboard and camera is a great way to sketch things out, but I do like the GUI tools for putting down an idea which is a bit more well formed or complicated.

Shabbyrobe
+1  A: 

If you're looking for a cheap solution/tool without any reverse/forward engineering capabilities, MS Visio might be your best bet. However, if you're planning to invest some money toward ERD tool, spend it on ER/Studio.

I used to use and be champion of ERWIN. As soon as I started to use ER/Studio, I became fan of it. I'm an enterprise data architect at one of the Fortune 100 company and I don't know how to get my work done without it.

PS: I don't have no affiliations with any of those products and companies.

Mevdiven