Book a Demo

Author Topic: View (create or replace view as select....)  (Read 3891 times)

renatows

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
View (create or replace view as select....)
« on: October 21, 2004, 01:17:40 pm »
Hi!

I am evaluating EA for my company and i´d like to know if it is possible to represent, generate code or make reverse engineering of a View (database object) inside a Data Model. (Our DBMS is Oracle 9i)

Will it be implemented in a near future?


Thanks.
« Last Edit: October 21, 2004, 01:23:16 pm by renatows »
Renato Warwar

renatows

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: View (create or replace view as select....)
« Reply #1 on: October 26, 2004, 11:21:40 am »
 :-/ Well. I presume it´s not possible.

Thanks anyway.
Renato Warwar

peter

  • Guest
Re: View (create or replace view as select....)
« Reply #2 on: October 28, 2004, 09:01:22 am »
I prefer to represent views as Classes with stereotype <view>

the attributes represent the columns, and I prefer to give them a prefix representing the table.
let's assume you want to select data from the 2 tables DEPT and EMP, a view named "DEpt_EMPS_V" may have the columns:

dept.dname
emp.ename
emp.sal

I also use to add an operation named "select" and show the behavior in the diagramm.
The behavior is the SQL-statement used.

One may additionally add dependencies to the required tables.

you may reverse engineer such <view> classes  from the database by selecting the required informations from your data dictionary and create a dummy class file for each view via spool

the above will look something like:

class DEPT_EMPS_V {
      NUMBER    dept.deptno;
      VARCHAR2 emp.ename;
      NUMBER    emp.sal;

      public static void select() {
          // put your SQL here
      }
}

now you can read this into EA like a normal Java file

works fine ;-)))

hope this will help you
peter