Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

다양한 테이블 구조 지원

마크베이스는 사용자의 용도에 따라 네가지 형태의 테이블을 각각 제공한다

Support for Various Table Structures

Machbase provides four table types for users according to one's usage. (Tag, Log, Volatile, Lookup)

이는 센서데이터를 저장하는 고객의 요구 사항이 매우 다양하고, 하나의 비지니스가 하나의 특정 데이터 패턴 만을 담고 있지 않기 때문이기도 하다.

따라서, 그러한 비지니스 요구 사항을 잘 이해하고, 적절한 테이블을 선택하는 것이 중요하다.

아래는 각 테이블의 특성을 구분하여 나타낸 것이다This is because client requirements for storing sensor data are very diverse and one business does not have just one specific data pattern.
Therefore, it's important to understand these business requirements and select the appropriate tables for them.
The table below shows the characteristics of each table.

Table of Contents
maxLevel1


가 메모리 기반의 성능으로 필요한 경우 사용 (초당 수만건)

시스템 종료시 모든 데이터가 사라지며,
주로 key-value 기반의 모니터링 용도로 활용함.

테이블 종류

Table Type

Tag TableLog TableVolatile TableLookup Table
목적

<센서명, 시간, 센서값> 형태의 센서 시계열 데이터 처리에 최적화

PLC 형태 로그 시계열 데이터 처리에 최적화
(텍스트 포함)

휘발성 메모리 데이터  실시간 처리영구 저장 가능한 마스터 데이터 관리
설명

고속으로 센서 데이터를 저장하고, 고속으로 해당 데이터를 추출하거나, 실시간으로 통계 테이블을 생성할 경우 활용

주로, 실시간 센서 데이터를 저장

텍스트를 포함한 로그성 데이터를 저장하고,
이를 일반 DBMS 형태로 분석하고자 할 경우 활용

주로, 히스토리성 사용자 데이터를 저장

PURPOSE

Optimized for processing sensor time series data in the form of <sensor name, time, sensor value>

Optimized for processing PLC log time series data

(text included) 

Real-time processing of volatile memory data

Manages master data that can be stored permanently

DESCRIPTION

Used when storing sensor data at high speed, extracting corresponding data at high speed, or creating statistical tables in real-time

Mainly stores real-time sensor data

Used when storing log data including text and analyzing it in the form of general DBMS

Mainly stores historical user data

Used when Insert, Delete, Update, Select

사용자의 변경 가능한 주요 마스터 데이터를 영구 저장할 목적으로 사용함.

SELECT 성능은 고속이지만,
나머지 INSERT, UPDATE, DELETE는 디스크 기반의 성능을 제공함.

테이블
구조

<센서명, 시간, 센서값> 이 기본형이며,
추가로 컬럼을 지정할 수 있다.

임의의 스키마 가능임의의 스키마 가능 (Primary Key 지정 가능)
INSERT (입력)
성능
초당 수백만건초당 수백만건초당 수만건초당 수백건
SELECT
(질의)
센서명 + 시간 범위 한정모든 질의 가능
DELETE
(삭제)

임의 시점 이전 데이터 실시간 삭제 가능

임의 시점/구간 데이터 실시간 삭제 가능

Primary Key 기준 Record Delete 지원 (※ Primary Key 지정 필요)

UPDATE
(변경)
지원 불가 (※ 메타데이터 컬럼 에 한해서 변경 가능)지원 불가Primary Key 기준 Update 지원 (※ Primary Key 지정 필요)
저장소
크기 한계
디스크 한계메모리 한계 (question)
INDEX
구조
3 단계의 Partitioning 실시간 인덱스 (※ 기본 생성)LSM 인덱스Red/Black 메모리 인덱스
STREAM
지원
타겟 대상으로만 가능 (저장 대상)소스/타겟 대상 모두 가능 (읽기 및 저장대상)불가능
고려 사항과거 데이터 삭제를 고려한 충분한 스토리지 확보 고려Tag 입력을 위한 임시 저장소로 고려메모리 한계 고려 (question)

다양한 크기의 하드웨어 지원

마크베이스는 사용자의  환경에 따른 아래와 같은 다양한 제품 Edition을 제공한다.

