GithubHelp home page GithubHelp logo

kkrisz1 / staruml-reverse-db Goto Github PK

View Code? Open in Web Editor NEW
51.0 7.0 11.0 3.9 MB

Extension for StarUML support to generate ER Data Model from database schema

Home Page: https://kkrisz1.github.io/staruml-reverse-db/

License: GNU General Public License v3.0

JavaScript 94.97% TSQL 5.03%
database postgresql erd mssql mysql

staruml-reverse-db's Introduction

ERD Generation Extension for StarUML v5

Build Status - GithubActions CodeScan - GithubActions Coverage Status Known Vulnerabilities

Example for generating ER Data Model

generate-er-diagram

Example for drawing ER Diagram

draw-er-diagram

This extension for StarUML support to generate ER Data Model from database schema.

Note This extension does not provide perfect reverse engineering. If you need a complete reverse engineering feature, please check other professional reverse engineering tools.

Supported databases

ER Data Model Generation

MS SQL

  1. Click the menu (Tools > Database > MS SQL Server > Configure Server...)
  2. Configure Database Connection Preferences
  3. Choose one of the following to generate ER Data Model
    • Click the menu (Tools > Database > MS SQL Server > Generate ER Data Model...) or
    • Press the shortcut key(Alt + Shift + M)
  4. Model will be created in the Project (If there is no open project, it will be created)

PostgreSQL

  1. Click the menu (Tools > Database > PostgreSQL Server > Configure Server...)
  2. Configure Database Connection Preferences
  3. Choose one of the following to generate ER Data Model
    • Click the menu (Tools > Database > PostgreSQL Server > Generate ER Data Model...) or
    • Press the shortcut key(Alt + Shift + L)
  4. Model will be created in the Project (If there is no open project, it will be created)

MySQL

  1. Click the menu (Tools > Database > MySQL Server > Configure Server...)
  2. Configure Database Connection Preferences
  3. Choose one of the following to generate ER Data Model
    • Click the menu (Tools > Database > MySQL Server > Generate ER Data Model...) or
    • Press the shortcut key(Alt + Shift + P)
  4. Model will be created in the Project (If there is no open project, it will be created)

Belows are the rules to convert from database schema to ER Data Model elements.

Table

  • Converted to type.ERDEntity
  • Set the below properties:
    • name: string
    • columns: Array<type.ERDColumn>

Column

  • Converted to type.ERDColumn
  • Set the below properties:
    • name: string
    • primaryKey: boolean
    • nullable: boolean
    • foreignKey: boolean
    • type: string
    • length: string
    • unique: boolean
    • referenceTo: type.ERDColumn

Relationship

  • Converted to type.ERDRelationship
  • Set the below properties:
    • foreignKeyName: string
    • identifying: boolean
    • end1: type.ERDRelationshipEnd
    • end2: type.ERDRelationshipEnd

RelationshipEnd

  • Converted to type.ERDRelationshipEnd
  • Set the below properties:
    • name: string
    • identifying: boolean
    • cardinality: string
    • reference: type.ERDColumn

staruml-reverse-db's People

Contributors

bhayes-fh avatar dependabot[bot] avatar kkrisz1 avatar stephen-bunn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

staruml-reverse-db's Issues

ER diagram is empty

I ran this module and saw all tables being traversed in my database and a model was created on StarUML containing all my tables.

However, the resulting diagram was empty.

Am I expected to drag and drop all the tables to create this diagram, or should this module create the diagram for me, including auto-routing of table interconnects ?

StarUML_ReverseDbDebugConsole.txt

Configure Server exception

Hi!

Click the menu (Tools > Database > MySQL Server > Configure Server...)

There was no configuration window appearing afterwards, nor any other changes.

How should I resolve that?

Thank you!

image

MS SQL Server encrypt

Most Azure Databases hosted instances requires that SSL be enabled.
Currently I don't see any options to enable SSL for the MS SQL Server connection.

image

Kind regards. AJW

No ERD is generated when connecting to a Postgres database

