一般Oracle数据收集存储 [英] General Oracle Data Collection Storage

查看:137
本文介绍了一般Oracle数据收集存储的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在设计一个新的实验室数据库。我想将所有测试的原始结果存储在一起。



在某些情况下,结果是单个值。但是,结果有时是原始波形或信号。



下面哪种情况是理想的(以及为什么)? ...或提供您自己的理想选项。



选项1:将每个单独的数据点存储为单独的结果行(与t = 0偏移) p>



选项2:创建一个signal_header表格(开始时间,采样率,单位等)一个raw_signal_value表(信号,偏移量索引,值)。





选项3:存储原始数据



此外,在相关帖子一般Oracle结果表,我询问是否基于精度和规模(数据类型)将一般结果表分到子表中。

解决方案

我会避免选项3 - 如果你要使用数据库来存储原始结果,你可以使用它来存储所有的结果。 >

选项1听起来像是最终会为每个结果行复制大量数据,并且只有两个值(时间偏移和值)更改。



在你建议的三个选项中,我将使用选项2。你可以为每个结果存储一个结果行,并在DB中获得结果的详细信息好,没有杂乱的结果表本身。



根据您希望如何使用数据以及每个结果波形有多少个数据点,我甚至可能会将波形/信号存储为单个字符串(例如逗号分隔值)。


I am designing a new laboratory database. I want to store the raw results for all tests together.

In some cases, the result is a single value. However, the result is sometimes a raw waveform or signal.

Which case below is ideal (and why)? ... or provide your own ideal option.

Option 1: Store each individual data point as a separate result row (with an offset from t=0).

OR

Option 2: Create a signal_header table (start time, sample rate, units, etc) which links to a raw_signal_value table (signal, offset index, value).

OR

Option 3: Store the raw data in an external file to retrieve when necessary.

Also, in a related post General Oracle Results Table, I asked about whether or not to fork a general results table into child tables based on precision and scale (data type).

解决方案

I would avoid option 3 - if you're going to use a database to store raw results, you might as well use it to store all the results.

Option 1 sounds like you'll end up duplicating a lot of data for each result row, and have only two values (time offset and value) change.

Of the three options you suggest, I would go with Option 2. You'll be able to store a single result row for each result, and have the details of the result available in the DB as well, without cluttering up the result table itself.

Depending on how you expect to use the data, and how many data points you have per result waveform, I might even be tempted to store the waveform/signal as a single string (e.g. comma-separated values).

这篇关于一般Oracle数据收集存储的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