Edge Edition

이 제품은 ARM 혹은 인텔의 ATOM 급 CPU를 기반으로 동작하는 소규모 Edge 장비에서 동작한다.

그러나, 이런 소규모 장비에서도 초당 수만건의 센서 데이터를 저장하고, 필터링을 하고자 하는 경우 마크베이스가 유용하게 활용될 수 있다.

주로, 로봇이나 공장의 생산 설비, 빌딩 등의 단말 단계에서의 다양한 센서를 고속 및 고용량으로 저장하고자 하는 경우 필요한 제품이다.

Fog Edition

이 제품은 단일 서버에서 고속의 데이터 처리를 달성하고자 하는 경우 활용된다.

주로 인텔 x86 CPU 기반의 윈도우나 리눅스 운영체제에서 동작하며, 타 DBMS가 제공하지 못하는 매우 빠른 센서 데이터 저장과 분석을 제공한다.

대부분의 경우 수백대 이상의 Edge 장비로부터 실시간으로 입력되는 데이터를 저장하고, 이를 2차로 분석하기 위한 용도로 활용된다.

Cluster Edition

이 제품은 거대 제조 공장을 위한 초거대규모의 센서 데이터를 저장하기 위한 목적으로 개발되었다.

반도체 혹은 디스플레이, 발전, 철강 생산 공정에서 발생하는 초당 천만건 이상의 데이터를 저장하기 위해 다수의 물리적 서버가 클러스터 형태로 동작한다.

데이터가 늘어나는 환경에서 처리 용량과 성능을 지속적으로 유지해야 하는 환경에서 활용된다.

Tag analyzer : 데이터 시각화 솔루션 지원

마크베이스는 버젼 5부터 마크베이스에 저장된 수백억건의 센서 데이터에 대한 실시간 시각화를 제공한다.

즉, 임의의 태그 아이디를 지정하며, 그 아이디가 입력된 기간동안의 트렌드 차트를 순식간에 웹 기반으로 확인할 수 있도록 한다.

또한, 단순한 태그 데이터 뿐만 아니라 그 기간동안의 통계 챠트도 함께 볼 수 있도록 제공하기 때문에 단순 시각화를 넘어 일정 수준의 통계 분석도 가능하다

is required for memory-based performance (tens of thousands per second)

All data is lost when the system is shut down.

Mainly used for key-value based monitoring.

Used to permanently store user-editable master data.

SELECT has high-speed performance,

but INSERT, UPDATE, and DELETE provide disk-based performance.

TABLE STRUCTURE

<Sensor name, time, sensor value> is the  basic type, with the ability for assigning additional columns.

Any schema possible

Any schema possible (Primary Key can be assigned)


INSERT (INPUT) PERFORMANCE

Millions per second

Millions per second

Tens of Thousands per second

Hundreds per second

SELECT

Sensor Name + Limited Time Range

All inquiries possible



DELETE

Real time deletion of data before an arbitrary point

Real time deletion of arbitrary point / interval data

Primary Key Record Delete Support (※ Primary Key Designation Required)


UPDATE

Not supported (※ Only Metadata column is editable)

Not supported

Primary Key Update Support (※ Primary Key Designation Required)


STORAGE SIZE LIMITS


Disk limit

Memory limit



INDEX STRUCTURE

Three-step partitioning real-time index (※ default creation)

LSM index

Red / Black memory index


STREAM SUPPORT

Target only (save target)

Both source / target (read and save target)

Not possible


CONSIDERATIONS

Consider enough storage to erase historical data

Consider as temporary storage for Tag input

Consider memory limit


Hardware Support for Various Sizes


Machbase provides various product editions according to user environments as listed below.

Edge Edition

This product runs on small Edge devices running on ARM or Intel ATOM CPUS.

However, even in such small devices, Machbase can be useful for storing and filtering tens of thousands of sensor data per second.
It is mainly required for storing various sensor data at the terminal stage of robots and factory production lines, buildings, etc. at high speed and high capacity.

Fog  Edition

This product is used to achieve high-speed data processing on a single server.

