Skip to end of metadata
Go to start of metadata
You are viewing an old version of this page. View the current version. Compare with Current  |   View Page History


Depending on point of view, ALTIBASE architecture is similar to Oracle except two major difference.

관점에 따라, ALTIBASE HDB의 구조는 두 가지 주요 차이점을 제외하고 유사하다.

  • ALTIBASE does not only only DRDB (Disk Releational DB) but MRDB(Memory Releational DB).
  • ALTIBASE HDB는 DRDB뿐만 아니라, MRDB까지 지원한다.
  • ALTIBASE is 1 process, multithreaded architecture while Oracle is multiprocess architecture.
  • ALTIBASE 1프로세스 기반에 멀티쓰레드 구조인 반면에 ORACLE은 멀티프로세스 구조이다.

We'll discuss about the architecture difference between the two DBMS's.

우리는 두 DBMS간의 구조간 차이점을 논의할 것이다.

Oracle과의 구조비교

Oracle의 구조

Here's summation of Oracle Database architecture.

다음 그림은 ORACLE구조의 전반적인 요약도이다. 

Full Size
A Gliffy Diagram named: oracle_architecture

Oracle instance does consist of the following constituents.

ORACLE은 다음의 구성요소로 이뤄져 있다.

  • SGA (Shared Global Area)
    SGA is a shared memory used by Oracle Processes. SGA consists of data buffer cache, shared pool, redo log buffers and so on. SGA는 오라클 프로세스에 의해 사용되는 공유 메모리이다. SGA는 데이터 버퍼 캐쉬, 공유 풀, 리두로 버퍼 등으로 이뤄져 있다. 
  • This component corresponds to the Disk Buffer in ALTIBASE HDB. 이 컴포넌트는 ALTIBASE HDB의 디스크 버퍼에 해당한다.
  • Oracle Processes
    Oracle Processes are for executing queries which user sent, or maintaining Oracle instance. In constrast to Oracle. ORACLE 프로세스는 사용자가 보낸 쿼리의 실행, ORACLE 인스턴스의 관리에 필요하다.
  • Files
    Files are used by Oracle Proess. ORACLE 프로세스에 의해 사용되는 파일


Here's briefing of ALTIBASE architecture. 아래는 ALTIBASE HDB의 구조를 간략하게 설명한 그림이다.

Full Size
A Gliffy Diagram named: altibase_architrcture

ALTIBASE, in contrast to Oracle, is a single process with multithreads and can handle both in-memory data and disk data using intergrated query processor.

Therefore, ALTIBASE does not require big shared memory segments such as SGA.
Memory segements that ALTIBASE use  consists of

Oracle에 대조적으로 Altibase HDB는 멀티쓰레드의 단일 프로세스 구조이고 통합 쿼리 프로세스를 사용하여 인메모리 데이터와 디스크 데이터를 모두 다룰 수 있다.

따라서, ALTIBASE는 SGA와 같은 대용량 공유 메모리 세그먼트가 필요 없다.

ALTIBASE HDB가 사용하는 메모리 세그먼트는 아래의 구성요소로 이뤄져 있다.

  • Memory Tablespace
    Because ALTIBASE support in-memory database facility, user can create tablespaces in main memory. ALTIBASE support four types of memory tablespaces.

ALTIBASE HDB는 인메모리 데이터베이스를 지원하기 때문에, 사용자는 주 메모리 안에 테이블스페이스를 생성할 수 있다. ALTIBASE HDB는 네 가지 형태의 메모리 테이블스페이스를 지원한다. 

