Neo4j schemacrawler plugin

A schemcrawler plugin that generates a neo4j graph from database schema.

License

License

Categories

Categories

Neo4J Data Databases
GroupId

GroupId

io.github.adriens
ArtifactId

ArtifactId

schemacrawler-plugin-neo4j
Last Version

Last Version

1.0
Release Date

Release Date

Type

Type

jar
Description

Description

Neo4j schemacrawler plugin
A schemcrawler plugin that generates a neo4j graph from database schema.
Project URL

Project URL

https://github.com/adriens/schemacrawler-plugin-neo4j
Project Organization

Project Organization

github
Source Code Management

Source Code Management

https://github.com/adriens/schemacrawler-plugin-neo4j

Download schemacrawler-plugin-neo4j

How to add to project

<!-- https://jarcasting.com/artifacts/io.github.adriens/schemacrawler-plugin-neo4j/ -->
<dependency>
    <groupId>io.github.adriens</groupId>
    <artifactId>schemacrawler-plugin-neo4j</artifactId>
    <version>1.0</version>
</dependency>
// https://jarcasting.com/artifacts/io.github.adriens/schemacrawler-plugin-neo4j/
implementation 'io.github.adriens:schemacrawler-plugin-neo4j:1.0'
// https://jarcasting.com/artifacts/io.github.adriens/schemacrawler-plugin-neo4j/
implementation ("io.github.adriens:schemacrawler-plugin-neo4j:1.0")
'io.github.adriens:schemacrawler-plugin-neo4j:jar:1.0'
<dependency org="io.github.adriens" name="schemacrawler-plugin-neo4j" rev="1.0">
  <artifact name="schemacrawler-plugin-neo4j" type="jar" />
</dependency>
@Grapes(
@Grab(group='io.github.adriens', module='schemacrawler-plugin-neo4j', version='1.0')
)
libraryDependencies += "io.github.adriens" % "schemacrawler-plugin-neo4j" % "1.0"
[io.github.adriens/schemacrawler-plugin-neo4j "1.0"]

Dependencies

provided (2)

Group / Artifact Type Version
junit : junit jar 4.11
org.hsqldb : hsqldb jar 2.3.2

Project Modules

There are no modules declared in this project.

Build Status Coverage Status Dependency Status Join the chat at https://gitter.im/adriens/schemacrawler-plugin-neo4j

schemacrawler-plugin-neo4j

Description

This is a schemacrawler plugin that dumps database structure (also called schema) into a neo4j database. Once this done, you can view it in neo4j web console, perform CYPHER queries on it and hence allows you to report your database schema the way you want.

Screenshot

You can see these features as an addon to native schemacrawler features.

Why spending time developing this software ?

Because i find it fun to design a graph database schema to modelize a database schema ;-p

Development status

For now this plugin is its very early stages as i use this project to :

  • Develop schemacrawler plugins
  • Discover neo4j technology and what i can do with it, at my job, but also just to jave fun with drawing nice graphs

Create your graph

Build the plugin

As this is a standard maven projet, just :

  1. Clone this git repo
  2. Jump in the project directory
  3. mvn clean package
  4. Get the jar in the target directory

Below command to build it yourself :

git clone https://github.com/adriens/schemacrawler-plugin-neo4j.git
cd schemacrawler-plugin-neo4j
mvn package
ls -la target/schemacrawler-plugin-neo4j-${version}.jar

Schemacrawler requirements

To create your neo4j database for your database schema, you need :

  • A proper schemacrawler install
  • A database with a schema you want to analyze (and if possible a nice one). I personally did use the sportsdb database sample (http://www.sportsdb.org/sd/samples)
  • Test a schemacrawler graph generation
  • drop the jar you've built in $SCHEMACARWLER_HOME/lib

Neo4j requirements

Follow neo4j install instructions. In the following sections, i will assume you are runnning neo4j on linux as it's easier to document, but things are exactly the same.

Choose an empty and dedicated directory that will contain the generated database : BEWARE AS DURING DATABASE CREATION THIS DIRECTORY WILL BE DELETED BY THE PLUGIN !*

Generate the neo4j graph database

Let's assume your neo4j graph database directory is ~/neo4j.

Run the schemacrawler command

schemacrawler -host=localhost -port=5432 -database=sportsdb -user=sports_adm -password=user_adm -schemas=public -c=neo4j -infolevel=maximum -server=postgresql -loglevel=CONFIG -outputDir=./neo4j -sequences=.*

Start neo4j server

cd ~/apps/neo4j-community-3.2.6 && ./bin/neo4j start

Browse the database

Go to neo4j webapp (http://localhost:7474) and take a look at your graph database schema

(Dirty) dev scripts

Start neo4j server :

cd ~/apps/neo4j-community-3.2.6 && ./bin/neo4j start

Stop neo4j server and make some cleanup :

cd ~/apps/neo4j-community-3.2.6 && ./bin/neo4j stop && rm -rf ~/neo4j

Run schemacrawler

cd ~/tmp sudo cp ~/NetBeansProjects/schemacrawler-plugin-neo4j/target/schemacrawler-plugin-neo4j-1.0-SNAPSHOT.jar /opt/schemacrawler/lib/ && schemacrawler -host=localhost -port=5432 -database=sportsdb -user=sports_adm -password=user_adm -schemas=public -c=neo4j -infolevel=maximum -server=postgresql -loglevel=CONFIG -outputDir=./neo4j

Donate

I'm not asking for money nor any kind of gift, but sometimes, to keep motivation safe while developing free software, it's nice to get some recognization.

So, if you like this software, please :

  1. Simply star the project on github
  2. Ask to connect with me on my my linkedin profile
  3. Write some recommandation
  4. Donate some code through a PR

Acknowledgements

I want to thank my dear girlfriend for her patience when i develop software on the couch while she's watching and for supporting and listening to my enthousiatics thoughts about development, free software, ... and so many other tech things...

I also want to thank Sualeh Fatehi for his very kind help and support on Schemacrawler, and for always answering questions very fast... and of course for his great software with which i can make so many cool things !

Versions

Version
1.0