I'm trying to generate an ERD of a postgres database. I am running a vagrant box (homestead) with a postgres database, that has some tables in it. When I generate the data model, two messages appear: ER Data Model generation has been started. Please wait... and ER Data Model generation has been finished. In the model explorer an item was added with a database icon, but no tables or ERD schema was generated.

I'm running StarUML 2.8.1 on Windows and version 0.2.1 of this extension.

Postgres SSL option

Most postgres hosted instances requires that SSL be enabled.
Currently I don't see any options to enable SSL for the Postgres connection.

could you please generate base informations when there is no foreign relations between tables?

hi,this plugin is great & excellent,i appreciate it 
when i connect to MySQL 5.7, in the settings page, there is a schema and a database,these confuses me . 
i think it would be better if it had a 'test connection button ';
and when clicking the ' generate ER data model ' , sometimes it just say ' there is an error', i think it would be better if it showed the actual error.  then i can google it ,or change the exact wrong place 
what i need most    is   as the title, generate something even if there is no foreign relations,

or could you please provide a radio button ,so that it will not bother the person who don't need this function.
thank you so much

Ignored port

The port set for MS SQL server configuration is ignored and it tries to connect 1433 rendering it unusable for any db not exposed on default port.

Unable to generate mysql data structure

Hello, the author, thank you very much for providing this plug-in. I have encountered a problem in my use. I cannot generate the data structure to mysql database, but I can get the existing structure from the database
image

staruml config set:
image

def.test ERD was generated using Alt +shift+p, but could not be synchronized to mysql data

Using Alt +shift+p again generates def.test ERD
image

What method does the building advocate have

StarUML - Issue upgrading to latest version

I just did try updating your package listed in StarUML 3.1.0 on my Mac OS X (10.14.6). Every time I update and restart StarUML I see that this package is available for update. I did try updating a few times. I am attaching the screenshots. Let me know if you need any information about my setup.

StarUML 2019-07-19 17-47-48

StarUML 2019-07-19 17-46-27

Does not support POSTGRESQL

This really should support PostgreSQL.

Supporting other DB's is a worthy goal and would turn StarUML into a competitive option to much more expensive tools.

What would it take to have you add support for PostgresSQL?

Sync or replace existing data model

