Generate an E-R Diagram by reverse-engineering a database [closed] - database

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
Note: Originally this question was asked for PostgreSQL, however, the answer applies to almost any database which has a JDBC driver that can detect foreign-key associations.
Querying PostgreSQL data dictionary for foreign-keys and relationship between tables is very straightforward, but how can I use that information to generate a graph of the relations between tables?
Any recommendations about tools that can do this?
EDIT: I know GraphVIZ/DOT can be useful, however, I don't know have any idea regarding how to code an app that would generate the directed graph .DOT file.

Dot is part of the graphviz package, which is a pretty damn cool/useful tool. Of course, you'll need something to generate the dot files for graphviz. I've used SchemaSpy once or twice in the past, and it works pretty well, provided you have the relationships defined in the database.

Microsoft Visio will easily do this.

At least for Oracle I run this query or ask the DBA to run it and send me the results. Results can be copied directly to a text file to be interpreted by Graphviz's tools, resulting in a database diagram.
SELECT '"' || Source.TABLE_NAME || '" -> "'
|| Destiny.TABLE_NAME || '";' AS For_GraphViz
FROM dba_constraints Source
JOIN dba_constraints Destiny
ON Source.owner='my_db_owner' AND Destiny.owner='my_db_owner'
AND Source.CONSTRAINT_TYPE='R'
-- theoretically this validation should be redundant
-- AND Destiny.Constraint_type = 'P'
AND Source.R_CONSTRAINT_NAME = Destiny.CONSTRAINT_NAME
ORDER BY Source.TABLE_NAME, Source.CONSTRAINT_TYPE, Source.CONSTRAINT_NAME
, Source.R_CONSTRAINT_NAME, Source.INDEX_NAME;
A similar query can be created easily for SQL Server, don't know about MySQL, PostgreSQL et al.

Dot is multiplatform and may be useful.

DBVisualizer is also a free and nice alternative.

Related

Open-source options for building database forms [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I would like to move some users off of MS Access and onto an open-source DB like MySQL, Postegres, or even SQLite. Transferring the tables from one DB to another is no problem, but I need to be able to also provide them with a similar UI as the MS Access forms they are using to input the data. Additionally, I would like to be able to give them nice report outputs that reference a table or query.
What open-source alternatives are suggested/available for easily building and storing queries, forms, and reports similar to MS Access, without a ton of programming needed to get them up-and-running quickly?
Obviously I am immediately targeting Windows alternatives, but I don't want to limit suggestions to just one OS.
Open Office - Base seems to be a good option
We were to solve this problem also and considered OO Base not being very good option (note it was like 4 years ago). So we use MS Access as a frontend with ODBC connection to mysql database. It works quite well.

Database modeling tool [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
Do you know a free tool to model databases in uml?
Here is a link to a SourceForge project for UML/ERD modeling of databases:
http://sourceforge.net/projects/dbuml/
Here is software that has a free community edition:
http://www.visual-paradigm.com/
Personally, I've always found that UML poorly handled designing databases. Entity-Relationship Diagrams always seem to better describe a database.
I would check out Open System Architect (OSA) at http://www.codebydesign.com/
In fact, you could use a standard class diagram to model your database. I know it's not the same underlying philosophy but concepts in Extended ER models and in UML CD are quite similar.
True, if you want to explicitly model everying (like pks or unique identifiers) you´ll need to use a UML profile. However, if you are happy with using some conventions (like adding a surrogate pk for each table, deducing automatically the fks from the associations,...), then you can even skip the profile. For an example of this approach read this
UML class diagram is an object approach while data is not.
Omondo has done a try to use a database profile and synchronize the stereotypes with the java persistence annotations. It means that if you create a class diagram you also create java persistence in the code. You just need a good mapper to create your database later.

Where can I "practice" PL/SQL [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 years ago.
Improve this question
I will be given a job offer by an IT company, and was asked to "look at" PL/SQL since I didn't have much experience with databases. I have an extensive background in C++ among other programming languages, so I don't think this will pose too much of a challenge. However, I don't have access to any Oracle database at home, so I was wondering if there is a "toy" database and terminal online where I can practice.
Register yourself an account at APEX ONLINE you have all of the tools for free available online, or simple download Oracle Database 10g Express Edition
I would suggest a higher priority would be to learn the Relational model of data, then SQL.
If you don't start with a solid understanding of the RM, you're more likely to tend to use procedural solutions where a set-based approach is better.
Go and get the Express version of the database server Here
As for learning PL/SQL start
here
You just download sql developer tool by using this link..do practice well.
http://www.oracle.com/technetwork/developer-tools/sql-developer/downloads/index.html?ssSourceSiteId=ocomen
There is another site where you can practice PL/SQL online:
http://www.tutorialspoint.com/oracle_terminal_online.php
Oracle have some VM images with Oracle Linux ready-to-run:
http://www.oracle.com/technetwork/server-storage/linux/downloads/vm-for-hol-1896500.html (64bits VM)
To learn PL/SQL language you just need a text editor like atom or sublime text. You can also install MySQL.

Entity relationship diagram software [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 1 year ago.
Improve this question
I'm looking for a tool that generates DB diagrams.
Free (open source maybe)
Works in Linux (cross-platform maybe)
Supports PostgreSQL/MySQL
diagrams.net is free and on Github (I work on the project). It does work on Linux and has a generic SQL import, under Arrange->Insert->SQL.
You can save either locally, or directly to Google Drive, OneDrive or Dropbox. There's also a Desktop version available.
MySQL Workbench is a good tool for working with its namesake that does ERD modeling. I've used it on both Windows and Ubuntu.
If you are looking for an entity relationship model (not relational model) you have to try Dia http://dia-installer.de/
This software works on linux/windows/mac. And have a branch on git.
The entity relationship model has the purpose of make a model of the problem and let you understand the problem, so in the end you can generate a good relational model to have the most efficient model for you database.
This software is not intended to generate mysql tables directly but it has a plugin to convert Dia diagrams to sql, you can check it out in the same link.
You might want to try PowerArchitect
It's Java based (therefor cross-platform) and I have used it successfully with PostgreSQL
If you do want to spent some money (albeit not much), have a look at DbWrench which offers more features than PowerArchitect
Another open source/cross-platform option is Mogwai ERDesigner. Although there is one thing that I really don't like about it: if requires a connection to a database (to validate/define datatypes) which I find a very limiting requirement.
I use Software Ideas Modeler for entity relationship diagrams. It could meet your requirements - it's not open source but it has a free version, it works in Linux via Mono and it supports MySQL.
If you are looking for some software to auto generate ER diagram from existing database then you will love this tool: http://schemaspy.org/
https://drawerd.com is a online database structure tool.
zenchart is an online ER model generation tool, which can generate ER models through database DDL scripts, support exporting SQL, and the relationship between tables.
https://www.zenchart.net/erd-index.html

Open source Database to ship with my application [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I need open source database that I can ship with my commercial application.
It should not have any installation (i.e., no window service and no setup).
It can be single user database. It should work in Windows environment and used from Java code.
Thanks
I really like SQLite. You can use it with java via SQLiteJDBC. It is very good embedded database. For Java, it might be easier to use Derby though.
You might also want to look at HSQL and H2, which are both open source embedded databases written in Java.
Firebird Embedded - just needs couple of DLL files and you have full database in your hands. Have been using it for years.
How to use it in Java
Look into SQLite. I haven't used it, but I've had apps that claimed to use it, and I couldn't tell the difference.
How about SQLite?
It has good performance, and with one user you don't have to worry about concurrency.
Oracle Berkeley DB: http://www.oracle.com/database/berkeley-db/index.html

Resources