It runs on Windows or Linux operating systems based on Intel x86 CPU and provides very fast sensor data storage and analysis that other DBMSs can not provide.
In most cases, it is used to store real-time data input from hundreds or more of edge devices and to perform secondary analysis.

Cluster  Edition

This product was developed for the purpose of storing large-scale sensor data for large manufacturing plants.

A number of physical servers operate in clusters to store more than 10 million data per second in semiconductor or display, power generation, and steel production processes.
It is used in an increasingly data-rich environment where data capacity needs to be continuously maintained.


Tag Analyzer: Data Visualization Solution Support


Machbase provides real-time visualization of tens of billions of sensor data stored in Machbase (since Version 5).

In other words, an arbitrary tag ID is designated, and the trend chart for the period in which the ID is input can be instantaneously checked on the web-based basis.

In addition, it provides not only simple tag data but also a statistical chart during that period, so statistical analysis is possible beyond simple visualization.


Write Once, Read Many

센서 데이터는 일단 데이터베이스에 입력되면 변경 또는 삭제되는 경우가 거의 없다.

따라서, 마크베이스는 머신 데이터에 대한 특성을 최대한 살리기 위해 한번 입력된 주요 시계열 데이터에 대해서는 UPDATE가 발생할 수 없도록 설계 되었다.


한번 입력된 로그 데이터는, 악의적 사용자에 의해 변조되거나 삭제되지 않으므로 걱정할 필요가 없다Sensor data is rarely edited or deleted once it is entered into the database.

Therefore, Machbase is designed so that once the key time series data is inputted to maximize the characteristics of the machine data, an UPDATE can not occur.

Once the log data has been entered, it cannot be altered or deleted by malicious users, so there should be no concerns.


Lock-free

아키텍쳐 지원

센서 데이터 처리하는데 가장 중요한 것은 데이터의 입력, 변경, 삭제 연산과 읽기 연산이 서로 충돌하지 않고가능한 독립적으로 처리되어야 한다는 것이다.

이 때문에 마크베이스는 SELECT 연산에 대한 어떠한 Lock도 할당 받지 않도록 설계되었고, 변경 연산인 입력 혹은 삭제와도 서로 절대로 충돌하지 않는 고성능 구조로 설계되었다.

따라서 수십만 건의 데이터가 입력되고, 실시간으로 일부가 삭제되는 상황에서도 SELECT 연산은 수백만 건의 레코드에 대한 통계 연산을 빠른 속도록 진행할 수 있다.

초고속 데이터 저장

마크베이스는 기존의 데이터베이스보다 수십배의 빠른 데이터 저장 성능을 제공한다. 특정 데이블에 인덱스가 다수 존재하는 상황에서도 최소 초당 300,000 건에서 최고 2,000,000 건까지 데이터를 받아들일 수 있다.

이것이 가능한 이유는 마크베이스가 시계열 데이터를 최적화하는 구조로 설계되었기 때문이다.

STREAM 기능 지원

마크베이스는 버젼 5 부터  Edge Edition과 Fog Edition에 대해서 실시간 데이터 필터링을 지원하기 위해 STREAM 기능을 제공한다.

이 STREAM은 DBMS 내부에서 실시간으로 입력되는 데이터에 대해 고속으로 조건 평가를 수행하고, 그 결과를 임의의 테이블로 전송하는 역할을 수행한다.

이 기능은 특정 센서의 값이 특정 범위를 넘었을 경우 경고를 발생시키거나 내부적으로 입력된 데이터에 대한 실시간 평가를 하는 경우 매우 유용하다.

실시간 인덱스 구성

마크베이스는 인덱스가 많으면 많을수록 데이터 입력 성능이 비례적으로 느려지는 전통적인 데이터베이스 구조를 혁신적으로 개선해, 초당 수십만건의 데이터가 입력되더라도 거의 실시간으로 인덱스를 구성할 수 있다.

이 특징은 실제 데이터가 발생하는 순간의 즉시 검색할 수 있는 강력한 기능적인 토대를 제공해 주기 때문에 머신 데이터와 같은 시계열 데이터 분석에 있어서는 핵심적인 기술이다.

실시간 데이터 압축

