Nov. 10, 2006 GlueX Calibration Database Table Design and Interfaces – Current Status N. Kolev.

Slides:



Advertisements
Similar presentations
Bruce Scharlau, University of Aberdeen, 2012 Data storage options for mobiles Mobile Computing.
Advertisements

MS-Access XP Lesson 1. Introduction to MS-Access Database Management System Software (DBMS) Store data in databases Database is a collection of table.
ProcessIt Document Library 8.0 Controlled Documents Suite.
Exploring Office Grauer and Barber 1 Tables and Forms: Properties, Views, and Wizards(Wk3)
Using Relational Databases and SQL Steven Emory Department of Computer Science California State University, Los Angeles Lecture 9: Data Definition Language.
DAT702.  Standard Query Language  Ability to access and manipulate databases ◦ Retrieve data ◦ Insert, delete, update records ◦ Create and set permissions.
SQL Basics+ Brandon Checketts. Why SQL? Structured Query Language Structured Query Language Frees programmers from dealing with specifics of data persistence.
Introduction To Databases IDIA 618 Fall 2014 Bridget M. Blodgett.
Struts 2.0 an Overview ( )
MySql In Action Step by step method to create your own database.
Computing for Bioinformatics Introduction to databases What is a database? Database system components Data types DBMS architectures DBMS systems available.
© 2002 by Prentice Hall 1 David M. Kroenke Database Processing Eighth Edition Chapter 13 Managing Databases with SQL Server 2000.
Creating databases for web applications
Database Security and Auditing: Protecting Data Integrity and Accessibility Chapter 3 Administration of Users.
Chapters 17 & 18 Physical Database Design Methodology.
Actilab Pharma Online Services User Manual June 2004.
1 Advanced Computer Programming Databases. Overview What is a database? Database Basics Database Components Data Models Normalization Database Design.
Metadata Harvesting The Hague, 13 & 14 January 2009 Julie Verleyen Scientific Coordinator, Europeana Office EuropeanaLocal Knowledge Sharing Workshop.
What is Sure BDCs? BDC stands for Batch Data Communication and is also known as Batch Input. It is a technique for mass input of data into SAP by simulating.
Developing Workflows with SharePoint Designer David Coe Application Development Consultant Microsoft Corporation.
1 MySQL and phpMyAdmin. 2 Navigate to and log on (username: pmadmin)
LOGO CS-149 Fall 2009 Final Project project #1 by Zimeng Zhang.
Chapter 15: Using LINQ to Access Data in C# Programs.
PHP meets MySQL.
Rensselaer Polytechnic Institute CSCI-4380 – Database Systems David Goldschmidt, Ph.D.
MySQL. Dept. of Computing Science, University of Aberdeen2 In this lecture you will learn The main subsystems in MySQL architecture The different storage.
Presentation on SubmissionTrackingTool: by Anjan Sharma.
Capstone – Team C Project: Sisters Of The Road
MET280: Computing for Bioinformatics Introduction to databases What is a database? Not a spreadsheet. Data types and uses DBMS (DataBase Management System)
.Net and Web Services Security CS795. Web Services A web application Does not have a user interface (as a traditional web application); instead, it exposes.
Introduction to MySQL Lab no. 10 Advance Database Management System.
Advanced Database Management System
M1G Introduction to Database Development 2. Creating a Database.
R Environment and Variable Lookup Apr R Environment and Variable Lookup Outline  R Environment and Variable Lookup  R Byte-Code Interpreter.
10/10/2012ISC239 Isabelle Bichindaritz1 Physical Database Design.
PHP MySQL Image Gallery. The admin section contain the following : Add New Album Album List Edit & Delete Album Add Image Image List Edit & Delete Image.
Most information comes from Chapter 3, MySQL Tutorial: 1 MySQL: Part.
Online Examination Using Farming Based System Ajay Anand(d ) Kapil More(d ) Sri Ram(d ) Yogesh Patrikar(d )
IS 325 Notes for Wednesday August 28, Data is the Core of the Enterprise.
Zdenek Nejedly, Campus Services Rasim Duric, Lelio Fulgenzi, Deborah MacDougall, Networking Services Computing & Communications Services University of.
Calibration API in JANA David Lawrence, Jlab July 17, 2007.
What is Web Site Administration Tool ? WAT Allow you to Configure Web Site With Simple Interface –Manage Users –Manage Roles –Manage Access Rules.
DAY 15: ACCESS CHAPTER 1 Rahul Kavi October 6,
How to backup and restore WAP4410N configuration file properly.
Session 7 Methods Strings Constructors this Inheritance.
DBT544. DB2/400 Advanced Features Level Check Considerations Database Constraints File Overrides Object and Record Locks Trigger Programs.
Database and Information Management Chapter 9 – Computers: Understanding Technology, 3 rd edition.
JAVA BEANS JSP - Standard Tag Library (JSTL) JAVA Enterprise Edition.
©Silberschatz, Korth and Sudarshan1 Structured Query Language (SQL) Data Definition Language Domains Integrity Constraints.
CP476 Internet Computing Perl CGI and MySql 1 Relational Databases –A database is a collection of data organized to allow relatively easy access for retrievals,
LCG Distributed Databases Deployment – Kickoff Workshop Dec Database Lookup Service Kuba Zajączkowski Chi-Wei Wang.
LIS618 last lecture building a search interface Thomas Krichel
Starting with Oracle SQL Plus. Today in the lab… Connect to SQL Plus – your schema. Set up two tables. Find the tables in the catalog. Insert four rows.
Web Application Design. Data –What data is available? –How do we store it or how is it stored in the DB? Schema Data types Etc. –Where is the data?
Chapter 7 Constructors and Other Tools Copyright © 2010 Pearson Addison-Wesley. All rights reserved.
Working with MySQL. SWC – Creating tables We know how to create a database in MySQL – an empty database Next step is to add tables to the database.
Jan 18, EDMS 1 Status of ILCDoc Maura Barone GDE/Fermilab.
Constraints and Views Chap. 3-5 continued (7 th ed. 5-7)
Open Source Server Side Scripting ECA 236 Open Source Server Side Scripting Intro to MySQL.
H2LC The Hitchhiker's guide to LSA Core Rule #1 Don’t panic.
DANA David Lawrence Oct. 21, D. Lawrence, JLab GlueX Software Workshop Oct Outline Requirements Philosophy Overview of Features Open Questions.
More Sophisticated Behavior
Module 11: File Structure
Play Framework: Introduction
Teaching slides Chapter 8.
Intro to Relational Databases
Paul Jacobs The iSchool University of Maryland Thursday, Oct. 5, 2017
MySQL Database System Installation Overview SQL summary
Intro To Design 1 - Project Overview
MySQL Database System Installation Overview SQL summary
Presentation transcript:

