Skip to content

Database Summary

DeclanBuckley edited this page Jan 25, 2021 · 10 revisions

Home / Developer / Database Tier / Summary

Database PxStat Database Tier.

Summary.

PxStat uses SQL Server 2016 as a database layer. All data is persisted in the database, however frequently used datasets may be cached in the server layer (see under caching section).

General Methods.

All database interactions are mediated via the server layer, i.e. there is no access to the database other than via the application. Methods to Create, Read, Update and Delete data are implemented via stored procedures which are called from the server layer. ORM is not implemented in PxStat.

Error Handling.

All errors thrown from a stored procedure will be caught and processed by the server layer.

Connecting from the Server Layer to the Database Layer.

Database connection from the Server Layer is mediated via the Server API Library. A connection string is maintained in the web.config for managing the connection.

Building the database.

The initial build of the database is done via a script, i.e. datamodel.sql. This is in turn run by the PowerShell script install.ps1. For ongoing releases, updates are handled via the update.ps1 script. Scripts are found at https://github.com/CSOIreland/PxStat/tree/master/db

Viewing and interacting with the database.

It is recommended that you use Sql Server Management Studio (SSMS) if you need to interact directly with the database.

Clone this wiki locally