Other sop/dbdefn

Table Of Contents

Previous topic

Standard Operating Procedures

Next topic

DBI Very Briefly

This Page

Daya Bay Links

Content Skeleton

DB Definitions

For clarity of expression common naming of the various components is useful.

Database Topology Diagram

offline_db replication data flow

digraph replication {
size="8,8" ;
pad=0.6 ;

subgraph clusteronsite {
   style = "filled" ;
   dscdb [ label="dcs2.dyb.local" ]
   passthru [ style="filled", label="passthru"] ;
   onsiteslave [ style="dotted" , label="onsiteslave"]
   dcsdb -> passthru [ label="scrape" ];
   onlinedb -> passthru [ label="scrape" ];
   label = "ONSITE" ;
}

subgraph clusterihep {
   ihepmaster [ label="CENTRAL DB\ndybdb1.ihep.ac.cn"] ;
   ihepslave  [ label="slave\ndybdb2.ihep.ac.cn" , color="green", style="filled"] ;
   ihepmaster -> ihepslave ;
   label = "IHEP" ;
}

subgraph clusterlbl {
   lbnlslave [ label="dayabaydb.lbl.gov" , color="green" , style="filled" ]
   label = "LBL" ;
}

subgraph clusterbnl {
   bnlslave [ label="???.bnl.gov" , color="green" , style="filled" ]
   label = "BNL" ;
}

{ rank=source ; onlinedb ; dcsdb }
{ rank=same ; ihepmaster ; lbnlslave ; }

passthru -> ihepmaster [ label="replication" ] ;
ihepmaster -> onsiteslave [ label="replication", style="dotted"] ;
ihepmaster -> lbnlslave [ label="replication" ] ;
lbnlslave -> bnlslave [ label="replication" ] ;
}

Future plans:

  1. Offline DB slave Onsite as well (perhaps on same hardware as passthru DB )

Which Database to read from ?

Use nearest replicated slave of offline_db, ie dybdb2.ihep.ac.cn

Which Database to write to ?

Your copy of offline_db, known as tmp_offline_db

Database content and handling is divided into two categories with very different handling:

  • monitored DCS/DAQ quantities that are automatically scraped into the offline_db by continously running scripts
  • calibration parameters that are calculated based on data taking files and updated in an initally manual manner

The above figure is sourced in dybgaudi:Documentation/OfflineUserManual/tex/sop/dbdefn.rst, please commit any corrections/updates to the figure (in dot/graphviz language). The figure is gleaned mostly from p9 of doc:4449 cet091219offline-database.ppt.pdf

Database names

Section Names or Database names

This documentation refers to databases by their configuration file section names such as tmp_offline_db rather than by the actual database name (eg tmp_username_offline_db), as this parallels the approach taken by the tools: db.py and DBI.

For clarity a few definitions are required

offline_db
central DB at IHEP
tmp_offline_db
temporary copies of offline_db