Nov. 10, 2006 GlueX Calibration Database Table Design and Interfaces – Current Status N. Kolev

Nov. 10, 2006 Outline Interfaces – types and purpose. Table design/structure. Examples with calibDBmanager. Other issues – database choice (MySQL), organization and deployment, backups, incoming data flows. (For details on tables and several examples see GlueX-doc-672).

Nov. 10, 2006 Interfaces - Status Interface integrated in the framework – in C++, needs more development, questions about exact implementation. Web interface – trial (not very suitable for production purposes), but performs basic tasks like reading, writing of values and creating and modifying tables. calibDBmanager – communication with the database to perform basic functions like reading, writing, creating tables, etc.

Nov. 10, 2006 Framework Integrated Interface On request, a calibrationConstants object is created in the framework, which provides the requested constants, e.g.: string bb("BCAL:ADCpedestals"); DCalibration *myCa = new DCalibration(9999,""); // this will be done by the framework const float *pt2 = NULL; myCa->GetCalibration(bb,pt2); delete myCa; // this will be done by the framework The interface can search the local file system (should it?) or if the requested data don’t exist, get from the database. In either case it gets an XML file, which has the description as well (number of constants, their meaning, etc.). The interface provides STL vectors with the requested calibration constants. STATUS – code exists that can read from the XML file; needs several modifications; not tried with the framework yet.

Nov. 10, 2006 Web Interface Purpose: to communicate with calibDBmanager in order to do: general reading, creating new tables, modifying existing tables, writing values of constants, table description browsing. The option “Edit calibration collection” can provide online editing etc., but this still needs a lot more work. A more sophisticated and easy to use (perhaps perl is most suitable) interface is needed for production purposes.

Nov. 10, 2006 calibDBmanager Purpose – performs all the physical communication with the database. Written in C++ (should not be a problem). Exposes methods for reading, writing, creating new tables, etc. Performs basic validation, error checking, referential integrity (more needs to be done here). Status – most features tested as stand-alone, but needs more testing and debugging as an integrated object – e.g. a new table is created empty and this causes errors because the table is listed as existing and in a read attempt it is supposed to provide data (empty tables are in this sense misleading).

