<p>Ask around of your colleagues. </p>

<p>You don't say what kind of physics you're doing, or how big the working group is, but in my discipline (particle physics) there is a deep repository of experience putting up and running just this type of systems (we call it "slow controls" and similar). There is a pretty good chance that someone you work with has either done this or knows someone who has. There may be a detailed description of the last time out in someone's thesis.</p>

<p>I don't personally have much to do with this, but I do know this: one common feature is to have no-delete-no-overwrite design. You can only <em>add</em> data, never remove it. This preserves your chances of figuring out what <em>really happened</em> in the case of trouble</p>

<hr>

<p>Perhaps I should explain a little more. While this is an important task and has to be done right, it is not really related to physics, so you can't look it up on <a href="http://www.slac.stanford.edu/spires/hep/" rel="nofollow noreferrer">Spires</a> or on <a href="http://arxiv.org/" rel="nofollow noreferrer">arXive.org</a>. No one writes papers on the design and implementation of medium sized slow controls databases. But they do sometimes put it in their dissertations. The easiest way to find a pointer really is to ask a bunch of people around the lab.</p>
Database design for physics hardware
<p>I have to develop a database for a unique environment. I don't have experience with database design and could use everybody's wisdom.</p>

<p>My group is designing a database for piece of physics hardware and a data acquisition system. We need a system that will store all the hardware configuration parameters, and track the changes to these parameters as they are changed by the user.</p>

<p>The setup:</p>

<ul>
<li>We have nearly 200 detectors and roughly 40 parameters associated with each detector. Of these 40 parameters, we expect only a few to change during the course of the experiment. Most parameters associated with a single detector are static.</li>
<li><p>We collect data for this experiment in timed runs. During these runs, the parameters loaded into the hardware must not change, although we should be able to edit the database at any time to prepare for the next run. The current plan:</p>

<ul>
<li>The database will provide the difference between the current parameters and the parameters used during last run.</li>
<li>At the start of a new run, the most recent database changes be loaded into hardware.</li>
<li>The settings used for the upcoming run must be tagged with a run number and the current date and time. This is essential. I need a run-by-run history of the experimental setup.</li>
</ul></li>
<li><p>There will be several different clients that both read and write to the database. Although changes to the database will be infrequent, I cannot guarantee that the changes won't happen concurrently. </p></li>
<li>Must be robust and non-corruptible. The configuration of the experimental system depends on the hardware. Any breakdown of the database would prevent data acquisition, and our time is expensive. Database backups?</li>
</ul>

<p>My current plan is to implement the above requirements using a sqlite database, although I am unsure if it can support all my requirements. Is there any other technology I should look into? Has anybody done something similar? I am willing to learn any technology, as long as it's mature. </p>

<p>Tips and advice are welcome.</p>

<p>Thank you,</p>

<p>Sean</p>

<hr>

<p><strong>Update 1</strong>:</p>

<p><em>Database access</em>:</p>

<p>There are three lite applications that can write and read to the database and one application that can only read. </p>

<p>The applications with write access are responsible for setting a non-overlapping subset of the hardware parameters. To be specific, we have one application (of which there may be multiple copies) which sets the high voltage, one application which sets the remainder of the hardware parameters which may change during the experiment, and one GUI which sets the remainder of the parameters which are nearly static and are only essential for the proper reconstruction of the data. </p>

<p>The program with read access only is our data analysis software. It needs access to nearly all of the parameters in the database to properly format the incoming data into something we can analyze properly. The number of connections to the database should be >10. </p>

<p><em>Backups</em>:</p>

<p>Another setup at our lab dumps an xml file every run. Even though I don't think xml is appropriate, I was planning to back up the system every run, just in case. </p>