Tool to make ERD for PostgreSQL - mysql

I am looking for a tool with that I can create a database ERD for a PostgreSQL Database.
In MySQL I use the tool "MySQL Workbench"
Do you know such a tool with that i can create a ERD. And from the ERD automatical create a sql-skript.
BG

I use DbWrench and Aqua Data Studio most often for these. There are many. See also:
http://wiki.postgresql.org/wiki/Community_Guide_to_PostgreSQL_GUI_Tools
DbWrench also has a handy reverse synchronize, which allows you to compare a model with changes made on the server.
If you mean that you want to dump the schema as is, I would definitely use pg_dump --schema rather than going through a GUI.
If you mean that you want to modify the schema, then I most tools will support that.
I have no association with DbWrench or ADS.

RISE is a freeware application that can model ERDs and even propagate it into the database layer.

Related

Reverse Engineer a FoxPro/dBsae database to create the EER model

I'm currently developing a webapp to a costumer and I need to import data from their old application.
As far as I can tell, the database is dBase written with FoxPro.
I have the application exe and lots of dbf/dbb/dbi files and I can open the dbf table files thanks to the DBF Commander.
Although I can open each table and see the data, I really could use an EER diagram to understand how the tables connect to each other.
Is there any tool that could reverse engineer the database and draw the EER diagram?
Thank you for time.
Regards,
Hugo
A lot depends on whether it's just a bunch of DBF/CDX/FPT files, or whether they belong to a database container (DBC/DCT/DCX extensions). If there's no database container, i.e. 'free tables', they haven't necessarily been created by FoxPro, it could have been any of the xBase languages, like Clipper and so on.
If they are part of a database container then there may be metadata in it defining rules, triggers, relations.
Even so, you probably really need a copy of Visual FoxPro (do you have an MSDN sub maybe?). It has a built-in tool called GenDBC which will document the structure of a database if it has a database container.
There is also the Stonefield Database Toolkit which would give better tools in this regard.
Or you could use the Upsizing Wizard in Visual FoxPro to get the data into SQL Server, and from there you would have a much better choice of tools.
See whether XCase gives you what you need: http://www.xcase.com/

Tool for table_schema and table_name relationship

Do you know any tools for profiling,to see the structure and relationship of each tables inside the db? it is look like this one :
See screenShot below,
For bigger resolution, Please click here.
Thanks In advance.
Any help much more appreciated! :)
MySQL Workbench is what youre looking for
http://www.mysql.com/products/workbench/
You could use the MySQL Workbench, if I remember correctly it has a function, which can do this (reverse engineer database or something similar).
See this SO post.
Have a look at Database Designer for MySQL in dbForge Studio for MySQL.
Database Designer is a powerful visual design tool for database development that allows you to build a clear and effective database structure visually and to see the complete picture representing all the tables, foreign key relations between them, views, and stored routines of your database on database diagrams.
Toad for MySQL has a Database Diagram feature allowing you to create such drawings from existing databases.
SchemaCrawler for MySQL is a free command-line tool that diagrams databases. SchemaCrawler is particularly useful when diagramming large and complex schemas, since it can diagram tables based on the results of regular expression searches of table and column names.
Sualeh Fatehi, SchemaCrawler

How to log mysql database structural changes