머신 데이터와 같은 시계열 데이터의 특징은 끊임없이 데이터가 발생한다는 것이다. 이 사실은 필연적으로 해당 데이터베이스의 저장 공간이 언젠가는 부족해질 뿐만 아니라, 처리해야 할 데이터를 충분하게 보유하지 못한다는 의미이다.

특히, 전통적인 데이터베이스는 고속 입력 시 데이터 뿐만 아니라 인덱스가 늘어남에 따라 차지하는 데이터 공간 역시 급격하게 증가한다. 이 때문에 머신 데이터의 저장과 분석에 매우 부적절한 구조이다.

마크베이스는 쏟아져 들어오는 데이터에 대해 혁신적인 실시간 압축 기술 2 가지를 통해 성능 저하 없이 적게는 수십배에서 수백배까지 데이터를 압축하여 저장한다.

논리적 실시간 데이터 압축 기술 지원

첫 번째로 마크베이스는 논리적 실시간 데이터 압축 기술을 지원한다.

이는 컬럼형 데이터베이스에서 유래한, 머신 데이터의 데이터 중복성을 이용한 것으로서 동일한 값을 갖는 데이터가 많으면 많을수록 데이터의 중복을 코드화하여, 데이터 저장공간을 혁신적으로 줄이는 기술이다. 이를 통해 데이터의 중복성이 높은 데이터에 대해 수백배까지 데이터를 압축할 수 있다.

물리적 데이터 압축 기술 (특허 기술)

두 번째는 마크베이스의 특허 기술인 물리적 데이터 압축기술이다.

이는 디스크에 저장될 물리적인 데이터 블럭을 미리 일정한 크기의 파티션으로 나누어 압축하여 디스크에 별도로 내림으로써 저장될 물리적 데이터의 량을 줄이고, 더불어 시스템이 유발시키는 I/O 비용을 급격하게 낮추는 기술이다. 이를 통해 실제 논리적으로 압축된 데이터를 다시한번 더 압축하여 저장 공간의 효율성을 높이는데 일조한다.

탁월한 질의 성능

마크베이스의 혁신적인 기술적 우월성은 초당 수십만 건의 데이터를 입력하는 와중에도 이미 저장된 과거의 수백만 혹은 수천만 건의 데이터에 대한 검색 및 통계 분석 성능이 매우 빠르다는 것이다.

삽입과 분석 모두에 탁월한 성능을 제공하는 마크베이스 만의 인덱싱 기술 때문에 가능한 것이며 실시간 비즈니스 의사 결정에 핵심적인 역할을 수행할 것이다.

전통적인 데이터베이스와 달리, 마크베이스는 두 개 이상의 인덱스를 하나의 질의문에서 처리할 수 있기 때문에 병렬로 데이터를 처리할 경우 몇 배나 더 빠른 성능을 기대할 수 있다.

아래는 다음과 같은 질의문에 대해 두 개 이상의 인덱스를 활용하는 경우를 나타낸 것이다

Architecture Support


The most important aspect in sensor data processing is that data input, update, delete operation and read operation should be processed as independent as possible without conflicts.

Because of this, Machbase is designed not to allocate any locks for the SELECT operation, and it is designed with a high performance structure that never conflicts with the operation of input or deletion changes.

Therefore, even when hundreds of thousands of data are entered and some of them are deleted in real time, the SELECT operation can speed up statistical operations on millions of records.


High Speed Data Storage


Machbase provides data storage performance that is exponentially faster than conventional databases. Even if there are many indexes in a specific table, data can be received from at least 300,000 to at most 2 million per second.

This is possible because Machbase is designed to optimize time series data.


STREAM Function Support


Starting from Machbase Version 5, Edge and Fog Editions provide STREAM functionality to support real-time data filtering.

This STREAM performs a condition evaluation on real-time data input in DBMS at high speed and transmits the result to an arbitrary table.
This function is very useful for generating a warning when the value of a certain sensor exceeds a specific range or real time evaluation of internally input data is needed.


Configuring Real-Time Index


Machbase innovatively improves on conventional database structure (where the more indexes you have the slower your data insert performance is) and can build indexes in near real-time, even with hundreds of thousands of data inserts per second.

This feature is a key technology for analyzing time series data, such as machine data, because it provides a powerful functional foundation for instant retrieval of actual data as it occurs.