Nov. 10, 2006 calibDBmanager – Methods public: calibDBmanager(const int task, const string credentials); string getCalibrationCollection(const int runNumber, const string what, const string globalContext = ""); string getSets(string setName); string getAllSets(); string readValues(const int runNumber, const string what, const string globalContext = ""); string getSetDescription(const string setName); string createCalibrationSet(const string subsystem, const string setName, const string context, const string chadd, const string kind, const string attributes[], const string numberOfElements, const string runMin, const string runMax, const string officer, const string note); string writeCalibrationValues(const string tableName, const int runMin, const int runMax, const string officer, const string note, const int nOfElements, const float theValues[]); string calibDBmanager::writeAllValuesFromXML( const string theXMLfileName); string calibDBmanager::writeAllValues(const int runMin, const int runMax, const string officer, const string note, const string allValues); string restoreSetAsDefault(const string someSet, const string newOfficer, const string newNote); string getSubsystems(); private: string readFromTable(string queryString, MYSQL_RES &queryResult); calibDBmanager();

Nov. 10, 2006 Table Design/Structure SetDescriptions. Attributes. Value tables, e.g. BCAL_TDCoffsets_default_1 A couple of auxiliary redundant tables exist, which will be removed in a production version.

Nov. 10, 2006 Value Tables | Field | Type | Null | Key | Default | Extra | | id | int(11) | | PRI | NULL | auto_increment | | runMin | int(11) | | | 0 | | | runMax | int(11) | | | 0 | | | datestamp | datetime | | | :00:00 | | | officer | varchar(32) | | | | | | note | varchar(128) | | | | | | value1 | float | YES | | 0 | | | value2 | float | YES | | 0 | | | value3 | float | YES | | 0 | | | value4 | float | YES | | 0 | |

Nov. 10, 2006 SetDescriptions Table | id | subsystem | setName | context | order | kind | nOfElements | runMin | runMax | datestamp | officer | note | | 2 | BCAL | fiberItems | default | 1 | simple | 8 | 1 | | :26:08 | NK | Empty. | | 3 | BCAL | gammaCorrections | default | 1 | simple | 4 | 1 | | :26:37 | NK | Empty. | | 4 | BCAL | gammaCorrections | 3pointFit | 0 | simple | 6 | 1 | 100 | :27:09 | NK | Empty. | | 5 | BCAL | gammaCorrections | default | 2 | simple | 6 | 1 | | :27:47 | NK | Empty. | | 30 | BCAL | Ceff | default | 1 | simple | 2 | 1 | | :56:07 | NK | empty | | 26 | FCAL | ADCpedestals | default | 1 | channel | 212 | 1 | | :03:51 | NK | Empty. | | 22 | BEAM | shifts | default | 1 | simple | 3 | 1 | | :34:20 | NK | Empty. |

Nov. 10, 2006 Attributes Table | id | tableName | attributeNumber | attribute | | 1 | BCAL_fiberItems_default_1 | 1 | fiber diamerer (mm) | | 2 | BCAL_fiberItems_default_1 | 2 | first cladding thickness (mm) | | 3 | BCAL_fiberItems_default_1 | 3 | second cladding thickness (mm) | | 4 | BCAL_fiberItems_default_1 | 4 | refraction index core | | 5 | BCAL_fiberItems_default_1 | 5 | refraction index first cladding | | 6 | BCAL_fiberItems_default_1 | 6 | refraction index second cladding | | 7 | BCAL_fiberItems_default_1 | 7 | cEff, cm/ns | | 8 | BCAL_fiberItems_default_1 | 8 | attenuation length, cm | …………… | 28 | BEAM_shifts_default_1 | 2 | y, cm | | 29 | BEAM_shifts_default_1 | 3 | z, cm |

Nov. 10, 2006 Examples with calibDBmanager Global context example: “BCAL:gammaCorrections:3pointFit FCAL:TDCoffsets:316channels” Reading examples: string theOutput = calibDBmanager.readValues(330,”all”); string theOutput = calibDBmanager.readValues(330,”BCAL”,”BCAL:gammaCorresctions:3poin tFit”); Writing example: string theResult = calibDBmanager.writeCalibrationValues("FCAL_ADCpedestals_default_1",1,99999,"NK","Put a note here.",212,someValues); Create set example: string theResult = theManager.createCalibrationSet("BCAL","Ceff","default", “add","simple",theAttributes,"3","1","100","NK","new fibers");

Nov. 10, 2006 XML File Example GlueX Calibration Database Web Interface GlueX BCAL Ceff simple cladding 14.2 core BCAL fiberItems simple fiber diamerer(mm) first cladding thickness (mm) …….

Nov. 10, 2006 Other Issues MySQL – newer versions have important features – transactions are promised for all types of tables and seem to be crucial, as things can go wrong when many database access operations have to be performed as one. Deployment, organization, backups – a first trial version can be integrated in OpenShop (e.g. on hydra). Security issues. Incoming data – calibDBmanager is almost ready to process calibration constants coming as an XML file. Other types (C++ streams, STL vectors, etc.) should not be a problem.