1.1.6 Install pgModeler for designing the data model of BOA - Daniel-Brosnan-Blazquez/vboa GitHub Wiki

Introduction

This procedure covers the action to install the tool pgModeler.

This tool is used to design the data model of BOA.

Estimated duration

4 hours.

Pre-conditions

  1. An available BOA development environment is ready to use.

Procedure

  1. Open a terminal and access as root
su -

or

sudo su -
  1. Install Qt from the available packages:
apt-get install qt5-default
apt-get install libqt5svg5-dev
  1. Make sure Qt has been installed:
qmake -version
  1. Install pkg-config from the available packages:
apt-get install pkg-config
  1. Install libxml2-dev from the available packages:
apt-get install libxml2-dev
  1. Make sure pkg-config and libxml2-dev are installed:
pkg-config libxml-2.0 --cflags --libs
  1. Install libpq-dev from the available packages:
apt-get install libpq-dev
  1. Download the pgModeler software from the page by clicking on "Download", then on "Source" and then selecting the latest stable release (no alpha, no beta) and clicking on "Get source":

    image

    image

    image

  2. Extract the package and go to the extracted folder:

    IMPORTANT NOTE: replace PATH_TO_PGMODELER_PACKAGE and NAME_OF_PGMODELER_PACKAGE with the relevant values

cd PATH_TO_PGMODELER_PACKAGE
tar xzvf NAME_OF_PGMODELER_PACKAGE
  1. Build the software downloaded from the pgModeler page:

    IMPORTANT NOTE: replace PATH_TO_EXTRACTED_PGMODELER_PACKAGE with the relevant value

cd PATH_TO_EXTRACTED_PGMODELER_PACKAGE
export INSTALLATION_ROOT=/opt/pgmodeler
qmake -r CONFIG+=release PREFIX=$INSTALLATION_ROOT BINDIR=$INSTALLATION_ROOT PRIVATEBINDIR=$INSTALLATION_ROOT PRIVATELIBDIR=$INSTALLATION_ROOT/lib pgmodeler.pro
make
make install
  1. Copy the starter file and give it execution permissions:
cp start-pgmodeler.sh pgmodeler.vars /opt/pgmodeler
chmod +x /opt/pgmodeler/start-pgmodeler.sh
  1. Give read and execution permissions to /opt:
chmod +rx /opt
  1. Now, you should be able to open the tool as normal user:

    IMPORTANT NOTE: replace NORMAL_USER with the relevant value

sudo NORMAL_USER -
/opt/pgmodeler/start-pgmodeler.sh
  1. Configure to hide "table extended attributes" pgModeler:

    Note: It is recommended to hide the "extended attributes" for a better view of the model. For doing this:

    Edit -> Settings -> General -> Hide table extended attributes

  2. Configure to show only primary key as foreign key when adding relationships pgModeler:

    Note: default mode will add foreign key (primary key) + "_" + table name of the foreign key

    Edit -> Settings -> Relationships -> FK Settings & Patterns -> One-to-one | One-to-many | Many-to-Many -> Column (Source) as {sc}

    image

    image

    image

  3. Load the specific datamodel (for example, eboa_data_model.dbm). For doing this (loading eboa_data_model.dbm):

    File -> Load -> PATH_TO_EBOA/datamodel/eboa_data_model.dbm