Real-Time Data Compression


The characteristic of time series data such as machine data is that data is generated constantly. This inevitably means that not only will the storage space of the database becomes eventually inadequate, but it will not have enough data to process.

In particular, although conventional databases input data at a high speed, as the number of indexes increases, the occupied data space also greatly increases. Therefore, conventional databases are quite unsuitable for storing and analyzing machine data.
Machbase uses two innovative real-time compression techniques to compress and store up to a hundred times more data without any setbacks in performance.

Logical Real-Time Data Compression Technology Support

First, Machbase supports logical real-time data compression technology.

This is based on the data redundancy of the machine data derived from a column-type database. It is an innovative technique to reduce the data storage space by coding redundant data as the number of data having the same value increases, which allows high redundancy data to be compressed hundreds of times the original amount.

Physical Data Compression Technology (Patented Technology)

The second is Machbase's patented physical data compression technology.

This is a technology that reduces the amount of physical data to be stored by dividing a physical data block to be stored in a disk into a predetermined size partition, compressing it into a disk separately, and further reducing the I/O cost caused by the system. This helps to increase the efficiency of the storage space by compressing the actual logically compressed data once more.


Outstanding Query Performance


The innovative and technological superiority of Machbase is that the search and statistical analysis of millions or tens of millions of previously stored historical data is very fast, even with the simultaneous input of hundreds of thousands of data per second.

This is possible because of Machbase's own indexing technology that provides superior performance for both insertion and analysis, and will play a key role in real-time business decision making.
Unlike conventional databases, Machbase can process two or more indexes in a single query, which can be expected to perform several times faster when processing data in parallel.
The following is an example of using two or more indexes in a single query.

Code Block
languagesql
SELECT * FROM table1 WHERE c1 = 1 and c2 = 2;

시계열 데이터 특성 SQL 구문 지원

센서 데이터의 경우 최신 데이터가 예전의 데이터보다 몇 배 더 가치가 있으며 데이터의 접근 빈도도 최근 데이터가 예전 데이터보다 몇 배 더 많은 특징이 있다.

이런 이유로 마크베이스는 두 종류의 테이블 즉, 태그 (Tag) Table과 로그 (Log) Table을 통해  시계열 데이터 특징을 지원한다.

로그 테이블

마크베이스에서 지원하는 로그 테이블 (Log Table) 은 다음 특징을 가지고 있다.

첫째, 입력 시간을 자동으로 저장

레코드가 데이터베이스에 저장되는 순간 나노 세컨드 단위의 timestamp를 _arrival_time이라는 필드로 저장한다.

이 의미는 마크베이스가 저장하는 모든 레코드는 시간을 기준으로 검색하거나 조건을 줄 수 있다는 것이다.

둘째, 최근 데이터 우선 조회

데이터 검색시 최근 시간이 예전 시간 보다 먼저 출력된다. 즉, SELECT를 수행할 때 최근 데이터가 먼저 출력된다는 것이다.

앞에서 언급한 _arrival_time 컬럼 기준으로 내림차순 정렬 (descending sort) 를 한 것과 같은 결과이다.

셋째, DURATION 키워드

DURATION 키워드를 제공해, 특정 시간 범위 데이터를 입력 시간 기준으로 빠르게 조회할 수 있는 기능을 탑재했다.

머신 데이터 분석의 경우 특정 시간 범위를 지정하는 경우가 많기 때문에 SQL 레벨에서 이러한 특성을 제공한다.


이를 통해 복잡한 시간 연산자를 where 절에 주지 않더라도 편리하게 데이터를 분석할 수 있다

Time Series Data Characteristics SQL Syntax Support


In the case of sensor data, the newest data is several times more valuable than the older data, and also the "access frequency" of the latest data is characterized as being several times more compared to old data.

For this reason, Machbase supports time series data features through two types of tables: Tag and Log.

Log Table

The log table supported by Machbase has the following features.

First, it automatically saves input time

Whenever a record is stored in the database, a timestamp in nanoseconds is stored as a field called _arrival_time.
This means that all records stored by Machbase can be searched for or given condition on a time basis.


Second, it prioritizes lookup of recent data

