Skip to content

SQL, Procedural SQL, Database schema creation, hydration and functions to derive values all done in PostgreSQL

Notifications You must be signed in to change notification settings

toni-sharpe/sql-plsql-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Background

SQL used in the backend for the data-visualisation repo.

Note that the data-visualisation repo doesn't use this anymore as static data is separated out using CDN principles for high performance.

What's included

Table definition

Initialises the base table with all fields. Most fields are 0 or null on addition. Found in file 150.

Insert statement

Inserts around 350 records from the original investigation. Found in file 200.

Functions

A set of functions that derives various values from the initial measured values. These are files 001 - 012 and 050.

A second set (301 - 304) which derive various values to complete each record. 302 - 304 also derive values but with more complex logic reducing the event down to three single values assessing the level that each is at in three different contexts of interest to the research. This set won't run unless the initial function set and table hydratiojn is coplete, see to run below

Finally 300 brings the four functions 301 - 304 together in one single run.

To run

  • to set up required functions
  • Run 001 - 050
  • Run 301 - 304
  • to create and hydrate the table
  • Run 150
  • Run 200
  • to complete the data set in the table
  • Run 300

Finally

The data is anonymised like the frontend work.

About

SQL, Procedural SQL, Database schema creation, hydration and functions to derive values all done in PostgreSQL

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published