Tablespace Type Description
SYS_TBS_MEM_DIC SYS_TBS_MEM_DIC is a tablespace which stores ALTIBASE meta information in memory.
All meta information are stored in memory.
It is almost same with Library Cache in Oracle besides Oracle stores its meta data in disk but ALTIBSE stores its meta data in memory.
This tablespace can not be dropped.
SYS_TBS_MEM_DATA SYS_TBS_MEM_DATA is a default memory tablespace. You can specify its size when you create database. This tablespace can not be dropped.
User Memory Tablespace User memory tablespace is a kind of tablespace which resides in memory. You can create or drop user memory tablespaces in service time if there is no transaction which access the tablespace. You can specify its size when tablespace creation time.
Volatile User Memory Tablespace This tablespace does not issue any I/O. It is useful when you want to store temporary data. Because there is no transaction logging and no checkpoint issued in volatile tablespace, all data is automatically deleted after restarting ALTIBASE. (But Object schema, such as table and synonym, are not deleted becuase object schemas are stored in SYS_TBS_MEM_DIC tablespace.
  • SQL PLAN Cache
    SQL PLAN cache is similar facility like Oracle Library cache in Shared pool.
  • Bufferpool
    To reduce I/O contentions while accessing disk data, ALTIBASE creates Buffer Pool to cache for read or written data. It is almost same as Buffer Cache in Oracle.

and ALTIBASE has its own threads to execute query that user request or to maintain ALTIBASE properly.

  • ALTIBASE thread list.
    ALTIBASE Oracle Remarks
    Service Thread Server process Executes query that user sent and returns result.
    Dispatcher thread Listener Monitors socket that client attempts to connect to and hands over client session to Service Thread.
    Session Manager PMON process Check whether the client session is connected or not. if disconnected, Session manager cleans up the resources that belong to the disconnected session.
    Load Balancing Thread N/A This thread is responsible for well-spread workload. If one service thread is busy, Load balance thread steals a task from the busy thread and rearranges the task. If all service threads are busy, it creates a new service thread.
    Log flusher thread LGWR process This thread is responsible for log flush. Service thread writes its transaction log into log buffer (which resides in Kernel or User space). Log flusher thread flushes its transaction log from buffer to disk to ensure durability.
    Flusher Thread DBWR process Any changes in Disk tablespaces are written in Disk Buffer Pool first. and then Flusher thread writes dirty pages (the changed pages) from Disk Buffer Pool to data file. It is almost same with DBWR process in Oracle.
    Log file manager thread LGWR process This thread is responsible for preparing and creating log files. Because of WAL (Write Ahread Logging) protocol, all changes should be logged before changes. To avoid the contentions between writing and creating log files, this thread creates and prepares logfiles.
    Logical Ager thread N/A This thread is responsible for index garbage collection in memory tablespaces. This thread releases and cleans up unused index memory to be reused.
    Delete Thread N/A This thread is responsible for data garbage collection in memory tablespaces. This thread releases and cleans up unused data memory to be reused.
    Checkpoint thread CKPT process It is not same the meaning of ALTIBASE checkpoint with Oracle checkpoint because ALTIBASE checkpoint thread is responsible for not only Disk Buffer checkpoint but also memory checkpoint. Checkpoint thread flushes all dirty pages in memory tablespaces and synchronizes memory checkpoint image to memory tablespace and then it deletes all unnecessary log files.
    Archiving thread ARCH process This thread is responsible for archiving log. This thread is activated only in archive mode. Archived log is necessary for online backup and recovery for media failure.
    Replication Sender thread N/A This thread is responsible for sending xlog to another ALTIBASE which reside in another machine (or same machine). This thread reads transaction log and translates logfile to xlog to provide HA(High Availability) feature.
    Replication Receiver thread N/A This thread is responsible for receiving xlog which another ALTIBASE Replication Sender send, and apply the xlog to its DB.
  • Files
    Name Description
    Property file Database configuration file. This file is read by ALTIBASE server when ALTIBASE starts up. It is same with Oracle PFILE (parameter file). The location of this file is $ALTIBASE_HOME/conf/
    Log anchor file Log anchor file is a small binary file that stores physical information of database include tablespace , data file , SCN (System Change Number) information and so on. ALTIBASE has three log anchor files like Oracle has three control files because these files are very important. It is almost same with Control file in Oracle. You can dump and analyze this file using dumpla command.
    Memory checkpoint image Memory checkpoint image is files in disk , which is identical copies of memory tablespaces in ALTIBASE. During checkpoint phase, ALTIBASE synchronizes the data of memory tablespace to memory checkpoint image in disk. A memory tablespace needs two memory checkpoint images because ALTIBASE uses ping-pong checkpoint mechanism to reduce I/O and lock contention.
    Datafile This file is for storing disk tablespace data as Oracle does. It is exactly same with Oracle data file. A tablespace is consist of datafiles.
    Transaction Log file This file is for storing transaction log to ensure durability of ALTIBASE. According to WAL (Write Aread Logging), All changing transactions have to record their change logs in Transaction log file before change regardless tablespace type. (Memory tablespace or Disk tablespace)
    Archive log Archive log files is for media-failure recovery. They are identical to transaction log files but these files are not removed automatically. DBA (Database Administrator) has responsibility to manage archive log files manually according to backup policy.
    Password file Password file is for storing the password of SYS user (super user)
    Double-write buffer file Double-write buffer file is for saving temporarily saved disk pages.

스토리지 구조를 ORACLE에 비교하기

ALTIBASE is hybrid database management system. That is, ALTIBASE provides both in-memory database feature and disk database feature.

So it would be difficult to compare ALTIBASE HDB to Oracle simply.

 ALTIBASE HDB는 하이브리드 데이터베이스 관리 시스템이다. 다시 말하면 인메모리 데이터베이스의 기능과 디스크 데이터베이스의 기능을 모두 제공한다.

따라서 ALTIBASE HDB와 ORACLE을 단순하게 비교하는 것은 무리이다.

디스크 상주 데이터베이스 구조

In fact, ALTIBASE DRDB is almost same with Oracle storage structure.

사실, ALTIBASE DRDB는 ORACLE 스토리지 구조에 거의 비슷하다.

Full Size
A Gliffy Diagram named: StorageStructure

Here're explaination about elements of storage structure.

아래는 스토리지 구조의 구성요소에 관한 설명이다.

ALTIBASE uses the term "page" corresponding to Oracle term "block".

You don't need to distinguish them because they are almost same.

We'll use "page" instead of "block" even if we cover Oracle architecture.

ALTIBASE HDB는 블록에 대응하는 page라는 용어를 사용한다.

그것들은 거의 같은 의미이기 때문에  굳이 구별할 필요는 없다.

우리는 Oracle구조를 다룰 때에도 블록 대신에 페이지를 사용할 것이다.

  • Page
    A page the minimum unit of database I/O. ALTIBASE / Oracle manages its data using page structure.

페이지는 데이터베이스 I/O의 최소 단위이다. ALTIBASE/ORACLE은 페이지 구조를 사용해 데이터를 관리한다.

Here're the features those ALTIBASE does not support.

아래는 ALTIBASE HDB가 지원하지 않는 기능에 대한 표이다.

Features Description
Changable page/block size The page size of ALTIBASE can not be changed. It is 8Kbytes in DRDB.
ALTIBASE의 페이지 크기는 바뀔 수 없다. DRDB는 8K이다.
Compression ALTIBASE does not support page compression. ALTIBASE HDB는 페이지 압축기능을 지원하지 않는다.

Except above features, ALTIBASE data page is almost simllar to Oracle's including PCTFREE / PCTUSED storage parameter.

위의 특징 외에, ALTIBASE HDB의 데이터 페이지는 PCTFREE/PCTUSED 스토리지 파라미터를 포함해서 ORACLE의 데이터 페이지 구조와 매우 비슷하다.

  • Extent
    An extent is a logical unit of database storage space allocation made up of contiguous data pages. 익스텐트는 근접한 데이터페이지로 구성되는 데이터베이스 스토리지 공간 할당 단위이다. 
  • Segement
    A segment is a set of extents that contains all the data for a logical storage structure within a tablespace. 세그먼트는 테이블스페이스 안의 논리적인 스토리지 구조에 대한 모든 데이터를 포함하는 익스텐트의 집합이다.  
  • Tablespace
    A tablespace is a logical storage container for segments. 테이블스페이스는 세그먼트의 논리적인 스토리지 저장소이다.

In-memory DB stucture

Although Oracle does not support in-memory database feature, it is important to understand ALTIBASE memory db structure in order to maximize ALTIBASE utilization before migrating from Oracle.

비록 ORACLE이 인메모리 데이터베이스의 기능을 지원하지 않더라도, ORACLE로부터 이전을 하기 전에 ALTIBASE HDB의 활용을 극대화하기 위해 ALTIBASE HDB의 메모리 DB구조를 이해하는 것이


Here's a structure.

아래는 구조도이다.

Full Size
A Gliffy Diagram named: memory_storage_figure

딕셔너리 테이블스페이스

All table's meta information is stored in Dictionary Tablespace (SYS_TBS_MEM_DIC), and table header, in the dictionary tablespace, points the location of first memory page.

모든 테이블의 메타 정보는 딕셔너리 테이블스페이스에 있고, 딕셔너리 테이블스페이스의 테이블 헤더는 처음 메모리 페이지의 위치를 가리킨다.

메모리 테이블스페이스

  • Page
    Page is the smallest unit of I/O. Its size is 32KB. 페이지는 IO의 최소 단위이며, 32KB의 크기이다.
  • Extent
    In in-memory db, in constrast to DRDB, it doesn't matter whether pages are allocated physically contigous or not because it costs little for random access in memory. 메모리 DB에서, DRDB와 대조적으로,

An Extent is just a container of memory pages.  익스텐트는 메모리 페이지의 저장소일 뿐이다.

Default memory extent size is 256KB, It means a extent has 8 pages.  메모리 익스텐트의 기본적인 크기는 256KB이고, 하나의 익스텐트는 8개의 페이지를 갖고 있다.

If there is no available extent in the table list, a service thread request a extent to the tablespace. 테이블 리스트에 사용할 수 있는 익스텐트가 없으며, 서비스 쓰레드는 테이블스페이스에 추가 익스텐트를 요청한다.

  • Free Page
    A list that contains free pages of memory tablespace. 이 페이지 리스트는 메모리 테이블스페이스의 여유 페이지를 포함한다.

If free pages are exhausted, ALTIBASE automatically requests memory chunk from OS until it reaches MAXSIZE.

여유공간이 다 소진될 경우, ALTIBASE HDB는 자동적으로

Index segement

인덱스 세그먼트

A container where memory indices resides.

메모리 인덱스가 위치하는 공간이다.

A index does consist of only ordered-pointers, which points the record address in page, and it does not contain the column value.

인덱스는 단지 정렬된 포인터로 구성돼 있으며 페이지에서 레코드의 주소를 가리키며, 컬럼 값을 포함하지 않는다.

Moreover index is not persistent, that means that the memory index in ALTIBASE does not issue any logging when index structure is modified.

더군다나 인덱스는 지속성을 갖고 있지 않으며, ALTIBASE HDB에서 메모리 인덱스는 인덱스 구조가 변경될 때 어떠한 로깅도 하지 않는다는 의미이다.

Because of this feature, ALTIBASE always rebuild its memory indices at startup.

이러한 특징으로, ALTIBASE HDB는 초기 기동시마다 메모리 인덱스를 재구축한다.

Here's a brief comparison between memory index and DRDB index.

아래는 메모리 인덱스와 DRDB 인덱스간의 간략한 비교표이다.

Features Memory index DRDB Index
components ordered-pointers which point physical memory address column value and row logical address that contains the column
persistency volatile persistence
logging no logging logging at every changes
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.