When retrieving data, the latest time is output before the old time. That is, when SELECT is performed, the latest data is output first.
The result is the descending sort based on the _arrival_time column mentioned earlier.


Third, the DURATION keyword

The DURATION keyword is provided to enable quick lookup of specific time range data based on input time.
In the case of machine data analysis, these characteristics are provided at the SQL level because they often specify a specific time range.
This makes it easy to analyze data without stating "where" clause to complex time operators.

Code Block
languagesql
-- 예1Example 1)  지금View 부터data 10분statistics 전까지의from 데이터10 통계minutes 조회ago
SELECT SUM(traffic) FROM t1 DURATION 10 MINUTE;

-- Example 예22) 지금 부터 1시간 전에 30분간의 데이터 통계 조회View data statistics for 30 minutes from 1 hour ago
SELECT SUM(traffic) FROM t1 DURATION 30 MINUTE BEFORE 1 HOUR;

태그 테이블

마크베이스 5.0 부터 지원하는 태그 테이블 (Tag Table) 은 다음 특징을 가지고 있다.

첫째, 고속 TAGID/시간 조건 검색 성능

태그 테이블은 임의의 시간 및 임의의 ID 기반  검색 성능이 탁월하다.

기존의 RDBMS로는 도달할 수 없는 초고속의 데이터 추출 성능을 자랑하며, 이는 수십억건의 센서 데이터가 저장된 상황에서도 동일한 속도를 보장한다.

둘째, 고속 태그 데이터 입력

태그 테이블은 고속의 데이터 입력을 지원한다.

앞의 로그 테이블과 마찬가지로, 초당 수십만건의 센서데이터 입력에 있어서도 무리없이 데이터를 입력할 수 있다.

셋째, 실시간 통계 기능

태그 테이블은 실시간 통계 기능을 지원한다.

마크베이스는 이 태그 테이블에 저장된 데이터의 경우 실시간으로 다섯 종류의 통계를 자동적으로 생성하고, 이를 실시간으로 접근할 수 있는 기능을 제공한다.

텍스트 검색 기능 지원

로그성 시계열 데이터를 저장하고 활용하는 사용자의 가장 중요한 실제 용도 중 하나는 특정 시점에 특정 event 가 발생했는지를 확인하는 것이다.

특정 시점의 경우 시계열 데이터 처리로 가능하지만, 특정 event가 발생한 것은 대부분의 경우 특정 컬럼에 저장된 text field에서 특정 "단어"를 찾는 행위가 필요하다.

그러나, 전통적 데이터베이스에서는 특정 필드의 단어를 검색하기 위해서는 B+ Tree를 통해 exact match 혹은 LIKE 절을 통해 최초 일부 캐릭터의 조건을 검사하게 되는데, 대부분의 경우 이는 매우 느린 응답 결과를 초래한다.

그런 이유로 전통적인 데이터베이스에서 특정 단어에 대한 검색은 매우 취약하다.

반면, 마크베이스에서는 로그 테이블 기반의 SEARCH라는 SQL 키워드를 제공함으로써 실시간 단어 검색이 가능하도록 하였다.


이를 통해 장비로부터 발생된 임의의 에러 텍스트를 순식간에 검색할 수 있게 되었다

Tag Table

The tag table that is supported from Machbase 5.0 has the following features.

First, high-speed TAGID / time condition search performance

The tag table is excellent at any time and any ID based search performance.
It boasts ultra-fast data extraction performance that can not be achieved with existing RDBMSs, ensuring the same speed even when billions of sensor data are stored.

Second, the high-speed tag data input

The tag table supports high-speed data input.
As in the previous log table, data can be input without difficulty even with the input of hundreds of thousands of sensor data per second.

Third, real-time statistics function

The tag table supports real-time statistics function.
Machbase automatically generates five types of statistics in real time for the data stored in this tag table and provides a function to access them in real time.



Supports Text Search Function


One of the most important practical uses for users to store and use logarithmic time series data is to determine if a specific event occurred at a particular point in time.