I created a data model with StarUML and exported it with this plugin. (https://github.com/niklauslee/staruml-ddl)
After that I changed the database (added columns, changed columns to nullable, etc.).
Is it possible to sync the changes back to the StarUML data model and maybe even to the ER Diagram without dragging every entity into the diagram and losing the diagram design?
I tried to rename the data model like the imported data model (ref.dbname) to force the plugin to replace it, but it just creates a data model with the same name.

trouble installing extension

Hello,
My client and I are very interested in using the staruml-reverse-db extension but the extension keeps showing "Extension error" in Extension Manager and the database menu items to configure server etc are not functioning. I did also try installing the extension manually by copying the folder to the extensions folder but am getting the same outcome. I'm using a freshly downloaded copy of staruml 3.0.1 (unregistered). Do you have any suggestions?
Thanks!

Can't generate ER Diagram

Try to generate ER Diagram from MS SQL Server 2012 with StarUML 3.0.0. It's not work, I copied the SQL from MsSqlAnalyzer.js and execute it on SSMS, it is successfully return the tables, columns and relations. That means my server configuration is well fuction. WHAT I MISSED?

Additional columns created when same named tables exist in other schemas for Postgresql

I noticed that after running "Generate ER Data Model" for Postgresql, there were additional columns created in tables. It turned out that the additional columns were from tables in other schemas in the database. After looking at the SQL in postgresql/PostgreSqlAnalyzer.js, I see a bug. I have attached a patch file for you: it adds an "AND" to the end of line 36 and inserts a new line for line 37, which adds "cls.relnamespace::regnamespace::text = col.table_schema". I tested the query against my database (which has duplicate table names in separate schemas) and the query worked.

Thank you,
Ben

patch.zip

Connect to MSSQL database with domain login

Discussed in #125

Originally posted by AbhijeetDixit July 4, 2023
I have an MSSQL database which I am logging in to using the windows domain authentication. The database can be accessed using MS SQL Server Management Studio and other applications.
When I am trying to connect to the same with staruml-reverse-db, it is repeatedly saying login failed for the user. I verified and used the same credentials and server name as MSSQL Mgmt studio. Is there a way to diagnose what actually is causing the issue? Is there something I need to be mindful of to prevent such a failure?
Let me know if further information is required.

Entity to Model with comments

My team uses Chinese to communicate,we hope generate model can provide comments,thank you.
Sorry,my english is not good.But I hope you can give help.

ERD Diagram is not Generated

Hi, ERD generation for MYSQL server 8.0 is not working, it just add a diagram to the Model but always is empty. There are no error and it just show only this two messages,

-ER Data Model generation has been started. Please wait...
-ER Data Model generation has been finished.

Could you give me some help?

Thankyou

Uncaught TypeError: Cannot read properties of undefined (reading 'hasPrecision')

Hi , i am using starUML to design E-R Model,
and installed the extension "Entity Relationship DataModel Generation"

my database is MS-SQL and version between 2016 and 2019.
i am getting some problem when i want to import schema..

the debug console message show :

Uncaught TypeError: Cannot read properties of undefined (reading 'hasPrecision')
at readPrecision (rootPathAppData\Roaming\StarUML\extensions\user\kkrisz1.staruml-reverse-db\node_modules\tedious-connection-pool\node_modules\tedious\lib\metadata-parser.js:45)
at rootPathAppData\Roaming\StarUML\extensions\user\kkrisz1.staruml-reverse-db\node_modules\tedious-connection-pool\node_modules\tedious\lib\value-parser.js:456
at rootPathAppData\Roaming\StarUML\extensions\user\kkrisz1.staruml-reverse-db\node_modules\tedious-connection-pool\node_modules\tedious\lib\token\stream-parser.js:162
at Parser.awaitData (rootPathAppData\Roaming\StarUML\extensions\user\kkrisz1.staruml-reverse-db\node_modules\tedious-connection-pool\node_modules\tedious\lib\token\stream-parser.js:136)
at Parser.readUInt8 (rootPathAppData\Roaming\StarUML\extensions\user\kkrisz1.staruml-reverse-db\node_modules\tedious-connection-pool\node_modules\tedious\lib\token\stream-parser.js:159)
at rootPathAppData\Roaming\StarUML\extensions\user\kkrisz1.staruml-reverse-db\node_modules\tedious-connection-pool\node_modules\tedious\lib\value-parser.js:453
at rootPathAppData\Roaming\StarUML\extensions\user\kkrisz1.staruml-reverse-db\node_modules\tedious-connection-pool\node_modules\tedious\lib\token\stream-parser.js:162
at Parser.awaitData (rootPathAppData\Roaming\StarUML\extensions\user\kkrisz1.staruml-reverse-db\node_modules\tedious-connection-pool\node_modules\tedious\lib\token\stream-parser.js:136)
at Parser.readUInt8 (rootPathAppData\Roaming\StarUML\extensions\user\kkrisz1.staruml-reverse-db\node_modules\tedious-connection-pool\node_modules\tedious\lib\token\stream-parser.js:159)
at rootPathAppData\Roaming\StarUML\extensions\user\kkrisz1.staruml-reverse-db\node_modules\tedious-connection-pool\node_modules\tedious\lib\value-parser.js:452

so how can i to fix the problem?

thanks

Installation error

My Configurations

  • StarUML version: 5.1.0
  • OS: Windows 10 Enterprise, OS build: 19044.2486, Version: 21H2

image

debian extension install fails

Trying to install the staruml-reverse-db extension on my debian box fails, giving me an "Unknown internal error". Am I missing something?

StarUML V3.1.0
debian stretch 9.9

java -version
openjdk version "1.8.0_212"
OpenJDK Runtime Environment (build 1.8.0_212-8u212-b01-1~deb9u1-b01)
OpenJDK 64-Bit Server VM (build 25.212-b01, mixed mode)

javac -version
javac 1.8.0_212

Hope this helps.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.