I'm working with a project which is using mysql as the database. The application is hosted with many clients and we are doing upgrades for the current live systems often.
There are some instances where the client has change the database structure(adding new tables) and causes some unexpected db crashes.
I need to log all the structural changes which were done at that database, so we can find the correct root cause for that. We can't do it 100% correct with diff tool because it will not show the intermediate changes.
I found http://www.liquibase.org/ tool but seems little bit complex.
Is there any well known technique or a tool to track database structural changes only.
well from mysql studio you can generate all object's schema definition and compare them with your standard schema definition and this way you can compare two database schema...
generate scrips of both database (One is client's Database and One is master copy database) and then compare it using file compare tool would be the best practice according to me because this way you can track which collumn was added, which column was deleted, which index was added like wise without any tool download.
Possiable duplication of Compare two MySQL databases ?
Hope this helps.
If you have an application for your clients to manage these schema changes, you can use a mechanism at application level. If you have a Python and Django-based solution, you could probably use South which provides schema change tracking and rollbacks.

ETL Tool for transfering old Firebird Database to a new organized Firebird Database

After looking at a lot of questions..i found no real answer for this.
I redisigned an Database for our customer.
With Microsoft Access i found a good Tool to get old table Data in my new well formed Database Structure. It is really easy but takes a lot of time (cause handling old Data with a lot of care).
Are there any Open Source Tools that bring that facilities like Microsoft Access?
To clear it up: I "just" want to reorder old Firebird Database Data in a new "best-practise" Way.
Edit:
I would be really nice if i can get a Log File or something similar to have some documentation on the changes.
Update:
After checking some of the Tools of that Wikipedia Site. I found no real Logging Mechanism.
How do you documentate the changes on a Database? Simply by writing it down?
Result:
So i dont got an real answer...i ma still searching for an nice tool. thnak you guys for the hints and your thoughts regarding this question. I want to reward Kenneth Cochran with the Bounty cause he pointed me to ETL. Thank you!
Talend's Open Source ETL supports FireBird. Very cool tool.
http://www.talend.com/download.php?src=DataGovernanceBlog
It sounds like what you're asking for is an ETL(extract, transform, load) tool.
Wikipedia has a list of open source tools that may help with this. I've not used any of them personally.
Well, I used the Pentaho suite for doing ETL using their Kettle tool.
It's quite easy to use and should be more than enough to reach your intent.
And it's open source.
Give a look at it.
I advice you to use a tool like IBExpert or Database Workbench which are the best tools for Firebird.
For migrating Firebird 1.5 to Firebird 2.1 : you just have to make a backup of your database with Firebird 1.5 server and restore your database with Firebird 2.1 server
I've used Excel in the past to document data model changes - each worksheet used the application version in order to sync with our tags in CVS. Every thing was logged in it - columns that were removed as well as minor alterations to datatypes like varchar(10) to varchar(20) etc along with a note describing why the change was made.
Personally, I've only ever scripted things like these as DDL/DML scripts broken into a script that dealt with table creation, constraint dropping, index drops, DML script(s), constraint application, index application, and removing orphaned tables.
If you want a basic ETL tool, that is client based (and cheap at $300), look at Advanced Query Tool. It mainly queries any type of ODBC connection(including Excel files set up that way), but also has some extended features, including moving data. And has a command line interface. http://www.querytool.com/
I've used it instead of Informatica for one-off jobs, but I've also used to extract from Excel to another file for business users, for a few months, scheduled from my desktop.

How to synchronize development and production database

Do you know any applications to synchronize two databases - during development sometimes it's required to add one or two table rows or new table or column.
Usually I write every sql statement in some file and during uploading path I evecute those lines on my production database (earlier backing it up).
I work with mySQL and postreSQL databases.
What is your practise and what applications helps you in that.
You asked for a tool or application answer, but what you really need is a a process answer. The underlying theme here is that you should be versioning your database DDL (and DML, when needed) and providing change scripts to be able to update any version of your database to a higher version.
This set of links provided by Jeff Atwood and written by K. Scott Allen explain in detail what this ought to look like - and they do it better than I can possibly write up here: http://www.codinghorror.com/blog/2008/02/get-your-database-under-version-control.html
For PostgreSQL you could use Another PostgreSQL Diff Tool . It can diff two SQL Dumps very fast (a few seconds on a db with about 300 tables, 50 views and 500 stored procedures). So you can find your changes easily and get a sql diff which you can execute.
From the APGDiff Page:
Another PostgreSQL Diff Tool is simple PostgreSQL diff tool that is useful for schema upgrades. The tool compares two schema dump files and creates output file that is (after some hand-made modifications) suitable for upgrade of old schema.
Have scripts (under source control of course) that you only ever add to the bottom off. That combined with regular restores from your production database to dev you should be golden. If you are strict about it, this works very well.
Otherwise I know lots of people use redgate stuff for SQLServer.
Another vote for RedGate SQL Compare
http://www.red-gate.com/products/SQL_Compare/index.htm
Wouldn't want to live without it!
Edit: Sorry, it seems this is only for SQL Server. Still - if any SQL Server users have the same question I'd definitely recommend this tool.
If you write your SQL statements for your development database (which are, I imagine, series of DDL instructions such as CREATE, ALTER and DROP), why don't you keep track of them by recording them in a table, with a "version" index? You will then be able to:
track your version changes
make a small routine allowing the "automatic" update of your production database by sending the recorded instructions to the database.
I really like the EMS tools.
There tools are available for all popular DB's and you have the same user experience for every type of DB.
One of the tools is the DB Comparer.
TOAD
saved many an ass several times in the past. Why do people run sql with no exit strategy?
the redgate one is good also.
Siebel (CRM, Sales, etc. management product) has a built-in tool to align the production database with the development one (dev2prod).
Otherwise, you've got to stick with manually executed scripts.
Navicat has a structure synchronisation wizard that handles this.
I solve this by using Hibernate. It can detect and autocreate missing tables, columns, etc.
You could add some automation to your current way of doing things by using dbDeploy or a similar script. This will allow you to keep track of your schema changes and to upgrade/rollback your schema as you see fit.
Here's a straight linux bash script I wrote for syncing Magento databases... but you can easily modify it for other uses :)
http://markshust.com/2011/09/08/syncing-magento-instance-production-development
DBV - "Database version control, made easy!" (PHP)