Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - MaXyM

Pages: [1] 2 3
1
Bugs and Issues / [v14beta] Wrong type of table object
« on: March 30, 2018, 12:05:14 am »
When doing RE from existing database, all tables are set to Type: Table, Stereotype: table
But when using synchronization of existing model with existing database (feature: Show Differences [With Options]), new tables are added with Type: Class, Stereotype: table.
The difference is indicated by different icons in Project Browser (see picture)

It causes the interconnected issues:
1. such added object (Type:Class) is not linked with DatabaseBuilder (DatabaseBuilder menu item is not present in contect menu of the element)
2. it's not possible to select Database type for such object. Instead of Database property, it has Language one
3. Further attempts of synchronization will suggest to add the same table again and again and again creating duplicated objects

Moreover, Type: Table cannot be set manually. Types list doesn't contain Table type. This particular behavior is the same as in v13.5


2
Bugs and Issues / [v14beta] Synchronizing model with DB
« on: March 29, 2018, 07:43:57 pm »
In DatabaseBuilder there is option to synchronize current model with database. It's called "ShowDifferences (With options)". It allows reverse engineering existing database mode and apply differences to the model or generate DDL to apply over database.

The feature can be initialized by selecting an option from context menu opened from root element (Postgres in this case) or from sub elements. The later allows to reverse engineering only particular types of objects (see picture below).

But there is another difference. I found, that selecting ShowDifferences from subelements (ie Tables) doesn't report objects existing in database but not existing in the model. While using root element, EA reports new objects allowing to add them to the model.

I can see some inconsistency here. But I'm not sure the behavior has some purpose or it's a glitch?



Found in v14beta. While I can see a lot important improvements comparing to v13, I don't know this issue is new in v14 or was present before.

with regards

3
Bugs and Issues / [v14beta] RE of system triggers (postgresql)
« on: March 28, 2018, 08:17:04 pm »
While testing database Reverse Engineering feature called Show Differences in Database Builder against postgresql database, I noticed that it retrieves logical replication triggers to add them to the model.
While replication triggers are system triggers and shouldn't be considered as model part, those should be excluded.

I narrowed the problem down to the SQL query which retrieves trigger data:

Code: [Select]
Select ns.nspname       As SchemaName,   -- 1
         tab.relname      As TableName,   -- 2
         trg.tgname             As TriggerName, -- 3
         pg_get_triggerdef(trg.oid)       As TriggerDef,  -- 4
         COALESCE(pgdesc.description, '') As Remarks,           -- 5
         trg.*
  From pg_trigger trg
  Inner Join pg_class tab ON trg.tgrelid = tab.oid
  Inner Join pg_namespace ns ON (tab.relnamespace = ns.oid)
  Left Join pg_description pgdesc  ON pgdesc.objoid = trg.oid
  Where trg.tgconstrrelid = 0
  And ns.nspname = 'schema_name'
  And tab.relname = 'table_name'
 
Please note condition: trg.tgconstrrelid - it excludes other system triggers which plays a role of relation constraint watchers. To exclude all system triggers the condition  should use trg.tgisinternal = FALSE. Like this:


Code: [Select]
Select ns.nspname       As SchemaName,   -- 1
         tab.relname      As TableName,   -- 2
         trg.tgname             As TriggerName, -- 3
         pg_get_triggerdef(trg.oid)       As TriggerDef,  -- 4
         COALESCE(pgdesc.description, '') As Remarks,           -- 5
         trg.*
  From pg_trigger trg
  Inner Join pg_class tab ON trg.tgrelid = tab.oid
  Inner Join pg_namespace ns ON (tab.relnamespace = ns.oid)
  Left Join pg_description pgdesc  ON pgdesc.objoid = trg.oid
  Where NOT trg.tgisinternal
  And ns.nspname = 'schema_name'
  And tab.relname = 'table_name'

