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

本文是小编为大家收集整理的关于一般的Oracle数据收集存储的处理/解决方法,可以参考本文帮助大家快速定位并解决问题,中文翻译不准确的可切换到English标签页查看源文。

问题描述

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

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

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

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

选项2:创建一个signal_header表(启动时间,样本率,单位等),该表链接到raw_signal_value表(信号,偏移索引,值).

选项3:将原始数据存储在必要时在外部文件中以检索.

此外,在相关帖子中通用oracle结果表根据精度和比例(数据类型)将一般结果表分配到子表中.

推荐答案

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

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

您建议的三个选项中,我会选择选项2.结果表本身.

取决于您期望使用数据的期望以及每个结果波形所具有多少个数据点,我什至可能会想将波形/信号存储为单个字符串(例如,逗号分隔值).

本文地址:https://www.itbaoku.cn/post/597325.html

问题描述

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).