Search code examples
javaeclipsejdbcderbyjavadb

Java DB: can i remove tables created by derby


using: JDK 7, Eclipse Luna, Derby 10.8 I just learned how to use Derby/Java DB, and I need to know why it (derby) create these schemas and tables when I create a new DB: (image from eclipse Data Tools)

Eclipse Data Tools -screenshot of the schema


Solution

  • The ones with names starting "SYS" are often called the "System Catalogs", or "System Tables", and they are automatically created by and managed by Derby itself.

    You can read about them in the Derby Reference Manual: http://db.apache.org/derby/docs/10.11/ref/

    For example, see: Derby System Tables (http://db.apache.org/derby/docs/10.11/ref/rrefsistabs38369.html) and SYSCS Diagnostic Tables (http://db.apache.org/derby/docs/10.11/ref/rrefsyscsdiagtables.html).

    The "APP" schema, on the other hand, is a normal user schema. User schemas are created for each user when they connect to the database and create a database object like a table or view. The "APP" user is the default username if you do not provide a username of your own, so that is why you are seeing it there.

    I'm not sure why you are seeing a "SQLJ" schema. Did you look inside it to see what tables it contains?