Now, I'm going to report the issue official way. But I want to ask, is it possible to improve this SQL query by my self? Or is it hardcoded and I have to wait for fix (or write the script which will remove all unneeded triggers)

with regards

4
General Board / Re: EA Sucks?
« on: March 22, 2018, 08:41:46 pm »
- Network: The software is pretty chatty with the database. When opening a large diagram it might execute a few hundreds of very small queries on the database. If you have a limited network bandwidth that might be the bottleneck. I've heard complaint from people when using their corporate Wifi when the speed was no issue at all when using a wired network.

Exactly this. EA if for some reason (or for sake of simplicity of internals) not optimized communication wise. It's not about bandwith about communication medium you use between EA and its storage. EA generates huge amount of requestests, hitting DB even for basic operations like selecting an element on diagram. In such cases indeed Wifi is being penalized a lot.

IMO Sparx should take more care about this.

5
Bugs and Issues / Re: Slow import of large codebase
« on: March 22, 2018, 03:39:09 am »
What type of engine did you use for mysql? If MyISAM (which is non-logged/non-transactional) then it would explain the boost comparing to MS SQL. If InnoDB then it would be real benchmark.

Speaking about databases I can suggest to try postgresql :)

6
General Board / EA v14 backward compatibility
« on: March 21, 2018, 11:33:20 pm »
Hello all.
I cannot find information about backward compatibility of EA14 (beta).
Can I use it with database-based repository in parallel with v13.5? Will changes made with v14 be properly interpreted by v13.5?
Maybe there is a document describing compatibility issues (if any) - please share it.

thank you in advance

7
I guess you better cast both fields to string to compare them instead of trying to cast it to a number.

Casting to empty string is in general wrong idea (even if this time it might work)
It's better to use proper syntax for comparing values incl. NULLs. For example
Code: [Select]
val1 IS DISTINCT FROM val2
or
val1 IS NOT DISTINCT FROM val2
It's worth to remember that in most cases/SQL dialects any operation with NULL (including boolean evaluation) gives NULL. And then NULL is never casted to boolean. So even NULL = NULL condition is not TRUE (but it's not FALSE too)

In fact this is great subject to rise during recruitment
I love that ;)


8
Automation Interface, Add-Ins and Tools / Re: DiagramLink and Connectors
« on: December 06, 2017, 07:31:02 pm »
Just out of curiosity. If I set color using link.LineColor, how can user affect the color using GUI?

BTW I ended up with setting TaggedValue instead of color, and using Legend feature. It seems to be more flexible solution.