Time-series data processing is possible at a specific point in time, but in most cases the occurrence of a specific event requires searching for a specific "word" in a text field stored in a particular column.
However, in a traditional database, in order to search for a word in a specific field, the exact match or LIKE clause is used to check the condition of some initial character through B + Tree. In most cases, this results in a very slow response.
That's why searching for a particular word in a conventional database is very weak and frustrating.
On the other hand, with Machbase, the SEARCH keyword based on the log table is provided to enable real-time word search.
This makes it possible to quickly search for any error text generated from the equipment.

Code Block
languagesql
-- Example 예11) Output msgrecord 필드에containing Error 혹은or 102를102 포함하는in 레코드를msg 출력field
SELECT id, ipv4 FROM devices WHERE msg SEARCH 'Error' or msg SEARCH '102';

-- Example 예22) Output msgrecord 필드에containing Error 그리고and 102를102 포함하는in 레코드를msg 출력field
SELECT id, ipv4 FROM devices WHERE msg SEARCH 'Error 102';

선택적 삭제 지원

센서 데이터의 경우에는 삽입 이후에 삭제 연산이 거의 발생하지 않는 것이 현실이다.

그러나 embedded 장비의 경우에는 저장 공간의 제약이 분명히 존재하고, 사용자에 의해 주의 깊게 관리되지 않는 것이 그 특징이다.

이 경우 혹시나 머신 데이터에 의해 Disk full이 발생하거나 장애가 발생하게 되면, 기업 입장에서 많은 손해를 감수해야 한다.

마크베이스는 이런 환경에서 주어진 특정 조건에 레코드를 삭제할 수 있도록 기능을 제공한다.

따라서 embedded 개발사는 CRON 혹은 주기적인 프로그램을 통해서 마크베이스가 일정 크기 이상의 데이터를 유지하지 않도록 손쉽게 관리할 수 있다.

로그 테이블의 경우 

아래 모든 문법 지원 


Optional Deletion Support


In the case of sensor data, it is true that deletion operations are rarely generated after insertion.

However, with embedded devices, there is a limited storage space that is not carefully managed by users.
In this case, if a 'disk full' occurs or a failure occurs due to machine data, the company could suffer a lot of damage.
Machbase provides the ability to delete records for a given condition in this environment.
Therefore, embedded developers can use CRON or periodic programs to easily manage Machbase to not keep data over a certain size.

For Log Tables

The following commands are supported:

Code Block
languagesql
-- 사용Example 예11) 가장Delete 오래된oldest 마지막last 100건을 삭제하라100.
DELETE FROM devices OLDEST 100 ROWS;

-- 사용Example 예22) Delete 최근all 1000건을but 제외하고1000 모두most 삭제하라recent.
DELETE FROM devices EXCEPT 1000 ROWS;

-- 사용Example 예3) 지금부터 하루치를 남기고 모두 삭제하라3) Delete all of them from now on except one day.
DELETE FROM devices EXCEPT 1 DAY;

-- 사용Example 예44) 2014년Delete all 6월data 1일from 이전의before 데이터를June 모두1, 삭제하라2014.
DELETE FROM devices BEFORE TO_DATE('2014-06-01', 'YYYY-MM-DD');

태그 테이블의 경우 

아래 한가지 문법 지원 

For Tag Tables

The following command is supported:

Code Block
languagesql
-- 2016년Delete all 6월data 15일from 이전의before 데이터를June 모두15, 삭제하라2016.
DELETE FROM tag BEFORE TO_DATE('2016-06-15', 'YYYY-MM-DD');

자동화된 데이터 수집

마크베이스는 산재해 있는 머신 데이터 로그 파일로부터 데이터를 읽어 자동으로 전송해주는 기능인 "컬렉터 (Collector)" 기능을 제공한다.

이를 통해 syslog 나 웹서버 로그 등의 이미 정형화된 데이터를 수집할 수 있을 뿐만 아니라 사용자가 임의로 정의한 로그 포맷의 경우에도 매우 쉽게 변환하여 자동으로 수집할 수 있는 기능을 제공한다

Automated Data Collection


Machbase provides a "Collector" function that reads data from scattered machine data log files and automatically transfers them.

It not only collects pre-formatted data such as syslog and web server logs, but also provides a function that can be easily converted and automatically collected even if the log format is arbitrarily defined by the user.