Loading ...
Sorry, an error occurred while loading the content.
 

Relational Databases

Expand Messages
  • Peter Gummer
    What is the recommended way for an EiffelStudio application to communicate with a relational database (e.g. Oracle or Microsoft SQL Server)? I presume that,
    Message 1 of 13 , Jul 2, 2004
      What is the recommended way for an EiffelStudio application to
      communicate with a relational database (e.g. Oracle or Microsoft SQL
      Server)?

      I presume that, for a .NET app, ADO.NET would be the best way to go.
      But what about a Vision2 app?

      Should classes that are intended to be persisted to relational database
      tables inherit from STORABLE? If so, then what do you do?

      Many IDEs these days make it obvious how to do this, but with
      EiffelStudio it seems to be a bit of a secret :-)

      Regards,
      Peter Gummer
    • Emmanuel Stapf [ES]
      ... That s one way to go. If you want multiplatform, you can use EiffelStore. ... I m not sure what you mean. Vision2 is our multiplatform graphical library
      Message 2 of 13 , Jul 3, 2004
        > What is the recommended way for an EiffelStudio application
        > to communicate with a relational database (e.g. Oracle or
        > Microsoft SQL Server)?
        >
        > I presume that, for a .NET app, ADO.NET would be the best way to go.

        That's one way to go. If you want multiplatform, you can use EiffelStore.

        > But what about a Vision2 app?

        I'm not sure what you mean. Vision2 is our multiplatform graphical library and can
        be used on Windows, .NET an d UNIX variants.

        > Should classes that are intended to be persisted to
        > relational database tables inherit from STORABLE? If so, then
        > what do you do?

        No, the name of the STORABLE class is not really a good name. This class provides
        you with an encapsulation of what IO_MEDIUM provides through its `xxx_store' and
        `retrieved' features. Moreover STORABLE has nothing to do with databases, it is
        more a serialization mechanism.

        Finally, all objects can be persisted in either a database or using our storable
        mechanism.

        Regards,
        Manu
      • Paul G. Crismer
        ... SQL ... .NET only : use ADO.NET Multiplatform (what you seem to call Vision2) : use EiffelStore or the open-source ECLI (see http://safe.sf.net) ... The
        Message 3 of 13 , Jul 3, 2004
          > What is the recommended way for an EiffelStudio application to
          > communicate with a relational database (e.g. Oracle or Microsoft
          SQL
          > Server)?

          .NET only : use ADO.NET
          Multiplatform (what you seem to call Vision2) : use EiffelStore or
          the open-source ECLI (see http://safe.sf.net)

          > Many IDEs these days make it obvious how to do this, but with
          > EiffelStudio it seems to be a bit of a secret :-)

          The focus of EiffelStudio is on Eiffel development : coding,
          compiling, browsing and documenting code, forward and reverse
          engineering, metrics. It is not integrated with tools that help
          using libraries. EiffelBuild is an external tool that help using
          Vision2. For the moment there is no tool automating the usage of
          libraries.

          There is no secret : just browse the EiffelStudio main directory and
          look into 'examples', or select the Help->Contents menu entry and
          then look into Libraries/EiffelStore.

          Making objects persist on relational databases seem straightforward
          but quickly show some limitations. See papers from Scott Ambler on
          OO persistence with relational databases, see also the "Eiffel
          Persistent Object Management library" (EPOM)
          (http://sourceforge.net/projects/safe) where a framework with
          EiffelStore and ECLI implementations is described.

          Hope this helps,

          Best regards,

          Paul G. Crismer
        • Peter Gummer
          ... I was under the false impression (given by the choices presented when starting a new project) that you could have either a Vision2 app or a NET app. I
          Message 4 of 13 , Jul 3, 2004
            On 04/07/2004, at 12:42 AM, Emmanuel Stapf [ES] wrote:
            > > But what about a Vision2 app?
            >
            > I'm not sure what you mean. Vision2 is our multiplatform graphical
            > library and can
            > be used on Windows, .NET an d UNIX variants.

            I was under the false impression (given by the choices presented when
            starting a new project) that you could have either a Vision2 app or a
            NET app. I didn't realise that Vision2 apps could target .NET. This is
            good to know.

            So sorry, this part of my question was irrelevant.

            Thanks, Manu,
            Peter Gummer
          • Peter Gummer
            ... It helps enormously. Thank you, Paul! Looking at $ISE_EIFFEL/library/store/dbms/rdbms, there isn t a directory for Microsoft SQL Server. Will sybase.e
            Message 5 of 13 , Jul 4, 2004
              On 04/07/2004, at 1:05 AM, Paul G. Crismer wrote:
              > There is no secret : just browse the EiffelStudio main directory and
              > look into 'examples', or select the Help->Contents menu entry and
              > then look into Libraries/EiffelStore.
              >
              > Making objects persist on relational databases seem straightforward
              > but quickly show some limitations.  See papers from Scott Ambler on
              > OO persistence with relational databases, see also the "Eiffel
              > Persistent Object Management library" (EPOM)
              > (http://sourceforge.net/projects/safe) where a framework with
              > EiffelStore and ECLI implementations is described.
              >
              > Hope this helps,
              >
              > Best regards,
              >
              > Paul G. Crismer

              It helps enormously. Thank you, Paul!

              Looking at $ISE_EIFFEL/library/store/dbms/rdbms, there isn't a
              directory for Microsoft SQL Server. Will sybase.e work, given that both
              use a similar SQL dialect (Transact SQL)?

              I'm familiar with Ambler's papers and have referred to them while
              developing a persistence layer in Delphi five years ago. Having been
              through the process of developing a persistence framework twice in the
              past -- in Delphi and in C# -- I know how much work is involved. I
              haven't looked at your other references yet, but thank you: that is
              exactly what I need.

              By the way, what I'm trying to do is to decide on development tools for
              a new medium-sized project. The final application will run on Windows,
              storing data in Oracle or MS SQL Server (or possibly other DBMS
              systems, mandated by our customers), and connecting to various
              Microsoft Office applications (so I guess EiffelCOM would help). I've
              just joined a small group of Delphi developers, so of course they want
              me to use Delphi. I've started out with Delphi.Net, which has a
              model-driven architecture framework called ECO ("Enterprise Core
              Object"). At first it looked very good, but after a few weeks I've come
              to the conclusion that it's immature and not yet usable. Too many bugs.
              So I'm now looking for alternatives. One alternative is to write yet
              another persistence framework. As a long-time fan of Eiffel and DbC,
              though, I'm thinking that I might be able to convince them that we
              should do it in Eiffel. But first I need to know that the move from
              Delphi to Eiffel will work.

              Thanks again for the help, Paul and Manu.

              Regards,
              Peter Gummer
            • Paul G. Crismer
              Hello Peter, ... both ... EiffelStore defines an abstract interface on RDBMS capabilities and it uses the bridge pattern to map this interface to particular
              Message 6 of 13 , Jul 4, 2004
                Hello Peter,

                > Looking at $ISE_EIFFEL/library/store/dbms/rdbms, there isn't a
                > directory for Microsoft SQL Server. Will sybase.e work, given that
                both
                > use a similar SQL dialect (Transact SQL)?

                EiffelStore defines an abstract interface on RDBMS capabilities and
                it uses the bridge pattern to map this interface to particular
                implementations. Sybase's one uses the DB-Lib low-level library.
                You are responsible of issuing SQL statements and of using the good
                dialect.
                If DB-Lib is compatible with the low-level library of MS SQL Server,
                then this handle can help you.

                > By the way, what I'm trying to do is to decide on development tools
                for
                > a new medium-sized project. The final application will run on
                Windows,
                > storing data in Oracle or MS SQL Server (or possibly other DBMS
                > systems, mandated by our customers), and connecting to various
                > Microsoft Office applications (so I guess EiffelCOM would help).

                EiffelStore has a good OO design. Using the brigde pattern
                allows "plugging" new implementations. Abstracting things allow
                storing in other DBMS's like Matisse, which is an OODBMS, not a RDBMS.
                I've used EiffelStore for about 5 years in a production environment
                with satisfaction.

                However EiffelStore maybe does not go far enough if you need advanced
                features of RDMBSes.
                That is why a colleague of mine and myself have developed ECLI which
                is an Eiffel/ODBC library. It differs from EiffelStore because it has
                been designed to use advanced features of RDBMSes : prepared
                statements, tight binding with SQL datatypes; a tool, the query
                assistant, wraps SQL statements into classes and skeletons ready for
                the EPOM library.

                Both EiffelStore and ECLI/EPOM have their strenghts and weaknesses
                (OO, abstraction, vendor support vs. RDBMS-minded, open-source).
                You just have to figure out yourself what best fits your needs.

                > But first I need to know that the move from
                > Delphi to Eiffel will work.

                The move is worth if the entire team is committed to building quality
                components. Our experience with an iterative process shows that the
                first iteration may involve more work with Eiffel and show less
                visible results. However, the investment of the first iteration
                gives high interest rates for the next iterations. Nearly no tiring
                debugging work, just assembling things.
                You certainly won't find Eiffel tools with bells and whistles,
                windows and curtains like with other tool$ and languages.
                Such a move is not just a question of language or tool, it's a
                question of software process.

                Best regards,

                Paul G. Crismer
              • Peter Gummer
                I ve just downloaded the free edition of EiffelStudio to a computer running Mac OS X 10.3.4 (the latest version). The installation completed with no error
                Message 7 of 13 , Jul 6, 2004
                  I've just downloaded the free edition of EiffelStudio to a computer
                  running Mac OS X 10.3.4 (the latest version).

                  The installation completed with no error messages.

                  I started following the Guided Tour but got error VD42 on opening the
                  Ace.unix.ace file with the compile option selected
                  (file:///Developer/Applications/Eiffel54/docs//general/guided_tour/
                  studio/index-05.html).

                  Following the advice at
                  http://archive.eiffel.com/doc/problems/precompiled_missing.html, I
                  found that the subdirectories of
                  /Developer/Applications/Eiffel54/precomp/spec/macosx contain nothing
                  but the Ace.ace file.

                  I attempted to precompile base and vision2 by running
                  /Developer/Applications/Eiffel54/make_install, but got errors
                  suggesting that I don't have permission to write to those directories
                  (which isn't surprising).

                  I assume that the installation either didn't try to precompile the base
                  and vision2 libraries, or else had the same error during precompilation
                  but didn't report it.

                  I then tried sudo /Developer/Applications/Eiffel54/make_install, which
                  compiled successfully, except that, during the vision2 compilation this
                  error appeared before each gcc call:
                  Makefile.SH: line 1: gtk-config: command not found

                  The vision2 build completed with the errors shown at the end of this
                  message. These look like they may be caused by the error above. I've
                  found some gtk docs under the Eiffel54 directory, so I may be able to
                  work this out ... but I reckon I've done enough. The install should
                  have done all of this automatically, right?

                  Regards,
                  Peter Gummer

                  ---------------
                  ERRORS AT THE END OF THE vision2 COMPILATION:
                  In file included from
                  /Developer/Applications/Eiffel54/precomp/spec/macosx/vision2/EIFGEN/
                  W_code/C19/ev594.c:51:
                  /Developer/Applications/Eiffel54/library/vision2/implementation/gtk/
                  Clib/ev_any_imp.h:14:21: gtk/gtk.h: No such file or directory
                  In file included from
                  /Developer/Applications/Eiffel54/precomp/spec/macosx/vision2/EIFGEN/
                  W_code/C19/ev594.c:51:
                  /Developer/Applications/Eiffel54/library/vision2/implementation/gtk/
                  Clib/ev_any_imp.h:17: error: parse error before '*' token
                  /Developer/Applications/Eiffel54/library/vision2/implementation/gtk/
                  Clib/ev_any_imp.h:17: error: parse error before ')' token
                  /Developer/Applications/Eiffel54/library/vision2/implementation/gtk/
                  Clib/ev_any_imp.h:20: error: parse error before '*' token
                  In file included from
                  /Developer/Applications/Eiffel54/precomp/spec/macosx/vision2/EIFGEN/
                  W_code/C19/ev594.c:52:
                  /Developer/Applications/Eiffel54/library/vision2/implementation/gtk/
                  Clib/ev_c_util.h:12:21: gtk/gtk.h: No such file or directory
                  In file included from
                  /Developer/Applications/Eiffel54/precomp/spec/macosx/vision2/EIFGEN/
                  W_code/C19/ev594.c:52:
                  /Developer/Applications/Eiffel54/library/vision2/implementation/gtk/
                  Clib/ev_c_util.h:15: error: parse error before '*' token
                  /Developer/Applications/Eiffel54/library/vision2/implementation/gtk/
                  Clib/ev_c_util.h:15: error: parse error before '*' token
                  /Developer/Applications/Eiffel54/library/vision2/implementation/gtk/
                  Clib/ev_c_util.h:15: warning: data definition has no type or storage
                  class
                  In file included from
                  /Developer/Applications/Eiffel54/precomp/spec/macosx/vision2/EIFGEN/
                  W_code/C19/ev594.c:53:
                  /Developer/Applications/Eiffel54/library/vision2/implementation/gtk/
                  Clib/ev_gtk_callback_marshal.h:15:21: gtk/gtk.h: No such file or
                  directory
                  In file included from
                  /Developer/Applications/Eiffel54/precomp/spec/macosx/vision2/EIFGEN/
                  W_code/C19/ev594.c:53:
                  /Developer/Applications/Eiffel54/library/vision2/implementation/gtk/
                  Clib/ev_gtk_callback_marshal.h:24: error: parse error before
                  "c_ev_gtk_callback_marshal_signal_connect"
                  /Developer/Applications/Eiffel54/library/vision2/implementation/gtk/
                  Clib/ev_gtk_callback_marshal.h:25: error: parse error before '*' token
                  /Developer/Applications/Eiffel54/library/vision2/implementation/gtk/
                  Clib/ev_gtk_callback_marshal.h:25: warning: data definition has no type
                  or storage class
                  /Developer/Applications/Eiffel54/library/vision2/implementation/gtk/
                  Clib/ev_gtk_callback_marshal.h:27: error: parse error before
                  "c_ev_gtk_callback_marshal_signal_connect_true"
                  /Developer/Applications/Eiffel54/library/vision2/implementation/gtk/
                  Clib/ev_gtk_callback_marshal.h:28: error: parse error before '*' token
                  /Developer/Applications/Eiffel54/library/vision2/implementation/gtk/
                  Clib/ev_gtk_callback_marshal.h:28: warning: data definition has no type
                  or storage class
                  /Developer/Applications/Eiffel54/library/vision2/implementation/gtk/
                  Clib/ev_gtk_callback_marshal.h:32: error: parse error before '*' token
                  /Developer/Applications/Eiffel54/library/vision2/implementation/gtk/
                  Clib/ev_gtk_callback_marshal.h:34: error: parse error before
                  "EIF_OBJECT"
                  /Developer/Applications/Eiffel54/library/vision2/implementation/gtk/
                  Clib/ev_gtk_callback_marshal.h:36: error: parse error before
                  "c_ev_gtk_callback_marshal_timeout_connect"
                  /Developer/Applications/Eiffel54/library/vision2/implementation/gtk/
                  Clib/ev_gtk_callback_marshal.h:36: error: parse error before
                  "EIF_OBJECT"
                  /Developer/Applications/Eiffel54/library/vision2/implementation/gtk/
                  Clib/ev_gtk_callback_marshal.h:36: warning: data definition has no type
                  or storage class
                  /Developer/Applications/Eiffel54/library/vision2/implementation/gtk/
                  Clib/ev_gtk_callback_marshal.h:38: error: parse error before
                  "c_ev_gtk_callback_marshal_delete_connect"
                  /Developer/Applications/Eiffel54/library/vision2/implementation/gtk/
                  Clib/ev_gtk_callback_marshal.h:38: error: parse error before '*' token
                  /Developer/Applications/Eiffel54/library/vision2/implementation/gtk/
                  Clib/ev_gtk_callback_marshal.h:38: warning: data definition has no type
                  or storage class
                  /Developer/Applications/Eiffel54/precomp/spec/macosx/vision2/EIFGEN/
                  W_code/C19/ev594.c: In function `Fgm488l':
                  /Developer/Applications/Eiffel54/precomp/spec/macosx/vision2/EIFGEN/
                  W_code/C19/ev594.c:1759: error: `GtkWidget' undeclared (first use in
                  this function)
                  /Developer/Applications/Eiffel54/precomp/spec/macosx/vision2/EIFGEN/
                  W_code/C19/ev594.c:1759: error: (Each undeclared identifier is reported
                  only once
                  /Developer/Applications/Eiffel54/precomp/spec/macosx/vision2/EIFGEN/
                  W_code/C19/ev594.c:1759: error: for each function it appears in.)
                  /Developer/Applications/Eiffel54/precomp/spec/macosx/vision2/EIFGEN/
                  W_code/C19/ev594.c:1759: error: parse error before ')' token
                  /Developer/Applications/Eiffel54/precomp/spec/macosx/vision2/EIFGEN/
                  W_code/C19/ev594.c: In function `Fgm5w57':
                  /Developer/Applications/Eiffel54/precomp/spec/macosx/vision2/EIFGEN/
                  W_code/C19/ev594.c:1794: error: `GtkObject' undeclared (first use in
                  this function)
                  /Developer/Applications/Eiffel54/precomp/spec/macosx/vision2/EIFGEN/
                  W_code/C19/ev594.c:1794: error: parse error before ')' token
                  /Developer/Applications/Eiffel54/precomp/spec/macosx/vision2/EIFGEN/
                  W_code/C19/ev594.c: In function `Fgm6j3u':
                  /Developer/Applications/Eiffel54/precomp/spec/macosx/vision2/EIFGEN/
                  W_code/C19/ev594.c:1832: error: `GtkObject' undeclared (first use in
                  this function)
                  /Developer/Applications/Eiffel54/precomp/spec/macosx/vision2/EIFGEN/
                  W_code/C19/ev594.c:1832: error: parse error before ')' token
                  /Developer/Applications/Eiffel54/precomp/spec/macosx/vision2/EIFGEN/
                  W_code/C19/ev594.c: In function `Fgm661g':
                  /Developer/Applications/Eiffel54/precomp/spec/macosx/vision2/EIFGEN/
                  W_code/C19/ev594.c:1868: error: `gint' undeclared (first use in this
                  function)
                  /Developer/Applications/Eiffel54/precomp/spec/macosx/vision2/EIFGEN/
                  W_code/C19/ev594.c:1868: error: parse error before "larg1"
                  /Developer/Applications/Eiffel54/precomp/spec/macosx/vision2/EIFGEN/
                  W_code/C19/ev594.c: In function `Fgm7uz2':
                  /Developer/Applications/Eiffel54/precomp/spec/macosx/vision2/EIFGEN/
                  W_code/C19/ev594.c:1903: error: `gint' undeclared (first use in this
                  function)
                  /Developer/Applications/Eiffel54/precomp/spec/macosx/vision2/EIFGEN/
                  W_code/C19/ev594.c:1903: error: parse error before "larg1"
                  /Developer/Applications/Eiffel54/precomp/spec/macosx/vision2/EIFGEN/
                  W_code/C19/ma595.c: In function `Fgnrw_d':
                  /Developer/Applications/Eiffel54/precomp/spec/macosx/vision2/EIFGEN/
                  W_code/C19/ma595.c:2114: warning: this decimal constant is unsigned
                  only in ISO C90
                  /Developer/Applications/Eiffel54/precomp/spec/macosx/vision2/EIFGEN/
                  W_code/C19/ma595.c: In function `Fgnuhqv':
                  /Developer/Applications/Eiffel54/precomp/spec/macosx/vision2/EIFGEN/
                  W_code/C19/ma595.c:2376: warning: this decimal constant is unsigned
                  only in ISO C90
                  /Developer/Applications/Eiffel54/precomp/spec/macosx/vision2/EIFGEN/
                  W_code/C19/ma595.c:2380: warning: integer constant is too large for
                  "long" type
                  /Developer/Applications/Eiffel54/precomp/spec/macosx/vision2/EIFGEN/
                  W_code/C19/ma595.c:2382: warning: this decimal constant is unsigned
                  only in ISO C90
                  /Developer/Applications/Eiffel54/precomp/spec/macosx/vision2/EIFGEN/
                  W_code/C19/ma595.c: In function `Fgnw2hc':
                  /Developer/Applications/Eiffel54/precomp/spec/macosx/vision2/EIFGEN/
                  W_code/C19/ma595.c:2639: warning: this decimal constant is unsigned
                  only in ISO C90
                  /Developer/Applications/Eiffel54/precomp/spec/macosx/vision2/EIFGEN/
                  W_code/C19/ma595.c: In function `Fgnzn7u':
                  /Developer/Applications/Eiffel54/precomp/spec/macosx/vision2/EIFGEN/
                  W_code/C19/ma595.c:2897: warning: integer constant is too large for
                  "long" type
                  /Developer/Applications/Eiffel54/precomp/spec/macosx/vision2/EIFGEN/
                  W_code/C19/ma595.c:2899: warning: this decimal constant is unsigned
                  only in ISO C90
                  /Developer/Applications/Eiffel54/precomp/spec/macosx/vision2/EIFGEN/
                  W_code/C19/ma595.c:2903: warning: this decimal constant is unsigned
                  only in ISO C90
                  make[1]: *** [big_file_C19_c.o] Error 1
                  make: *** [C19/Cobj19.o] Error 2
                • Paul G. Crismer
                  Hello Peter, By looking at the error messages, it seems that gtk cannot be found. EiffelVision2 uses gtk on Unix-like platforms. You need an installed
                  Message 8 of 13 , Jul 6, 2004
                    Hello Peter,

                    By looking at the error messages, it seems that gtk cannot be found.
                    EiffelVision2 uses gtk on Unix-like platforms. You need an installed
                    development version of gtk in order to compile. Please check the
                    needed version number by EiffelSoftware.

                    Best regards,

                    Paul G. Crismer
                  Your message has been successfully submitted and would be delivered to recipients shortly.