• General questions about accessing DDS data via JDBC

    From Pasqualino Imbemba@21:1/5 to All on Sat Oct 3 13:54:33 2020
    Hello everyone,

    I have some basic questions about AS400/DB2 using IBM DDS:

    1) Is it possible to act on data contained in physical files through
    JDBC connector? (SELECT, INSERT INTO,...) - the DB2 should present them
    as SQL tables;
    2) The relations (keys) are contained in logical files. When accessing
    via JDBC/SQL, do I have to pay attention to relationships in logical
    files, or are elements like referential integrity safeguarded by the RDBMS?
    3) Best practice: Should I ask Stored Procedures to call via JDBC or act directly on the data?
    4) If I download the DB2 free edition, could I test this DDS/SQL
    interaction behaviour?

    Thanks
    #pasquale

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Steve Richter@21:1/5 to All on Sat Oct 3 07:19:46 2020
    1) Is it possible to act on data contained in physical files through
    JDBC connector? (SELECT, INSERT INTO,...) - the DB2 should present them
    as SQL tables;

    yes, physical (and logical ) files are seen as Tables by DB2.

    2) The relations (keys) are contained in logical files. When accessing
    via JDBC/SQL, do I have to pay attention to relationships in logical
    files, or are elements like referential integrity safeguarded by the RDBMS?

    I do not know much about referential integrity. As far as logicals, logical files are found in SYSTABLES. Meaning, you can insert into, update, delete from a logical file.

    3) Best practice: Should I ask Stored Procedures to call via JDBC or act directly on the data?

    yes, access the database thru sql procedures. One advantage is the sql procedure can adopt the authority of the owner of the procedure. This way, *public rights to the database table can be restricted.

    4) If I download the DB2 free edition, could I test this DDS/SQL
    interaction behaviour?

    the free version is DB2 for windows or linux? On the IBM i DB2 is not installed separately. It is integrated into the system. You need IBM i hardware and OS to use SQL on the system.

    -Steve

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Pasqualino Imbemba@21:1/5 to All on Sun Oct 4 05:09:02 2020
    Il 03/10/20 16:19, Steve Richter ha scritto:

    4) If I download the DB2 free edition, could I test this DDS/SQL
    interaction behaviour?

    the free version is DB2 for windows or linux? On the IBM i DB2 is not installed separately. It is integrated into the system. You need IBM i hardware and OS to use SQL on the system.

    The free DB2 edition for linux. AFAIK it's limited to 200 MB of space,
    but I'd like to create just a couple of physical and logical files, and
    access them through JDBC to see how it's behaving.

    Thanks
    #pasquale

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)