Difference between revisions of "ConditionsDbSchema"

From Mu2eWiki
Jump to navigation Jump to search
(Created page with "==Introduction== A database '''schema''' is the design of the tables and functions, etc, and their interactions. Here we describe the conditions database in some detail. We...")
 
Line 9: Line 9:
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
! scope="col"| Item
+
! scope="col"| channel
! scope="col"| Quantity
+
! scope="col"| flag
! scope="col"| Price
+
! scope="col"| DtoE
 
|-
 
|-
! scope="row"| Bread
+
| 0
| 0.3 kg
+
| 12
| $0.65
+
| 1.11
 
|-
 
|-
! scope="row"| Butter
+
| 1
| 0.125 kg
+
| 13
| $1.25
+
| 2.11
 
|-
 
|-
! scope="row" colspan="2"| Total
+
| 2
| $1.90
+
| 11
 +
| 3.11
 
|}
 
|}
 
  
 
==Upper Level==
 
==Upper Level==

Revision as of 22:13, 24 October 2018

Introduction

A database schema is the design of the tables and functions, etc, and their interactions. Here we describe the conditions database in some detail.

We are using postgres databases. In postgres, the word "schema" is also used to refer to a what is essentially a folder, or a way to group database tables and assign permssions as a group. We have several of this type of schema, one for each detector subsystem (trk,cal,crv) plus one for the interval of validity structure (val) and one for test tables (tst). A table can be referred to as schema.name, for example, we have an example table in the tst schema, tst.calib1.

Lower Level

Starting with tst.calib1, we have a conceptual content like:

channel flag DtoE
0 12 1.11
1 13 2.11
2 11 3.11

Upper Level