Tell me more ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

What techniques, thought processes and tools/apps do you use for setting up a database schema for a rails app?

I'm a very visual person so I naturally start with sketching on paper but I was wondering if there is any good apps (mac) to help me design a relational database structure for my app?

share|improve this question
2  
love when people downvote without saying why – js111 May 17 '12 at 23:00
2  
What is it about a rails app that would require special software? The database used might be a bigger factor. No, I didn't downvote. – JeffO May 17 '12 at 23:10
Someone did previously... anyways, im justing looking for a visual database design app i guess to help me set up the tables and see everything laid out..Like i said i usually just draw it out on paper, but wondering if there was an app for it – js111 May 17 '12 at 23:40

closed as not constructive by Walter, Blrfl, ElYusubov, GlenH7, MainMa Nov 17 '12 at 15:34

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or specific expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, see the FAQ for guidance.

3 Answers

It's not direct answer rather telling our experiences on how we design databases with Rails.

In fact, we never design tables. We design our model. When we make the plan of the application , we plan about the models and their relationships. During the creation of model, we define the fields & their types and rails model generator creates migration file for that. when we run rake db:migrate the database structure is laid. however, after creation of the structure, we use phpMyAdmin (for MySQL) and pgAdmin (for postgres) to see the structures from time to time during the application development. if we need to readjust the fields in future, we do not manually edit the tables rather we create a separate migration (rails migration generator) where we design the changes and rake db:migrate again adjusts the changes.

The above are for the SQL solutions. For NoSQL, so far we've used MongoDB (mongoid). As MongoDB is schemaless, table (collection) definition is easier. In the model, we define the fields and their type.

Summary

So, we never felt like we need any other visualized database softwares. Life is already much fun here.

share|improve this answer

im justing looking for a visual database design app

You could use either a UML tool that offers the capabilities of modeling and code generation with Class Diagrams (e.g. Visual Paradigm) or use a data modeling tool such as ERwin or PowerDesigner or MySQL Workbench or SQL Server diagrams or VISIO. There are so many tools out there that provides visual database design capabilities and some are free too.

share|improve this answer

I know exactly what you mean as I like to "see" what I am doing and find verbose methods hard to digest and I always miss attributes. I used a web based tool called Gliffy when I was studying and it looks like it is still going. But it won't play with rails so you still have to type in the code for the model but at least you get an idea of what the classes should "look" like.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.