Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialjustdave
31,518 PointsDatabase Creation Workflow, How To Do It?
I am writing an app that needs a database and want to know what's the best way to go about constructing the database. I have a mysql DB from an old wordpress site I want to use, unfortunately I don't think it's in good shape with most of the info I wanted having being added to a "and here's some other stuff about this post" column.
What is a good way to automate the process of converting an old DB or creating a new one? I'm not sure which DB I will eventually use, I've tried mongo but am also looking at other options, I' d really like the data in a raw form to begin with where I can run a script and populate a database, being able to try out different DB styles and structures without 40 hours of data entry.
The options I've thought of so far are doing manual edit, or setting up CRUD interface with some validation to add entries, neither of which are ideal since are time consuming and lock me into one format without option to change easily.
Your thoughts appreciated!
1 Answer
Steven Parker
231,269 PointsWhen you say "raw form", do you mean something like a CSV (text) file? The MySQL Workbench tool will export and import CSV files. You could then convert that file into a script in a text editor, or perhaps import them as-is into a different database.
But you could also convert the table formats using SELECT ... INTO
queries, which might be even more expedient. The best choice for technique will probably depend on what structure changes you decide to make, and which database you decide to use.
justdave
31,518 Pointsjustdave
31,518 PointsHi Steven, yes something like CSV would be nice. Thanks for the link, will check it out.
edit: I suppose raw from isn't the best description to use, what I mean is a format where I can easily manipulate data.