9
Automation Interface, Add-Ins and Tools / Re: DiagramLink and Connectors
« on: December 05, 2017, 07:22:48 pm »
@querty at the beginning I was looking for way how to change connector color in relation to connector labels (Actually how to find related connector having diagramlink). The rest are just findings I wanted to share with community (because I've found no information about it)

@Simon thanx for answer. I supposed this is multi-level. But I didn't know there is possibility to set a color of connector (actually diagramlink), which cannot be overriden by diagram specific option available in GUI (Appearance option). Also I found no option in GUI to change colour of the diagramlink. Appearance option refers to connector.color.

10
Automation Interface, Add-Ins and Tools / Re: DiagramLink and Connectors
« on: December 05, 2017, 10:08:21 am »
Bravo... your conclusion is perfect. I hope the name of this subforum didn't help you much ;)

Actually I figured it out on my own by analysing Geert's code from: https://community.sparxsystems.com/community-resources/906-set-all-line-styles-in-an-enterprise-architect-diagram-automatically

Code: [Select]
connector = Repository.GetConnectorByID(link.ConnectorID); // where link comes from diagram.DiagramLinks
if (selectedConnector.ClientEnd.Role.match('^FK_') || selectedConnector.SupplierEnd.Role.match('^FK_'))
{
    connector.Color = 255; // for red
    connector.Update();
}

What is really interesting, that there are 2 methods of how to set color. 
The first one I tries was
Code: [Select]
link.LineColour. But this way overwrites possibility to change this colour by using Appearance option from context menu over particular connector. In this case the color chooser shows the last color set by this tool (not current one show on diagram). Color tool just doesn't work until we set link.LineColour to -1. Then Appearance takes control over line color again.



11
Automation Interface, Add-Ins and Tools / DiagramLink and Connectors
« on: December 05, 2017, 01:48:31 am »
Hello guys
I spent half a day searching for information but at the end I have to ask for it.
I need to change color of DiagramLink in relation to labels. But:

1. don't know how to get labels directly from DiagramLink
2. don't know how to find Connector which is represented by DiagramLink

BTW I found funny thing trying to set LineColor (attribute of DiagramLink). It seems to be BGR instead of RGB. So 255 is red (hex 00 00 FF), respectively blue is 16711680 (hex FF 00 00).

with regards


12
BTW what's the reason to have multiple items representing the same element on a diagram?

13
As db programmer I can suggest to stay away from UML modeling tools for database modelling as long as you can.
Why? Because those tools are not dedicated this task, therefore are very limited regarding database-wise features. Instead, they implement db support deriving most features from class diagrams and adding some minimal coverage needed by db.

Specialized tools do their best to cover features and requirements for various databases including specific differences between dbms' (like index required for FK in case of mysql, which is not mandatory in other dbms), making modelling just easier and faster.

Simple example: In each db modelling tool I know, foreign key is created just by dragging and dropping primary key onto another table. Yet few years ago, in EA you had to manually: create column for FK, setup the same datatype, create relationship between 2 columns, name it, create index if needed by particular DBMS etc.
Ussually UML tools are also late regarding features released with recent database versions.

It's true, that some features finally met UML tools. But are still light years behind soft like CaseStudio (almost 20 years ago), ToadDataModeler, PowerDesigner and many more. yeah... and limits db reverse engineering to more expensive licenses... LOL.
but even with all those improvements you are going to struggle with tools like EA. Below simple example from EA13.5. Reported already, receiving nothing but note they will look at this later but it's not considered as bug.
Try to reverse engineer tables from more schemas. You are end up with all tables put in single package called tables. Unfortunately schema names will be not shown (actually are stored in tag value). So basically you lost visual information about schema - you can see all tables from various schamas mixed together.  OK... I bet you will attempt move tables into subpackages named by schemas and try to import schema by schema. But then EA is not able to reverse engineer FKs between tables which are located in other packages than mentioned Tables package. Moreover, RE tool shows the missing FKs and offers synchronize action. But cannot do that. And it is not A BUG by Sparx definition.

But of course there are cases when going for UML tool is justified. One of them is a need of mapping other part of architecture (components or even business needs/requirements) onto database objects. If you don't need that, if you want just to model database without taking care about the rest of system look for dedicated software. Otherwise you will end up struggling with operations/features which you expecting to be available but in fact there are not over here.

14
General Board / Re: Communication Path not traceable
« on: October 03, 2017, 02:44:46 am »
Hi all
Have to reply to myself.
I filed bug report and get following answer:

Quote
Unfortunately this is currently an expected limitation of the relationship matrix.
I will submit a feature request on your behalf so that the ability to include Communication Paths (and ideally all connector types) is considered for implementation in a future release.

BTW it seems to be default answer for each reported bug.

I performed some searches and found it has been reported on this forum multiple times. And they (if Simon bellows to "them") had expressed a desire of improvement.
http://www.sparxsystems.com/forums/smf/index.php/topic,24167.msg196420.html#msg196420
But it was in 2012....

15
Bugs and Issues / Re: Values of attributes always truncated
« on: September 27, 2017, 12:25:08 am »
Hello all.
Just FYI: Sparx has answered that it is not a bug. However they have submitted a feature request for this.
Don't get why the issue is not considered as bug, since the element presentation is not aligned with compartment settings. At least I have some hope getting it in future.

Pages: [1] 2 3