Giter VIP home page Giter VIP logo

chpl-data-model's Introduction

Data Model for Open Data CHPL

This is the Data Model for the Open Data CHPL.

The data model diagram is such: data model diagram

The data flow diagram is here: data flow diagram

Installation

Getting the code

$ git clone https://github.com/andlar/chpl-api.git
$ cd openchpl-sql

Data model load

Rename openchpl-role-template.sql to openchpl-role.sql and set the password for the openchpl role. These instructions assume the role/username used for the openchpl database is openchpl, and that the password in openchpl-role.sql, currently recorded as "change this password" will be update to match your installation. If the installer chooses to change the username/role, make sure it's also changed in the openchpl.sql file wherever the role is used.

Next, run the script reset.sh or reset.bat. These two scripts run the following commands, which remove any previous OpenCHPL data model installation, with the associated roles, then recreate the required roles and databases, as well as fill out some of those database schemas with some required information.

$ psql -Upostgres -f drop-openchpl.sql openchpl
$ psql -Upostgres -f drop-openchpl.sql openchpl_test
$ psql -Upostgres -f drop-role.sql
$ psql -Upostgres -f openchpl-role.sql
$ psql -Upostgres -f create-databases.sql
$ psql -Upostgres -f openchpl.sql openchpl
$ psql -Upostgres -f openchpl.sql openchpl_test
$ psql -Upostgres -f audit-openchpl.sql openchpl
$ psql -Upostgres -f audit-openchpl.sql openchpl_test
$ psql -Upostgres -f preload-openchpl.sql openchpl
$ psql -Upostgres -f preload-openchpl.sql openchpl_test
$ psql -Upostgres -f preload-user_contact_acl.sql openchpl
$ psql -Upostgres -f preload-user_contact_acl.sql openchpl_test

Truncate

To empty the databases of all Certified Products, but while still keeping the pre-loaded information and the data model setup, load the truncate-openchpl.sql file twice:

$ psql -Upostgres -f truncate-openchpl.sql openchpl
$ psql -Upostgres -f truncate-openchpl.sql openchpl_test

chpl-data-model's People

Contributors

andlar avatar chris-watson avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.