Tables Used for Sample Groovy and Configuration Scripts

A sample groovy scripts and configuration scripts uses the lookup table for roles, groups and parent and child table for user accounts

The tables that are used by sample groovy scripts and configuration scripts are listed below:

  • Lookup tables for roles and groups:

    create table ROLES(
    roleid varchar2(50), 
    rolename varchar2(50)); 
    
    create table GROUPS(
    groupid varchar2(50),
    groupname varchar2(50));
    
  • Tables for user accounts:

    • Parent Table:

      create table USERINFO(
      UserId varchar2(50),
      FirstName varchar2(50),
      LastName varchar2(50),
      email varchar2(50),
      Description varchar2(50),
      Salary NUMBER,
      JoiningDate date,
      status varchar2(50),
      lastupdated timestamp,
      PRIMARY KEY ( UserId ));
      
    • Child Table:

      create table USER_ROLE(
      userid varchar2(50),
      roleid varchar2(50),
      fromdate date,
      todate date);
      
      create table USER_GROUP(
      userid varchar2(50),
      groupid varchar2(50));
      
      ALTER TABLE USER_GROUP ADD CONSTRAINT GROUP_PK PRIMARY KEY ("USERID", "GROUPID") ENABLE;
      
      ALTER TABLE USER_ROLE ADD CONSTRAINT ROLE_PK PRIMARY KEY ("USERID", "ROLEID") ENABLE;