Database export/import plugin

Started by Hervé, April 15, 2016, 14:37:31 PM

Previous topic - Next topic

Hervé


Phil Beauvoir

Quote from: Hervé on October 26, 2016, 11:13:12 AM
Thanks a lot Phil :)

Done. http://www.archimatetool.com/resources

BTW - The Archi website needs updating and a makeover. I will do this in the coming weeks, and I want to put a greater emphasis on the developer community, the Archi roadmap and other things.

Phil
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

brain_work

I got this error when I use the Database export/import plugin with Archi 4 Beta 3 on Windows after putting the correct org.archicontribs.database_v0.12(archi4).jar in the plugins folder and starting Archi 4:

!ENTRY org.archicontribs.database 4 0 2016-11-16 06:12:38.531
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: Could not resolve module: org.archicontribs.database [41]
  Unresolved requirement: Require-Bundle: org.eclipse.core.resources

   at org.eclipse.osgi.container.Module.start(Module.java:444)
   at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1536)
   at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
   at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
   at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)

The java -version info:

java version "1.8.0_101"
Java(TM) SE Runtime Environment (build 1.8.0_101-b13)
Java HotSpot(TM) Client VM (build 25.101-b13, mixed mode, sharing)

Hervé

Hi,

Some people are effectively affected by this message even if I failed to reproduce it when I did a fresh install on one laptop at work. Nevertheless, I recompiled the JAR file using different parameters and it seemed that it solved the error.

Please try again with release 0.12b that I just deployed to GitHub ...

Best regards
Hervé

brain_work

Thanks Hervé,

I don't see any errors anymore with the new jar and I can see the database plugin dialogs in Archi  :)

Unfortunately I can not test the plugin because I don't have access to a database at this moment (only Microsoft Access 2010). So I will see if I can do something with SQLite...

Regards,
Peter

brain_work

Hello Hervé,

The export of a simple model worked with Archi 4 Beta 3 to a SQLite db. Later today I will try the import.

Regards,
Peter

Hervé

Thanks Peter.

At the moment, the datamodel creation is manual (running a SQL script) but I'm currently working to create the tables directly from the plugin (and of course update the datamodel from a plugin version to another).

Please do not hesitate to drop me a line should you have any other question or comment.

Best regards
Hervé

brain_work

Hi Hervé,

Would it be possible to add Microsoft SQL on Azure, see https://docs.microsoft.com/en-us/azure/sql-database/sql-database-get-started) as an option to the databas plugin?

With regards,
Peter Bakker

Hervé

Hi Peter,

I'll have a look and should be able to provide you with something quite quickly.

I'll check the datamodel against SQL Server Express Edition then, connecting to an Azure database should be quite straight forward.

Best regards
Hervé

brain_work

Hi Hervé,

Thanks for the quick response :-)

Regards,
Peter

Hervé

Hi Peter,

The version 0.13.0 has been released on GitHub : https://github.com/archi-contribs/database-plugin/tree/master/database%20plugin%20for%20Archi%204

The following updates have been made since version 0.12b:

  • Add Microsoft SQL support
  • Correct a bug causing release note not being saved in the database
  • Fix folder count error when exporting to the database in "shared" mode

I also added the SQL script to create the required tables in the database : create tables (Microsoft SQL Server).sql

I tested against the Linux version of SQL Server (Microsoft calls it vNext) as it is the closest version of what you may have in Azure, but I use a local connection so I'm not sure about Azure parameters (do you need a cert to authenticate for instance ?) so I may need to adapt few things depending on your tests.

As well, I supposed that you do not used named instances (as it was easier for me), but if I guessed wrong, please tell me and I will add an "instance" field.

Best regards
Hervé

brain_work

Hi Hervé,

Thanks. Azure is new for me too :-)  I just created a SQL Database on Azure and because I'm also not a database/SQL expert it might take some time for me to test your new version. But I'll do my best :-)

Regards,
Peter

brain_work

Hi Hervé,

The connectivity with the Azure SQL database works :) And I didn't need to do anything special in the Archi preferences or on my laptop itself. So for your plugin it works the same as a local connection.

I tested export and import with an Archi model with some 1000 objects. Export took about 2 minutes and import about 1 minute. But that will of course vary based on the quality of the internet connection.

Regards,
Peter

Glem

Hi Hervé,
on the v0.13 db plugin with MySQL:
- delete version is ok
- in standalone mode,
            1/ export a model with directory is working fine
            2/ import a model with directory too.
- in shared mode
            3/ import model with directory working fine
            4/ export model with directory working !!!
            5/ import model: An error occured while importing the model from the database.
                The model imported into Archi might be incomplete, please check below :
                  Exception : importConnections() : cannot find relationship 220da1bf
             all views are lost.

You are very near !! Congratulation.

Feel free to get in touch with me for any detail.

Best regards,
Gilles


Hervé

Thanks very much guys for your tests.

@ Gilles : I will try to reproduce the relationship issue and if I fail, I will contact you to help me investigate.

@ Peter : until now, I've written my SQL requests for local database, so I'm doing a lot of unitary selects or inserts and am counting on the cache to improve performance. I will rework my procedures to reduce them. But this will consume more memory and I need to pay attention to that (we still use 32bit operating systems at work).

Best regards
Hervé