Book a Demo

Author Topic: Database Views - FE only?  (Read 3738 times)

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Database Views - FE only?
« on: September 12, 2006, 10:28:22 pm »
In another post, I mentioned that EA's support for databases had only just started to mature with support for views.

What the fine print:

[797 Release Notes]
Database
 Data modeling support for Sybase Adaptive Server Enterprise
Data modeling support for SQL Server, Oracle and Sybase ASE views
 Improved creation of data model composite foreign keys
 ODBC DDL Import - improved import of MySQL tables with multiple foreign keys
 ODBC DDL Import - improved import of MySQL INT(n) datatypes
 ODBC DDL Import - fixed missing TIMESTAMP datatype importing from Oracle 10g
 ODBC DDL Import - fixed import of check constraints from Sybase ASA version 9
 Generate DDL - removed duplicate table owner for SQL Server

[797 Help file]
What is a View?

Note: Views are currently supported only for SQL Server, Oracle 9i and 10g and Sybase Adaptive Server Enterprise
.


didn't tell you was the Views are only supported for forward engineering (as far as I can tell).

If you reverse engineer a database containing views, they don't appear in the model.


Can this be confirmed please?

TIA,
Paolo

[Edit - this Topic is incorrect - see redux below]
« Last Edit: September 21, 2006, 08:13:37 pm by PaoloFCantoni »
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

thomaskilian

  • Guest
Re: Database Views - FE only?
« Reply #1 on: September 13, 2006, 11:09:48 pm »
Hi Paolo,
I just re'ed a SQL Server. The views create empty classes stererotyped as <<VIEW>> (with a class icon). You can go to View Detail in the properties and there View definition which will give you the SQL text for that view. So it seems to work.

Question: should a view reveive a <<TABLE>> icon as it offers A SIMILAR property page?

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Database Views - FE only?
« Reply #2 on: September 13, 2006, 11:23:28 pm »
Quote
Hi Paolo,
I just re'ed a SQL Server. The views create empty classes stereotyped as <<VIEW>> (with a class icon). You can go to View Detail in the properties and there View definition which will give you the SQL text for that view. So it seems to work.

Question: should a view receive a <<TABLE>> icon as it offers A SIMILAR property page?
Thanx Thomas,

I'm using Oracle 9i and there are no «view» elements in my browser.

Yes, I agree View elements should have the Table icon (perhaps in a different colour)

Can anyone confirm they reverse engineered views from Oracle database?

TIA,
Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Database Views - FE only?
« Reply #3 on: September 14, 2006, 03:27:04 am »
I believe that the original profile definition provided a different icon for a View. Of course I cannot find my copy at this time, so confirmation will have to wait...
No, you can't have it!

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Database Views - FE only?
« Reply #4 on: September 14, 2006, 03:41:29 am »
Quote
I believe that the original profile definition provided a different icon for a View. Of course I cannot find my copy at this time, so confirmation will have to wait...
I'm having another go at RE views.  It is quite possible the last time I had a slip of the mind (or fingers).  However since the DB has over 1000 tables, I had to leave it running over night.

I'll confirm or deny whether I get the views in or not.

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Database Views - FE only?
« Reply #5 on: September 14, 2006, 03:50:41 am »
Let me guess.

Quote
...since the DB has over 1000 tables...


Is this the minimum schema to show the problem? Subtle, very subtle...
No, you can't have it!

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Database Views - FE only?
« Reply #6 on: September 14, 2006, 06:28:23 am »
Quote
Let me guess.


Is this the minimum schema to show the problem? Subtle, very subtle...
No, new job.   No test databases yet... High priority task... the usual...

Besides - this is the one that had the problem.  The test DB may not manifest it...

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Database Views - FE only?
« Reply #7 on: September 21, 2006, 07:57:39 pm »
OK,  here's a bit of redux on this issue.

EA will reverse engineer the views.  It must have been a slip of the mind (or fingers) that caused it not to pick them up the first time.

However, we have two ostensibly similar Oracle 9i databases which we have reverse engineered (in to two separate models).  One Reverse engineers cleanly, the other generates DAO.Recordset [3022] errors on most (but not all the tables).

Is there any pointer to where the problem might be?

Decidedly foolish looking  :-[
Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Database Views - FE only?
« Reply #8 on: September 22, 2006, 01:30:16 am »
Quote
[size=13][SNIP][/size]
However, we have two ostensibly similar Oracle 9i databases which we have reverse engineered (in to two separate models).  One Reverse engineers cleanly, the other generates DAO.Recordset [3022] errors on most (but not all the tables).

Is there any pointer to where the problem might be?
Here's some further information on the problem.  It appears that, in the problematic model, EA has decided that there are more than one relationships between a number of tables (contrary to what Embarcadero ER/Studio, Oracle SQL Developer and TOAD Professional say).  The two relationships involve the same two columns but have different names (for example:  FK_EPV_ENTITYPARAM  - shown by all and EPV_ENTITYPARAM_FK  - shown only by EA).  Since we didn't create these databases, I'm loath to say EA is the problem.  However, it would be handy if a Sparxian (or anyone) could confirm that having two relationships between the same two tables with exactly the same columns would cause the DAO.Recordset [3022] (unique Key failure) errors.

In the meantime we will investigate how this second name came to be associated with the database.

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!