Database table types

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Mon Feb 25 2002 - 18:23:31 EST

  • Next message: Andrus Adamchik: "Java Class Generation"

    there is a method in java.sql.DatabaseMetaData "getTableTypes".
    Resulting types can be used in "getTables" to retrieve tables of a
    particular type. I wonder if type names (Strings) are consistent across
    databases. There is no reference to any standard or a constant String
    value in API docs.

    I tested it with Sybase, MySQL and PostgreSQL, it looks like they all
    have different sets of types, but those types that are similar across
    the engines, are usually called the same name (TABLE, VIEW, etc.)
    Anybody knows if these names can be implementation dependent?

    Misha,

    I added a method to DbLoader "createDataMapFromDB" that takes type
    array to use as a filter in reverse engineering. (Hope it merges well
    with you uncommitted changes). I wonder if in a future database wizard
    we provide users with a choice what they want to reverse-engineer.
    Choices will be a list of checkboxes obtained from
    DbLoader.getTableTypes with "TABLES" and "Views" checked by default.

    Maybe this way the problem with guessing types will be solved by forcing
    user to make a choice?

    -- 
    ~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
    - Andrei (a.k.a. Andrus) Adamchik
    http://objectstyle.org
    email: andrus at objectstyle dot org
    



    This archive was generated by hypermail 2.0.0 : Mon Feb 25 2002 - 18:35:16 EST