acciente / oacc-db

Contains the SQL DDL scripts to create the OACC database tables for each supported database.
http://oaccframework.org
Apache License 2.0
7 stars 3 forks source link

OACC Database Scripts (oacc-db)

Database setup scripts for OACC

OACC persists all security relationships in database tables and currently supports several relational database management systems. This repository contains the SQL DDL scripts that OACC provides to set up the database schema, tables, user and privileges for each supported RDBMS.

The currently supported database systems are:

Database Setup Scripts

The database setup scripts consist of four different files that should be executed in the following sequence:

  1. create_database.sql

    • creates a dedicated database for OACC
    • typically run as a DBMS admin user
    • running this script is optional - you could simply create the OACC schema and/or tables within your project's current database
    • if you are using Oracle, HSQLDB or SQLite, please refer to the RDBMS-specific notes, below
  2. create_schema.sql

    • creates a database schema to house OACC-specific tables
    • run this script while connected to the database you set up with the create_database.sql script above
    • if you are using MySQL/MariaDB or SQLite, please refer to the RDBMS-specific notes, below
  3. create_tables.sql

    • creates OACC sequences, tables and constraints
    • run this script while connected to the database you set up with the create_database.sql script above
    • Note: if you modified (or omitted running) the previous create_schema.sql script, you need to update this script to reflect the modified (or lack of) database schema, before running it
  4. create_user.sql

    • creates a database user for OACC - Note: update this script to set the OACC database user's password!
    • grants privileges to connect to the OACC-database you set up with the create_database.sql script above
    • grants privileges to the OACC sequences and tables
    • if you are using IBM DB2 or SQLite, please refer to the RDBMS-specific notes, below

You are free to modify the provided scripts to suit your project's needs, as far as the database, schema, user and password are concerned - you'll get a chance to apply your customizations to the OACC configuration separately, after the database setup is complete.

There is a fifth script, drop_tables.sql, to facilitate removal of OACC constraints, tables and sequences, which you would only run when uninstalling OACC from your project.

These database scripts have been tested against the specified database system and version that their folder is named after. Often they can be run against other (especially higher) versions of the same database, as well, without any issues - but please keep in mind that we didn't actually verify this.
Running a database setup script against a completely different database system might be possible between certain databases, but similarly to different SQL dialects, there could be small differences in DDL syntax that would cause an issue.

IBM DB2 Database Setup Notes

Oracle Database Setup Notes

HSQLDB Database Setup Notes

MySQL/MariaDB Database Setup Notes

SQLite Database Setup Notes

License

OACC and the oacc-db setup scripts are open source software released under the commercial friendly Apache License, Version 2.0.

Documentation

You can find more information about OACC, including the latest Javadocs, releases, and tutorials on the project website: oaccframework.org.

About Acciente

Acciente, LLC is a software company located in Scottsdale, Arizona specializing in systems architecture and software design for medium to large scale software projects.