WO2018080187A1 - Apparatus for operating multiple databases of embedded database system, and method therefor - Google Patents

Apparatus for operating multiple databases of embedded database system, and method therefor Download PDF

Info

Publication number
WO2018080187A1
WO2018080187A1 PCT/KR2017/011895 KR2017011895W WO2018080187A1 WO 2018080187 A1 WO2018080187 A1 WO 2018080187A1 KR 2017011895 W KR2017011895 W KR 2017011895W WO 2018080187 A1 WO2018080187 A1 WO 2018080187A1
Authority
WO
WIPO (PCT)
Prior art keywords
database
array
page
manager
data
Prior art date
Application number
PCT/KR2017/011895
Other languages
French (fr)
Korean (ko)
Inventor
김재광
한혁
김동일
진성일
Original Assignee
주식회사 리얼타임테크
현대엠엔소프트 주식회사
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 주식회사 리얼타임테크, 현대엠엔소프트 주식회사 filed Critical 주식회사 리얼타임테크
Publication of WO2018080187A1 publication Critical patent/WO2018080187A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/11File system administration, e.g. details of archiving or snapshots
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/13File access structures, e.g. distributed indices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/172Caching, prefetching or hoarding of files

Definitions

  • the present invention relates to an apparatus and method for operating multiple databases of an embedded database system, and more particularly, to an apparatus and method for operating multiple databases of an embedded database system capable of operating multiple databases simultaneously using a single buffer manager. It is about.
  • a database system is a database overall management system, and a database management system is a major component of a database system that performs a user's data processing needs while managing a database.
  • a database management system is located between a user and a database, and can be classified into a query processor and a storage data manager (or buffer manager) according to functions.
  • FIG. 1 is a view for explaining an embedded database management system according to the prior art.
  • the embedded database management system includes a database 1, a connection manager 10, a query processor 20, a buffer manager 30, and a lower module 40.
  • the database 1 is a file in which data pages are stored, and the connection manager 10 is in charge of database operation.
  • the query processor 20 is responsible for interpreting and processing a user's data processing request, and the buffer manager 30 manages a user database and a data dictionary (information about data stored in the database) stored on disk. In this case, it plays the role of actually accessing.
  • the buffer manager 30 reads the data page loaded in the database 1 or writes to the database 1 when the data page already read is modified, and influences the performance of the database system. It performs data page cache and management.
  • the embedded database management system is composed of an upper module and a lower module based on the buffer manager 30.
  • the upper module is a module using the buffer manager 30, and the lower module is a module used by the buffer manager 30. Therefore, the query processor 20 corresponds to a higher module.
  • the data programming into the multi-plane flash memory of Korea Patent Publication No. 2011-0069049 is a data transfer scheme in which data pages are programmed to allow multiple data pages to be programmed without increasing the size of the page buffers. Allow it to be controlled.
  • Conventional data programming into a multi-plane flash memory includes a number of flash memory devices and is connected to a page buffer through a memory interface, using as many page buffers as the number of flash memory devices.
  • the embedded database management system of the related art generally cannot operate several databases at the same time.
  • a buffer manager is required as many as the number of databases, which consumes a lot of memory resources. There is a problem.
  • the present invention can operate multiple databases at the same time using only one buffer manager, which is an essential configuration for the performance of the embedded database system with limited memory resources, and thus the multiple database operating apparatus of the embedded database system, which can greatly reduce memory usage. It provides a way.
  • the multiple database operating apparatus of the embedded database system includes a plurality of databases loaded with data pages for storing data and assigning page IDs to the data pages;
  • a connection manager that processes database access through dynamic management, including creation or destruction of a database ID for each database when at least one database is running;
  • a plurality of query processors for generating a page request command including the database ID and the page ID to perform a query processing operation including inserting, deleting, changing, and retrieving data in the data page;
  • a buffer manager that selects a corresponding database among a plurality of databases using the database ID according to the page request command, reads the data page using the page ID from the selected database, and caches and manages the data page. It is characterized by including.
  • connection manager further includes a database ID manager that uses an array data structure, sets the array size to the maximum number of databases that can be simultaneously connected, and manages database IDs for distinguishing databases using array cursors. It is characterized by.
  • the database ID manager uses the array cursor as an unsigned short type, sets the range of the array cursor value to 0 to 65535, and includes a statement statement including close and open to control the array cursor. It characterized in that to use.
  • the database ID manager when the array is configured with as many fields as the preset array size, inputs the array cursor by '1' until the database open command is input and an empty field is output from the array. If an empty field is found, the array cursor located in the corresponding field is assigned to a database ID and a database connection is performed. If the database close command is input, the array cursor is located in a field corresponding to the database ID. The database connection is terminated after initializing the field in which the array cursor is located by using a remaining operation using a database ID and an array size.
  • the database ID manager outputs a message indicating that the maximum number of database connections has been exceeded when the database Open command is input but there are no empty fields in the array, and returns a database connection failure.
  • a plurality of submodules are located between the buffer manager and the database to use a lower database using database instructions that perform one or more logical functions, and the buffer manager may be configured in an application programming interface (API). And a submodule manager configured to add a parameter, select one submodule among a plurality of submodules using the database ID, and read a data page through the selected submodule.
  • API application programming interface
  • connection manager uses an array data structure and sets the array size to the maximum number of databases that can be connected at the same time.
  • the submodule manager uses a remaining operation using a database ID and an array size to select one of a plurality of submodules. Selecting a submodule to use.
  • the buffer manager caches a data page by displaying a database ID and a page ID in an internal buffer pool memory, and reads the data page from the buffer pool memory using the page ID and the database ID when re-requesting the data page. It is characterized by coming.
  • the multiple database operating method of the embedded database system connection manager for processing database access to a plurality of databases loaded with data pages, query processing including the insertion, deletion, change, search of data in the data page
  • the connection manager is running in a database. Processing a database access through dynamic management of a database ID for creating or destroying a database ID for distinguishing a plurality of databases to use one buffer manager).
  • the query processor requesting a page request command to a buffer manager using a database ID and a page ID of a data page, and performing a query processing operation including inserting / deleting / modifying / searching data into the requested data page; And the buffer manager adds a parameter of a database ID, selects a corresponding database among a plurality of databases using the database ID according to the page request command, and selects a data page corresponding to a page ID from the selected database. And reading and performing the role of caching and managing the data page in the buffer pool memory.
  • connection manager further includes a database ID manager that uses an array data structure, sets the array size to the maximum number of databases that can be simultaneously connected, and manages database IDs for distinguishing databases using array cursors. It is characterized by.
  • the database ID manager uses the array cursor as an unsigned short type, sets the range of the array cursor value to 0 to 65535, and includes a statement statement including close and open to control the array cursor. It characterized in that to use.
  • the connection manager may process a database access through dynamic management of a database ID for generating or destroying a database ID for distinguishing a plurality of databases in order to use one buffer manager, wherein the array is a field corresponding to a preset array size.
  • the array cursor is set to '1' to check whether the database is connected to the field where the current array cursor is located and to search for an empty field when the database is connected to the field. Increasing; And if there is an empty field in the array, the database cursor is assigned after assigning the value of the array cursor located in the field as the database ID, and if the empty field is not present in the array, the maximum number of database connections is exceeded. Outputting a message informing of the failure, and returning a database connection failure.
  • the connection manager may process a database access through dynamic management of a database ID for generating or destroying a database ID for distinguishing a plurality of databases in order to use one buffer manager, wherein the array is a field corresponding to a preset array size.
  • the database close command is input, an array cursor is positioned in a field corresponding to a database ID, and a database connection is initialized after initializing a field in which the array cursor is located by using the remaining operations using the database ID and the array size. It is characterized by ending.
  • a plurality of submodules is located between the buffer manager and the plurality of databases to use a lower database using database instructions that perform one or more logical functions, and the buffer manager is located in an application programming interface (API).
  • API application programming interface
  • a submodule manager configured to add an ID parameter, select one submodule among a plurality of submodules by using the database ID, and read a data page through the selected submodule.
  • the submodule manager uses a plurality of submodules by using the remaining operations using the database ID and the array size. It is characterized by selecting a sub module to be used.
  • the buffer manager caches a data page by displaying a database ID and a page ID in an internal buffer pool memory, and reads the data page from the buffer pool memory using the page ID and the database ID when re-requesting the data page. It is characterized by coming.
  • the multi-database operating apparatus and method thereof of the embedded database system of the present invention can save multiple memory resources by simultaneously operating several databases using only one buffer manager in an embedded database system having limited memory resources. There is.
  • the present invention applies a database ID to operate multiple databases, manages the database ID using an array data structure and an array cursor, connect the database by designing the range of the array cursor value as wide as 0 ⁇ 65535 It is possible to prevent the buffer manager from malfunctioning without sacrificing performance on / shutdown.
  • the database ID when the database ID is operated, it is dynamically managed only in the program area and is not stored in the database. Therefore, there is no dependency between the plurality of databases. There is an effect that the operation of can be enabled.
  • FIG. 1 is a view for explaining an embedded database management system according to the prior art.
  • FIG. 2 is a diagram illustrating a configuration of an apparatus for operating multiple databases in an embedded database system according to an embodiment of the present invention.
  • FIG. 3 is a diagram illustrating an operation state between a query processor and a buffer manager according to an exemplary embodiment of the present invention.
  • FIG. 4 is a diagram illustrating a method for operating multiple databases of an embedded database system according to an embodiment of the present invention.
  • FIG. 5 is a diagram illustrating a driving state of a database ID manager according to an embodiment of the present invention.
  • FIG. 6 is a diagram illustrating a malfunction state of a buffer pool memory according to a range of array cursor values according to an embodiment of the present invention.
  • first and second are intended to distinguish one component from another component, and the scope of rights should not be limited by these terms.
  • first component may be named a second component, and similarly, the second component may also be named a first component.
  • an identification code (e.g., a, b, c, etc.) is used for convenience of description, and the identification code does not describe the order of the steps, and each step clearly indicates a specific order in context. Unless stated otherwise, they may occur out of the order noted. That is, each step may occur in the same order as specified, may be performed substantially simultaneously, or may be performed in the reverse order.
  • FIG. 2 is a diagram illustrating a configuration of an apparatus for operating multiple databases in an embedded database system according to an embodiment of the present invention.
  • a multi-database operating apparatus of an embedded database system may include a plurality of databases 100, a connection manager 200, a plurality of query processors 300, a buffer manager 400, and a plurality of submodules 500. It includes.
  • the plurality of databases 100 load data pages for storing data and assign page IDs to the data pages.
  • connection manager 200 processes database access through dynamic management including generation and destruction of a database ID for each database 100 when the at least one database 100 is in runtime.
  • connection manager 200 uses an array data structure, sets the array size to the maximum number of databases 100 that can be connected at the same time, and sets a database ID for identifying the database 100 using an array cursor.
  • Database ID manager 210 that creates and manages.
  • the database ID manager 210 allocates and manages a database ID for each database 100 to distinguish which data page is read from which database 100.
  • the plurality of query processors 300 generate a page request command including a database ID and a page ID to perform a query processing operation including inserting, deleting, changing, and retrieving data using the page ID of the data page.
  • the query processor 300 which is an upper module using the buffer manager 400, is provided as many as the number of lower modules 500 used by the buffer manager 400 to use one buffer manager 400.
  • the query processor 300 may manage the page ID and request a corresponding data page from the buffer manager 400 using the page ID when a data page associated with the page ID is needed. In addition, the query processor 300 notifies the buffer manager 400 that the data page has been modified after performing the modification such as inserting / deleting / changing data in the requested data page. Thus, the buffer manager 400 records the modified data page.
  • the buffer manager 400 implements by adding a parameter of a database ID to an application programming interface (API), selects a database 100 to be used using a database ID according to a page request command, and selects a database selected using a page ID. After reading the data page corresponding to the page ID at 100, the data page is cached and managed.
  • API application programming interface
  • the data pages are cached in the buffer pool memory inside the buffer manager 400.
  • the more the data page cache work the better the database access performance, but the more buffer pool memory is consumed. Therefore, in order to operate three databases simultaneously, three 32MB buffer managers were required, so total 96MB of bufferpool memory was consumed. However, in the present invention, only one buffer manager 400 is required. Consumed.
  • the buffer pool memory may be greatly reduced when one buffer manager 400 operates several databases at the same time.
  • the lower module 500 is installed between the buffer manager 400 and the database 100 and uses the lower database 100 by using database commands that perform one or more logical functions.
  • the buffer manager 400 selects one submodule 500 of the plurality of submodules 500 using a database ID, and reads the data page through the selected submodule 500. It includes.
  • FIG. 3 is a diagram illustrating an operation state between a query processor and a buffer manager according to an exemplary embodiment of the present invention.
  • the buffer manager 400 implements by adding a parameter of a database ID to an API, and the query processor 300 adds a database ID together with a page ID to a page request command when using the buffer manager 400. do.
  • the buffer manager 400 performs remaining operations using the database ID and the array size to determine which submodule among the plurality of submodules 500 should be used using the database ID according to the page request command input from the query processor 300.
  • the data page is read through the selected submodule 500.
  • the buffer manager 400 displays a database ID and a page ID to manage the read data page, and when a request for re-request of the data page is received, the buffer manager 400 uses the page ID and the database ID in the buffer pool memory. Find and return exactly.
  • FIG. 4 is a diagram illustrating a method for operating multiple databases of an embedded database system according to an embodiment of the present invention
  • FIG. 5 is a diagram illustrating a driving state of a database ID manager according to an embodiment of the present invention.
  • the database ID manager 210 uses an array cursor as an unsigned short type, sets the range of the array cursor to 0 to 65535, and commands such as Declare / Open / Fetch / Close to control the array cursor. Use sentences.
  • the connection manager 200 sets the array cursor to 0 to 4 when the database open command is input. Move the field in increments of one. If a database is not connected to the field where the array cursor is located and is empty, the value of the corresponding array cursor is assigned as the database ID. When the buffer manager 400 is used in the query processor 300, the parameter of the database ID is added and used.
  • the database ID manager 210 locates an array cursor in a field of array [1] when a Close command for a database having a database ID of '1' is inputted. Initialize the value of the field (array [1]) using the result of the rest of the operation using the array size) and terminate the database connection.
  • the database ID manager 210 dynamically generates / deletes the database ID only in the program area when the at least one database 100 is in operation.
  • the database ID is a database ( 100, there is no dependency between a plurality of databases because they are not stored and managed, thereby enabling operations such as registering / unregistering / exchanging databases without interruption of the database system.
  • the array cursor is the minimum value (0) of the unsigned short and the maximum value of the unsigned short is 65535.
  • the range of values for the array cursor is designed from 0 to 65535, and the range of values is repeated over and over until the database system shuts down.
  • the query processor 300 transmits a page request command to the buffer manager 400 using a database ID and a page ID, and performs a modification such as inserting / deleting / modifying data into a data page corresponding to the requested page ID. After that, the buffer manager 400 is notified that the data page has been modified.
  • the buffer manager 400 implements by adding a parameter of a database ID to the API, and selects a database 100 to be used among the plurality of databases 100 using the database ID according to the page request command (S3 and S4).
  • the buffer manager 400 reads the data page into the buffer pool memory 420 using the page ID in the selected database 100 to cache and manage the data page. (S5) At this time, the buffer manager 400 buffers the buffer pool. By displaying the page ID and database ID of the data page in memory, if the data page is requested again later, the page ID and database ID can be used to accurately find and return the data page.
  • FIG. 6 is a diagram illustrating a malfunction state of a buffer pool memory according to a range of array cursor values according to an embodiment of the present invention.
  • the database ID manager 210 generates a database ID using an array cursor value.
  • the database ID manager 210 repeatedly executes an open / close command.
  • the bufferpool memory of there is a possibility that there are data pages that have the same page ID but are read from different databases.
  • the range of the database ID is also 0 to 2.
  • a database ID [0] is generated according to the database open command, and the data page [0] corresponding to the page ID [0] is read from the database 100 into the buffer pool memory 420. Then, according to the database close command, disconnect the database whose database ID is '0' and initialize array [0]. At this time, the buffer manager 400 is too expensive to initialize the buffer pool memory of a relatively large storage capacity for each database Close command, and thus leaves the data page [0] as it is for performance.
  • the buffer manager 400 reads data page [1] and data page [2] for the database with database IDs '1' and '2' according to the repetition of the database Open / Close command and then array [ 1] and array [2] are initialized, leaving data page [1] and data page [2] in the buffer pool memory.
  • the buffer manager 400 finds and returns the data page [0] remaining in the buffer pool memory, and returns the data page [0] from the buffer pool memory.
  • the database [3] is not read because it is found.
  • the range of the value of the array cursor should be relatively large.
  • the database ID range is 0 to 65535. Malfunction of the buffer pool memory can be prevented.
  • the data page [0] for the database ID in the buffer pool memory disappears as a victim page, and thus finds and returns an invalid data page in the buffer pool memory. It can prevent.

Abstract

The present invention relates to an apparatus for operating multiple databases of an embedded database system, and a method therefor, the apparatus comprising: a plurality of databases into which a data page for storing data is loaded, and which grants a page ID to the data page; a connection manager for performing database access through a dynamic management including generation or removal of a database ID for each database when the at least one database is being operated; a plurality of query processors for generating a page request instruction including the database ID and the page ID so as to perform, on the data page, query processing including insertion, deletion, change, and retrieval of data; and a buffer manager, which selects a corresponding database from among the plurality of databases by using the database ID according to the page request instruction, and reads the data page from the selected database, by using the page ID, so as to cache and manage the data page.

Description

내장형 데이터베이스 시스템의 다중 데이터베이스 운용 장치 및 그 방법Multi-database operating device and method for embedded database system
본 발명은 내장형 데이터베이스 시스템의 다중 데이터베이스 운용 장치 및 그 방법에 관한 것으로, 보다 상세하게는 동시에 여러 개의 데이터베이스를 하나의 버퍼 관리자를 사용하여 운용할 수 있는 내장형 데이터베이스 시스템의 다중 데이터베이스 운용 장치 및 그 방법에 관한 것이다.The present invention relates to an apparatus and method for operating multiple databases of an embedded database system, and more particularly, to an apparatus and method for operating multiple databases of an embedded database system capable of operating multiple databases simultaneously using a single buffer manager. It is about.
데이터베이스 시스템은 데이터베이스 총괄 관리 체계이고, 데이터베이스 관리 시스템은 데이터베이스를 관리하면서 사용자의 데이터 처리 요구를 수행하는 데이터베이스 시스템의 주요 구성 요소이다. 이러한 데이터베이스 관리 시스템은 사용자와 데이터베이스 사이에 위치하며, 기능에 따라 크게 질의 처리기와 저장 데이터 관리자(또는 버퍼 관리자)로 구분할 수 있다.A database system is a database overall management system, and a database management system is a major component of a database system that performs a user's data processing needs while managing a database. Such a database management system is located between a user and a database, and can be classified into a query processor and a storage data manager (or buffer manager) according to functions.
도 1은 종래 기술에 따른 내장형 데이터베이스 관리 시스템을 설명하는 도면이다.1 is a view for explaining an embedded database management system according to the prior art.
도 1을 참고하면, 내장형 데이터베이스 관리 시스템은 데이터베이스(1), 연결관리자(10), 질의처리기(20), 버퍼관리자(30), 하위 모듈(40)을 포함한다. Referring to FIG. 1, the embedded database management system includes a database 1, a connection manager 10, a query processor 20, a buffer manager 30, and a lower module 40.
데이터베이스(1)는 데이터페이지들이 저장된 파일이고, 연결 관리자(10)는 데이터베이스 운용을 담당한다.The database 1 is a file in which data pages are stored, and the connection manager 10 is in charge of database operation.
질의 처리기(20)는 사용자의 데이터 처리 요구를 해석하여 처리하는 역할을 담당하고, 버퍼 관리자(30)는 디스크에 저장되어 있는 사용자 데이터베이스와 데이터 사전(데이터베이스에 저장되는 데이터에 관한 정보)을 관리하고, 실제로 접근하는 역할을 담당한다. The query processor 20 is responsible for interpreting and processing a user's data processing request, and the buffer manager 30 manages a user database and a data dictionary (information about data stored in the database) stored on disk. In this case, it plays the role of actually accessing.
즉, 버퍼 관리자(30)는 데이터베이스(1)에 적재된 데이터페이지를 읽어오거나, 이미 읽어들인 데이터페이지가 수정된 경우에 데이터베이스(1)에 기록하는 역할을 수행하며, 데이터베이스 시스템의 성능을 좌우하는 데이터 페이지 캐시 및 관리 역할을 수행한다. That is, the buffer manager 30 reads the data page loaded in the database 1 or writes to the database 1 when the data page already read is modified, and influences the performance of the database system. It performs data page cache and management.
내장형 데이터베이스 관리 시스템은 버퍼 관리자(30)를 기준으로 상위 모듈과 하위 모듈로 구성되는데, 상위 모듈은 버퍼 관리자(30)를 사용하는 모듈이고, 하위 모듈은 버퍼 관리자(30)가 사용하는 모듈이다. 따라서, 질의처리기(20)는 상위 모듈에 해당한다. The embedded database management system is composed of an upper module and a lower module based on the buffer manager 30. The upper module is a module using the buffer manager 30, and the lower module is a module used by the buffer manager 30. Therefore, the query processor 20 corresponds to a higher module.
이러한 내장형 데이터베이스 관리 시스템은 데이터베이스마다 버퍼 관리자(30)가 필요하므로, 3개의 데이터베이스(1)를 동시에 운영할 경우에 3개의 버퍼 관리자(300가 필요하다. 일례로, 내장형 데이터베이스 관리 시스템은 버퍼 관리자(30)의 버퍼풀 메모리가 32MB인 경우에 3개의 데이터베이스(1)를 동시에 운영하기 위해 필요한 버퍼 관리자의 버퍼풀 메모리는 총 96MB가 소모됨을 알 수 있다. Since such an embedded database management system requires a buffer manager 30 for each database, three buffer managers 300 are required when operating three databases 1 at the same time. In the case where the buffer pool memory of 30) is 32MB, it can be seen that the buffer pool memory of the buffer manager required to operate three databases 1 simultaneously consumes 96MB in total.
한편, 한국공개특허 제2011-0069049호의 다중-평면 플래시 메모리 내로의 데이터 프로그래밍은 다중 데이터 페이지들이 페이지 버퍼들의 크기를 증가시키기 위한 필요없이 프로그래밍이 되는 것을 허용하도록 데이터 페이지들이 프로그래밍이 되는 데이터 전송 방식이 조종될 수 있도록 한다. On the other hand, the data programming into the multi-plane flash memory of Korea Patent Publication No. 2011-0069049 is a data transfer scheme in which data pages are programmed to allow multiple data pages to be programmed without increasing the size of the page buffers. Allow it to be controlled.
종래의 다중-평면 플래시 메모리 내로의 데이터 프로그래밍은 다수의 플래시 메모리 디바이스를 포함하고, 메모리 인터페이스를 통해 페이지 버퍼에 연결되는데, 플래시 메모리 디바이스의 개수 만큼 페이지 버퍼를 사용하고 있다.Conventional data programming into a multi-plane flash memory includes a number of flash memory devices and is connected to a page buffer through a memory interface, using as many page buffers as the number of flash memory devices.
이와 같이, 종래 기술의 내장형 데이터베이스 관리 시스템은 통상적으로 동시에 여러 개의 데이터베이스를 운용할 수 없지만, 동시에 여러 개의 데이터베이스를 운용하고자 할 경우에 데이터베이스의 개수만큼 버퍼 관리자가 필요하므로 그만큼 메모리 자원을 많이 소모하게 되는 문제점이 있다. As such, the embedded database management system of the related art generally cannot operate several databases at the same time. However, when operating several databases at the same time, a buffer manager is required as many as the number of databases, which consumes a lot of memory resources. There is a problem.
본 발명은 메모리 자원이 제한적인 내장형 데이터베이스 시스템의 성능을 위한 필수 구성인 버퍼 관리자를 1개만 사용하여 동시에 여러 개의 데이터베이스를 운용할 수 있어 메모리 사용량을 크게 줄일 수 있는 내장형 데이터베이스 시스템의 다중 데이터베이스 운용 장치 및 그 방법을 제공한다. The present invention can operate multiple databases at the same time using only one buffer manager, which is an essential configuration for the performance of the embedded database system with limited memory resources, and thus the multiple database operating apparatus of the embedded database system, which can greatly reduce memory usage. It provides a way.
실시예들 중에서, 내장형 데이터베이스 시스템의 다중 데이터베이스 운용 장치는, 데이터를 저장하기 위한 데이터페이지가 적재되고, 상기 데이터페이지에 페이지 ID를 부여하는 복수의 데이터베이스; 적어도 하나 이상의 데이터베이스를 운영중(Runtime)일 경우에 각 데이터베이스에 대한 데이터베이스 ID의 생성 또는 소멸을 포함한 동적 관리를 통해 데이터베이스 접근을 처리하는 연결관리자; 상기 데이터페이지에 데이터의 삽입, 삭제, 변경, 검색을 포함한 질의처리 작업을 수행하도록 상기 데이터베이스 ID와 페이지 ID를 포함한 페이지요청명령을 발생하는 복수의 질의처리기; 및 상기 페이지요청명령에 따라 상기 데이터베이스 ID를 이용하여 복수의 데이터베이스 중 해당 데이터베이스를 선택하고, 상기 선택된 데이터베이스에서 상기 페이지 ID를 이용하여 데이터페이지를 읽어들여 데이터페이지의 캐시 및 관리를 수행하는 버퍼 관리자를 포함하는 것을 특징으로 한다. Among the embodiments, the multiple database operating apparatus of the embedded database system includes a plurality of databases loaded with data pages for storing data and assigning page IDs to the data pages; A connection manager that processes database access through dynamic management, including creation or destruction of a database ID for each database when at least one database is running; A plurality of query processors for generating a page request command including the database ID and the page ID to perform a query processing operation including inserting, deleting, changing, and retrieving data in the data page; And a buffer manager that selects a corresponding database among a plurality of databases using the database ID according to the page request command, reads the data page using the page ID from the selected database, and caches and manages the data page. It is characterized by including.
상기 연결관리자는 어레이(Array) 자료 구조를 사용하고, 어레이 크기를 동시에 연결 가능한 데이터베이스의 최대 개수로 설정하며, 어레이 커서를 사용하여 데이터베이스를 구분하기 위한 데이터베이스 ID를 관리하는 데이터베이스ID 관리자를 더 포함하는 것을 특징으로 한다. The connection manager further includes a database ID manager that uses an array data structure, sets the array size to the maximum number of databases that can be simultaneously connected, and manages database IDs for distinguishing databases using array cursors. It is characterized by.
상기 데이터베이스ID 관리자는, 상기 어레이 커서를 언사인드 쇼트(Unsigned Short) 타입으로 사용하고, 상기 어레이 커서 값의 범위를 0~65535로 설정하며, 상기 어레이 커서를 제어하기 위한 Close 및 Open을 포함한 명령어 문장을 사용하는 것을 특징으로 한다. The database ID manager uses the array cursor as an unsigned short type, sets the range of the array cursor value to 0 to 65535, and includes a statement statement including close and open to control the array cursor. It characterized in that to use.
상기 데이터베이스ID 관리자는 상기 어레이가 기설정된 어레이 크기만큼의 필드로 구성된 경우에, 상기 데이터베이스 Open 명령어가 입력되면 상기 어레이에서 데이터베이스가 연결되지 않고 비어있는 필드가 나올 때까지 상기 어레이 커서를 '1' 씩 증가시키고, 비어있는 필드가 발견되면 해당 필드에 위치한 어레이 커서의 값을 데이터베이스ID로 할당한 후 데이터베이스 연결을 수행하고, 상기 데이터베이스 Close 명령어가 입력되면 데이터베이스ID에 해당하는 필드에 어레이 커서가 위치하고, 상기 데이터베이스ID와 어레이 크기를 이용한 나머지 연산을 이용하여 상기 어레이 커서가 위치한 필드를 초기화한 후 데이터베이스 연결을 종료하는 것을 특징으로 한다. The database ID manager, when the array is configured with as many fields as the preset array size, inputs the array cursor by '1' until the database open command is input and an empty field is output from the array. If an empty field is found, the array cursor located in the corresponding field is assigned to a database ID and a database connection is performed. If the database close command is input, the array cursor is located in a field corresponding to the database ID. The database connection is terminated after initializing the field in which the array cursor is located by using a remaining operation using a database ID and an array size.
상기 데이터베이스ID 관리자는 상기 데이터베이스 Open 명령어가 입력되었지만 어레이에 비어있는 필드가 없는 경우에 데이터베이스 연결 가능한 최대 개수를 초과하였음을 알리는 메시지를 출력하고, 데이터베이스 연결 실패를 반환하는 것을 특징으로 한다. The database ID manager outputs a message indicating that the maximum number of database connections has been exceeded when the database Open command is input but there are no empty fields in the array, and returns a database connection failure.
상기 버퍼 관리자와 데이터베이스 사이에는 하나 또는 그 이상의 논리적 기능들을 수행하는 데이터베이스 명령어들을 이용하여 하위의 데이터베이스를 사용하도록 하는 복수의 하위 모듈이 위치하고, 상기 버퍼 관리자는 API(application programming interface)에 상기 데이터베이스 ID의 파라미터를 추가하여 구현하고, 상기 데이터베이스ID를 이용하여 복수의 하위 모듈 중 하나의 하위 모듈을 선택하고, 상기 선택된 하위 모듈을 통해 데이터페이지를 읽어오도록 하는 하위모듈 관리자를 포함하는 것을 특징으로 한다. A plurality of submodules are located between the buffer manager and the database to use a lower database using database instructions that perform one or more logical functions, and the buffer manager may be configured in an application programming interface (API). And a submodule manager configured to add a parameter, select one submodule among a plurality of submodules using the database ID, and read a data page through the selected submodule.
상기 연결관리자는 어레이(Array) 자료 구조를 사용하고, 어레이 크기를 동시에 연결 가능한 데이터베이스의 최대 개수로 설정하며, 상기 하위 모듈 관리자는 데이터베이스ID와 어레이 크기를 이용한 나머지 연산을 이용하여 복수의 하위 모듈 중 사용할 하위 모듈을 선택하는 것을 특징으로 한다. The connection manager uses an array data structure and sets the array size to the maximum number of databases that can be connected at the same time. The submodule manager uses a remaining operation using a database ID and an array size to select one of a plurality of submodules. Selecting a submodule to use.
상기 버퍼 관리자는 내부의 버퍼풀 메모리에 데이터베이스ID와 페이지 ID를 표시하여 데이터페이지를 캐시하고, 해당 데이터페이지의 재요청시 상기 페이지 ID와 데이터베이스 ID를 이용하여 상기 버퍼풀 메모리에서 상기 데이터페이지를 읽어오는 것을 특징으로 한다.The buffer manager caches a data page by displaying a database ID and a page ID in an internal buffer pool memory, and reads the data page from the buffer pool memory using the page ID and the database ID when re-requesting the data page. It is characterized by coming.
실시예들 중에서, 내장형 데이터베이스 시스템의 다중 데이터베이스 운용 방법은, 데이터페이지가 적재된 복수의 데이터베이스에 대한 데이터베이스 접근을 처리하는 연결관리자, 상기 데이터페이지에 데이터의 삽입, 삭제, 변경, 검색을 포함한 질의처리 작업을 수행하는 질의처리기 및 상기 데이터베이스에서 데이터페이지를 읽어들여 데이터페이지의 캐시 및 관리를 수행하는 버퍼 관리자를 포함하는 내장형 데이터베이스 시스템의 다중 데이터베이스 운용 방법에 있어서, 상기 연결 관리자는 데이터베이스의 운영중(RunTime)에 하나의 버퍼 관리자를 사용하기 위해 복수의 데이터베이스를 구분하는 데이터베이스ID를 생성 또는 소멸하는 데이터베이스 ID의 동적 관리를 통해 데이터베이스 접근을 처리하는 단계; 상기 질의 처리기는 데이터베이스 ID와 데이터페이지의 페이지 ID를 이용하여 페이지요청명령을 버퍼 관리자에 요청하고, 상기 요청된 데이터페이지에 데이터의 삽입/삭제/변경/검색을 포함한 질의처리 작업을 수행하는 단계; 및 상기 버퍼 관리자는 데이터베이스 ID의 파라미터를 추가하여 구현하고, 상기 페이지요청명령에 따라 상기 데이터베이스ID를 이용하여 복수의 데이터베이스 중 해당되는 데이터베이스를 선택하고, 상기 선택된 데이터베이스에서 페이지 ID에 해당하는 데이터페이지를 읽어들여 버퍼풀 메모리에 상기 데이터페이지의 캐시 및 관리 역할을 수행하는 단계를 포함하는 것을 특징으로 한다. Among the embodiments, the multiple database operating method of the embedded database system, connection manager for processing database access to a plurality of databases loaded with data pages, query processing including the insertion, deletion, change, search of data in the data page In a multi-database operating method of an embedded database system including a query processor that performs a task and a buffer manager that reads a data page from the database and caches and manages the data page, the connection manager is running in a database. Processing a database access through dynamic management of a database ID for creating or destroying a database ID for distinguishing a plurality of databases to use one buffer manager). The query processor requesting a page request command to a buffer manager using a database ID and a page ID of a data page, and performing a query processing operation including inserting / deleting / modifying / searching data into the requested data page; And the buffer manager adds a parameter of a database ID, selects a corresponding database among a plurality of databases using the database ID according to the page request command, and selects a data page corresponding to a page ID from the selected database. And reading and performing the role of caching and managing the data page in the buffer pool memory.
상기 연결관리자는 어레이(Array) 자료 구조를 사용하고, 어레이 크기를 동시에 연결 가능한 데이터베이스의 최대 개수로 설정하며, 어레이 커서를 사용하여 데이터베이스를 구분하기 위한 데이터베이스 ID를 관리하는 데이터베이스ID 관리자를 더 포함하는 것을 특징으로 한다. The connection manager further includes a database ID manager that uses an array data structure, sets the array size to the maximum number of databases that can be simultaneously connected, and manages database IDs for distinguishing databases using array cursors. It is characterized by.
상기 데이터베이스ID 관리자는, 상기 어레이 커서를 언사인드 쇼트(Unsigned Short) 타입으로 사용하고, 상기 어레이 커서 값의 범위를 0~65535로 설정하며, 상기 어레이 커서를 제어하기 위한 Close 및 Open을 포함한 명령어 문장을 사용하는 것을 특징으로 한다. The database ID manager uses the array cursor as an unsigned short type, sets the range of the array cursor value to 0 to 65535, and includes a statement statement including close and open to control the array cursor. It characterized in that to use.
상기 연결 관리자는 하나의 버퍼 관리자를 사용하기 위해 복수의 데이터베이스를 구분하는 데이터베이스ID를 생성 또는 소멸하는 데이터베이스 ID의 동적 관리를 통해 데이터베이스 접근을 처리하는 단계는, 상기 어레이가 기설정된 어레이 크기만큼의 필드로 구성된 경우에, 상기 데이터베이스 Open 명령어가 입력되면 현재 어레이 커서가 위치한 필드에 데이터베이스가 연결되었는지를 확인하고, 해당 필드에 데이터베이스가 연결된 경우에 비어있는 필드를 검색하기 위해 상기 어레이 커서를 '1' 씩 증가시키는 단계; 및 상기 어레이에서 비어있는 필드가 있는 경우에 해당 필드에 위치한 어레이 커서의 값을 데이터베이스ID로 할당한 후 데이터베이스 연결을 수행하고, 상기 어레이에 비어있는 필드가 없는 경우에 데이터베이스 연결 가능한 최대 개수를 초과하였음을 알리는 메시지를 출력하고, 데이터베이스 연결 실패를 반환하는 단계를 포함하는 것을 특징으로 한다. The connection manager may process a database access through dynamic management of a database ID for generating or destroying a database ID for distinguishing a plurality of databases in order to use one buffer manager, wherein the array is a field corresponding to a preset array size. When the database Open command is input, the array cursor is set to '1' to check whether the database is connected to the field where the current array cursor is located and to search for an empty field when the database is connected to the field. Increasing; And if there is an empty field in the array, the database cursor is assigned after assigning the value of the array cursor located in the field as the database ID, and if the empty field is not present in the array, the maximum number of database connections is exceeded. Outputting a message informing of the failure, and returning a database connection failure.
상기 연결 관리자는 하나의 버퍼 관리자를 사용하기 위해 복수의 데이터베이스를 구분하는 데이터베이스ID를 생성 또는 소멸하는 데이터베이스 ID의 동적 관리를 통해 데이터베이스 접근을 처리하는 단계는, 상기 어레이가 기설정된 어레이 크기만큼의 필드로 구성된 경우에, 상기 데이터베이스 Close 명령어가 입력되면 데이터베이스ID에 해당하는 필드에 어레이 커서가 위치하고, 상기 데이터베이스ID와 어레이 크기를 이용한 나머지 연산을 이용하여 상기 어레이 커서가 위치한 필드를 초기화한 후 데이터베이스 연결을 종료하는 것을 특징으로 한다. The connection manager may process a database access through dynamic management of a database ID for generating or destroying a database ID for distinguishing a plurality of databases in order to use one buffer manager, wherein the array is a field corresponding to a preset array size. When the database close command is input, an array cursor is positioned in a field corresponding to a database ID, and a database connection is initialized after initializing a field in which the array cursor is located by using the remaining operations using the database ID and the array size. It is characterized by ending.
상기 버퍼 관리자와 복수의 데이터베이스 사이에는 하나 또는 그 이상의 논리적 기능들을 수행하는 데이터베이스 명령어들을 이용하여 하위의 데이터베이스를 사용하도록 하는 복수의 하위 모듈이 위치하고, 상기 버퍼 관리자는 API(application programming interface)에 상기 데이터베이스 ID의 파라미터를 추가하여 구현하고, 상기 데이터베이스ID를 이용하여 복수의 하위 모듈 중 하나의 하위 모듈을 선택하고, 상기 선택된 하위 모듈을 통해 데이터페이지를 읽어오도록 하는 하위모듈 관리자를 포함하는 것을 특징으로 한다. A plurality of submodules is located between the buffer manager and the plurality of databases to use a lower database using database instructions that perform one or more logical functions, and the buffer manager is located in an application programming interface (API). And a submodule manager configured to add an ID parameter, select one submodule among a plurality of submodules by using the database ID, and read a data page through the selected submodule. .
상기 연결관리자가 어레이(Array) 자료 구조를 사용하고, 어레이 크기를 동시에 연결 가능한 데이터베이스의 최대 개수로 설정한 경우에 상기 하위 모듈 관리자는 데이터베이스ID와 어레이 크기를 이용한 나머지 연산을 이용하여 복수의 하위 모듈 중 사용할 하위 모듈을 선택하는 것을 특징으로 한다. When the connection manager uses an array data structure and sets the array size to the maximum number of databases that can be simultaneously connected, the submodule manager uses a plurality of submodules by using the remaining operations using the database ID and the array size. It is characterized by selecting a sub module to be used.
상기 버퍼 관리자는 내부의 버퍼풀 메모리에 데이터베이스ID와 페이지 ID를 표시하여 데이터페이지를 캐시하고, 해당 데이터페이지의 재요청시 상기 페이지 ID와 데이터베이스 ID를 이용하여 상기 버퍼풀 메모리에서 상기 데이터페이지를 읽어오는 것을 특징으로 한다. The buffer manager caches a data page by displaying a database ID and a page ID in an internal buffer pool memory, and reads the data page from the buffer pool memory using the page ID and the database ID when re-requesting the data page. It is characterized by coming.
본 발명의 내장형 데이터베이스 시스템의 다중 데이터베이스 운용 장치 및 그 방법은, 메모리 자원이 제한적인 내장형 데이터베이스 시스템에서 하나의 버퍼 관리자만을 이용하여 여러 개의 데이터베이스를 동시에 운용할 수 있어 많은 메모리 자원을 절약할 수 있는 효과가 있다.The multi-database operating apparatus and method thereof of the embedded database system of the present invention can save multiple memory resources by simultaneously operating several databases using only one buffer manager in an embedded database system having limited memory resources. There is.
또한, 본 발명은 여러 개의 데이터베이스를 운용하기 위해 데이터베이스ID를 적용하고, 어레이 자료 구조와 어레이 커서를 사용하여 데이터베이스ID를 관리하며, 어레이 커서 값의 범위를 0~65535로 최대한 넓게 설계하여 데이터베이스의 연결/종료에 대한 성능을 떨어뜨리지 않으면서 버퍼 관리자의 오동작을 방지할 수 있는 효과가 있다. In addition, the present invention applies a database ID to operate multiple databases, manages the database ID using an array data structure and an array cursor, connect the database by designing the range of the array cursor value as wide as 0 ~ 65535 It is possible to prevent the buffer manager from malfunctioning without sacrificing performance on / shutdown.
본 발명은 데이터베이스ID를 운영중일 때 동적으로 프로그램 영역 내에서만 관리하고 데이터베이스에 저장되지 않기 때문에 복수의 데이터베이스 간에 어떠한 의존성도 존재하지 않고, 그로 인해 데이터베이스 시스템의 중단없이 데이터베이스를 등록/등록해제/교환 등의 동작이 가능해질 수 있는 효과가 있다. In the present invention, when the database ID is operated, it is dynamically managed only in the program area and is not stored in the database. Therefore, there is no dependency between the plurality of databases. There is an effect that the operation of can be enabled.
도 1은 종래 기술에 따른 내장형 데이터베이스 관리 시스템을 설명하는 도면이다.1 is a view for explaining an embedded database management system according to the prior art.
도 2는 본 발명의 일 실시예에 따른 내장형 데이터베이스 시스템의 다중 데이터베이스 운용 장치의 구성을 설명하는 도면이다.2 is a diagram illustrating a configuration of an apparatus for operating multiple databases in an embedded database system according to an embodiment of the present invention.
도 3은 본 발명의 일 실시예에 따른 질의처리기와 버퍼관리자 간의 동작 상태를 설명하는 도면이다.3 is a diagram illustrating an operation state between a query processor and a buffer manager according to an exemplary embodiment of the present invention.
도 4는 본 발명의 일 실시예에 따른 내장형 데이터베이스 시스템의 다중 데이터베이스 운용 방법을 설명하는 도면이다.4 is a diagram illustrating a method for operating multiple databases of an embedded database system according to an embodiment of the present invention.
도 5는 본 발명의 일 실시예에 따른 데이터베이스ID 관리자의 구동 상태를 설명하는 도면이다.5 is a diagram illustrating a driving state of a database ID manager according to an embodiment of the present invention.
도 6은 본 발명의 일 실시예에 따른 어레이 커서 값의 범위에 따른 버퍼풀 메모리의 오동작 상태를 설명하는 도면이다.6 is a diagram illustrating a malfunction state of a buffer pool memory according to a range of array cursor values according to an embodiment of the present invention.
본 발명에 관한 설명은 구조적 내지 기능적 설명을 위한 실시예에 불과하므로, 본 발명의 권리범위는 본문에 설명된 실시예에 의하여 제한되는 것으로 해석되어서는 아니 된다. 즉, 실시예는 다양한 변경이 가능하고 여러 가지 형태를 가질 수 있으므로 본 발명의 권리범위는 기술적 사상을 실현할 수 있는 균등물들을 포함하는 것으로 이해되어야 한다. 또한, 본 발명에서 제시된 목적 또는 효과는 특정 실시예가 이를 전부 포함하여야 한다거나 그러한 효과만을 포함하여야 한다는 의미는 아니므로, 본 발명의 권리범위는 이에 의하여 제한되는 것으로 이해되어서는 아니 될 것이다.Description of the present invention is only an embodiment for structural or functional description, the scope of the present invention should not be construed as limited by the embodiments described in the text. That is, since the embodiments may be variously modified and may have various forms, the scope of the present invention should be understood to include equivalents capable of realizing the technical idea. In addition, the objects or effects presented in the present invention does not mean that a specific embodiment should include all or only such effects, the scope of the present invention should not be understood as being limited thereby.
한편, 본 발명에서 서술되는 용어의 의미는 다음과 같이 이해되어야 할 것이다.On the other hand, the meaning of the terms described in the present invention will be understood as follows.
"제1", "제2" 등의 용어는 하나의 구성요소를 다른 구성요소로부터 구별하기 위한 것으로, 이들 용어들에 의해 권리범위가 한정되어서는 아니 된다. 예를 들어, 제1 구성요소는 제2 구성요소로 명명될 수 있고, 유사하게 제2 구성요소도 제1 구성요소로 명명될 수 있다.Terms such as "first" and "second" are intended to distinguish one component from another component, and the scope of rights should not be limited by these terms. For example, the first component may be named a second component, and similarly, the second component may also be named a first component.
어떤 구성요소가 다른 구성요소에 "연결되어"있다고 언급된 때에는, 그 다른 구성요소에 직접적으로 연결될 수도 있지만, 중간에 다른 구성요소가 존재할 수도 있다고 이해되어야 할 것이다. 반면에, 어떤 구성요소가 다른 구성요소에 "직접 연결되어"있다고 언급된 때에는 중간에 다른 구성요소가 존재하지 않는 것으로 이해되어야 할 것이다. 한편, 구성요소들 간의 관계를 설명하는 다른 표현들, 즉 "~사이에"와 "바로 ~사이에" 또는 "~에 이웃하는"과 "~에 직접 이웃하는" 등도 마찬가지로 해석되어야 한다.When a component is referred to as being "connected" to another component, it should be understood that there may be other components in between, although it may be directly connected to the other component. On the other hand, when a component is referred to as being "directly connected" to another component, it should be understood that there is no other component in between. On the other hand, other expressions describing the relationship between the components, such as "between" and "immediately between" or "neighboring to" and "directly neighboring to", should be interpreted as well.
단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한 복수의 표현을 포함하는 것으로 이해되어야 하고, "포함하다"또는 "가지다" 등의 용어는 설시된 특징, 숫자, 단계, 동작, 구성요소, 부분품 또는 이들을 조합한 것이 존재함을 지정하려는 것이며, 하나 또는 그 이상의 다른 특징이나 숫자, 단계, 동작, 구성요소, 부분품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다.Singular expressions should be understood to include plural expressions unless the context clearly indicates otherwise, and terms such as "comprise" or "have" refer to features, numbers, steps, operations, components, parts, or parts thereof described. It is to be understood that the combination is intended to be present and does not exclude in advance the possibility of the presence or addition of one or more other features or numbers, steps, operations, components, parts or combinations thereof.
각 단계들에 있어 식별부호(예를 들어, a, b, c 등)는 설명의 편의를 위하여 사용되는 것으로 식별부호는 각 단계들의 순서를 설명하는 것이 아니며, 각 단계들은 문맥상 명백하게 특정 순서를 기재하지 않는 이상 명기된 순서와 다르게 일어날 수 있다. 즉, 각 단계들은 명기된 순서와 동일하게 일어날 수도 있고 실질적으로 동시에 수행될 수도 있으며 반대의 순서대로 수행될 수도 있다.In each step, an identification code (e.g., a, b, c, etc.) is used for convenience of description, and the identification code does not describe the order of the steps, and each step clearly indicates a specific order in context. Unless stated otherwise, they may occur out of the order noted. That is, each step may occur in the same order as specified, may be performed substantially simultaneously, or may be performed in the reverse order.
여기서 사용되는 모든 용어들은 다르게 정의되지 않는 한, 본 발명이 속하는 분야에서 통상의 지식을 가진 자에 의해 일반적으로 이해되는 것과 동일한 의미를 가진다. 일반적으로 사용되는 사전에 정의되어 있는 용어들은 관련 기술의 문맥상 가지는 의미와 일치하는 것으로 해석되어야 하며, 본 발명에서 명백하게 정의하지 않는 한 이상적이거나 과도하게 형식적인 의미를 지니는 것으로 해석될 수 없다.All terms used herein have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. Generally, the terms defined in the dictionary used are to be interpreted as being consistent with the meanings in the context of the related art, and should not be interpreted as having ideal or excessively formal meanings unless clearly defined in the present invention.
도 2는 본 발명의 일 실시예에 따른 내장형 데이터베이스 시스템의 다중 데이터베이스 운용 장치의 구성을 설명하는 도면이다.2 is a diagram illustrating a configuration of an apparatus for operating multiple databases in an embedded database system according to an embodiment of the present invention.
도 2를 참고하면, 내장형 데이터베이스 시스템의 다중 데이터베이스 운용 장치는, 복수의 데이터베이스(100), 연결 관리자(200), 복수의 질의 처리기(300), 버퍼 관리자(400) 및 복수의 하위 모듈(500)을 포함한다. Referring to FIG. 2, a multi-database operating apparatus of an embedded database system may include a plurality of databases 100, a connection manager 200, a plurality of query processors 300, a buffer manager 400, and a plurality of submodules 500. It includes.
복수의 데이터베이스(100)는 데이터를 저장하기 위한 데이터페이지를 적재하고, 데이터페이지에 페이지 ID를 부여한다. The plurality of databases 100 load data pages for storing data and assign page IDs to the data pages.
연결 관리자(200)는 적어도 하나 이상의 데이터베이스(100)를 운영중(Runtime)일 경우에 각 데이터베이스(100)에 대한 데이터베이스 ID의 생성 및 소멸을 포함한 동적 관리를 통해 데이터베이스 접근을 처리한다. The connection manager 200 processes database access through dynamic management including generation and destruction of a database ID for each database 100 when the at least one database 100 is in runtime.
이러한 연결 관리자(200)는 어레이(Array) 자료 구조를 사용하고, 어레이 크기를 동시에 연결 가능한 데이터베이스(100)의 최대 개수로 설정하며, 어레이 커서를 사용하여 데이터베이스(100)를 구분하기 위한 데이터베이스 ID를 생성 및 관리하는 데이터베이스ID 관리자(210)를 포함한다. The connection manager 200 uses an array data structure, sets the array size to the maximum number of databases 100 that can be connected at the same time, and sets a database ID for identifying the database 100 using an array cursor. Database ID manager 210 that creates and manages.
버퍼 관리자(400)의 버퍼풀 메모리에 페이지 ID가 동일하지만 서로 다른 데이터베이스(100)에서 읽어들인 데이터페이지들이 혼재되어 있다. 따라서, 데이터베이스ID 관리자(210)는 동시에 여러 개의 데이터베이스(100)를 사용할 경우에, 어떤 데이터베이스(100)에서 읽어들인 데이터페이지인지를 구분하기 위해 각 데이터베이스(100)에 데이터베이스 ID를 할당하여 관리한다. Although the page ID is the same in the buffer pool memory of the buffer manager 400, data pages read from different databases 100 are mixed. Therefore, when using multiple databases 100 at the same time, the database ID manager 210 allocates and manages a database ID for each database 100 to distinguish which data page is read from which database 100.
복수의 질의 처리기(300)는 데이터페이지의 페이지 ID를 이용하여 데이터의 삽입, 삭제, 변경, 검색을 포함한 질의처리 작업을 수행하도록 데이터베이스 ID와 페이지 ID를 포함한 페이지요청명령을 발생한다. 이때, 버퍼 관리자(400)를 사용하는 상위 모듈인 질의 처리기(300)는 하나의 버퍼 관리자(400)를 사용하기 위해 버퍼 관리자(400)가 사용하는 하위 모듈(500)의 개수만큼 구비된다. The plurality of query processors 300 generate a page request command including a database ID and a page ID to perform a query processing operation including inserting, deleting, changing, and retrieving data using the page ID of the data page. In this case, the query processor 300, which is an upper module using the buffer manager 400, is provided as many as the number of lower modules 500 used by the buffer manager 400 to use one buffer manager 400.
이러한 질의 처리기(300)는 페이지 ID를 관리하고, 페이지 ID와 연관된 데이터페이지가 필요할 경우에 페이지 ID를 이용하여 버퍼 관리자(400)에게 해당 데이터페이지를 요청할 수 있다. 또한, 질의 처리기(300)는 요청한 데이터페이지에 데이터의 삽입/삭제/변경 등의 수정을 수행한 후 버퍼 관리자(400)에게 해당 데이터페이지가 수정되었음을 알린다. 따라서, 버퍼 관리자(400)는 수정된 데이터페이지를 기록하게 된다.The query processor 300 may manage the page ID and request a corresponding data page from the buffer manager 400 using the page ID when a data page associated with the page ID is needed. In addition, the query processor 300 notifies the buffer manager 400 that the data page has been modified after performing the modification such as inserting / deleting / changing data in the requested data page. Thus, the buffer manager 400 records the modified data page.
버퍼 관리자(400)는 API(application programming interface)에 데이터베이스 ID의 파라미터를 추가하여 구현하고, 페이지요청명령에 따라 데이터베이스 ID를 이용하여 사용해야 할 데이터베이스(100)를 선택하며, 페이지 ID를 이용하여 선택된 데이터베이스(100)에서 페이지 ID에 해당하는 데이터페이지를 읽어온 후 해당 데이터페이지의 캐시 및 관리를 수행한다.The buffer manager 400 implements by adding a parameter of a database ID to an application programming interface (API), selects a database 100 to be used using a database ID according to a page request command, and selects a database selected using a page ID. After reading the data page corresponding to the page ID at 100, the data page is cached and managed.
데이터페이지는 버퍼 관리자(400)의 내부에 있는 버퍼풀 메모리에 캐시되며, 버퍼 관리자(400)는 데이터 페이지 캐시 작업을 많이 할수록 데이터베이스 접근 성능은 좋아지지만 그만큼 많은 버퍼풀 메모리를 많이 소모하게 된다. 따라서 기존에는 3개의 데이터베이스를 동시에 운용하기 위해서는 32MB의 버퍼 관리자가 3개 필요하였기 때문에 총 96MB의 버퍼풀 메모리를 소모하였으나, 본 발명에서는 1개의 버퍼 관리자(400)만 필요하므로 32MB의 버퍼풀 메모리를 소모하게 된다. The data pages are cached in the buffer pool memory inside the buffer manager 400. The more the data page cache work, the better the database access performance, but the more buffer pool memory is consumed. Therefore, in order to operate three databases simultaneously, three 32MB buffer managers were required, so total 96MB of bufferpool memory was consumed. However, in the present invention, only one buffer manager 400 is required. Consumed.
일반적으로, 내장형 데이터베이스 시스템이 사용하는 대부분의 메모리는 버퍼풀 메모리가 차지하고 있으므로 하나의 버퍼 관리자(400)가 동시에 여러 개의 데이터베이스를 운영할 경우에 버퍼풀 메모리의 사용량을 크게 줄일 수 있다. In general, since most of the memory used by the embedded database system is occupied by the buffer pool memory, the buffer pool memory may be greatly reduced when one buffer manager 400 operates several databases at the same time.
하위 모듈(500)은 버퍼 관리자(400)와 데이터베이스(100) 사이에 설치되고, 하나 또는 그 이상의 논리적 기능들을 수행하는 데이터베이스 명령어들을 이용하여 하위의 데이터베이스(100)를 사용하도록 한다. The lower module 500 is installed between the buffer manager 400 and the database 100 and uses the lower database 100 by using database commands that perform one or more logical functions.
버퍼 관리자(400)는 데이터베이스ID를 이용하여 복수의 하위 모듈(500) 중 하나의 하위 모듈(500)을 선택하고, 선택된 하위 모듈(500)을 통해 데이터페이지를 읽어오도록 하는 하위모듈 관리자(410)를 포함한다. The buffer manager 400 selects one submodule 500 of the plurality of submodules 500 using a database ID, and reads the data page through the selected submodule 500. It includes.
도 3은 본 발명의 일 실시예에 따른 질의처리기와 버퍼관리자 간의 동작 상태를 설명하는 도면이다.3 is a diagram illustrating an operation state between a query processor and a buffer manager according to an exemplary embodiment of the present invention.
도 3을 참고하면, 버퍼 관리자(400)는 API에 데이터베이스ID의 파라미터를 추가하여 구현하고, 질의 처리기(300)는 버퍼 관리자(400) 사용시 페이지요청명령에 페이지ID와 함께 데이터베이스ID를 추가하여 사용한다.Referring to FIG. 3, the buffer manager 400 implements by adding a parameter of a database ID to an API, and the query processor 300 adds a database ID together with a page ID to a page request command when using the buffer manager 400. do.
따라서, 버퍼 관리자(400)는 질의 처리기(300)로부터 입력된 페이지요청명령에 따라 데이터베이스ID를 이용하여 복수의 하위 모듈(500) 중 어떤 하위 모듈을 사용해야 하는지 데이터베이스ID와 어레이 크기를 이용한 나머지 연산을 이용하여 선택하고, 선택된 하위 모듈(500)을 통해 데이터페이지를 읽어들인다. Accordingly, the buffer manager 400 performs remaining operations using the database ID and the array size to determine which submodule among the plurality of submodules 500 should be used using the database ID according to the page request command input from the query processor 300. The data page is read through the selected submodule 500.
이때, 버퍼 관리자(400)는 읽어들인 데이터페이지를 관리하기 위해 데이터베이스 ID와 페이지 ID를 표시하고, 해당 데이터페이지의 재요청이 접수되면 버퍼풀 메모리에서 페이지 ID와 데이터베이스ID를 이용하여 해당 데이터페이지를 정확히 찾아 반환한다. At this time, the buffer manager 400 displays a database ID and a page ID to manage the read data page, and when a request for re-request of the data page is received, the buffer manager 400 uses the page ID and the database ID in the buffer pool memory. Find and return exactly.
도 4는 본 발명의 일 실시예에 따른 내장형 데이터베이스 시스템의 다중 데이터베이스 운용 방법을 설명하는 도면이고, 도 5는 본 발명의 일 실시예에 따른 데이터베이스ID 관리자의 구동 상태를 설명하는 도면이다.4 is a diagram illustrating a method for operating multiple databases of an embedded database system according to an embodiment of the present invention, and FIG. 5 is a diagram illustrating a driving state of a database ID manager according to an embodiment of the present invention.
도 4 및 도 5를 참고하면, 내장형 데이터베이스 시스템의 다중 데이터베이스 운용 방법은, 연결 관리자(200)가 하나의 버퍼 관리자(400)를 사용하기 위해 복수의 데이터베이스(100)를 구분하여 운영하기 위한 데이터베이스ID 관리자(210)를 포함한다.(S1)4 and 5, in a multi-database operating method of an embedded database system, a database ID for the connection manager 200 to separately operate a plurality of databases 100 in order to use one buffer manager 400. The manager 210 is included. (S1)
데이터베이스ID 관리자(210)는 어레이 커서를 언사인드 쇼트(Unsigned Short) 타입으로 사용하고, 어레이 커서의 범위를 0~65535로 설정하며, 어레이 커서를 제어하기 위한 Declare/Open/Fetch/Close 등의 명령어 문장을 사용한다.The database ID manager 210 uses an array cursor as an unsigned short type, sets the range of the array cursor to 0 to 65535, and commands such as Declare / Open / Fetch / Close to control the array cursor. Use sentences.
만일 어레이 크기를 5개로 할 경우에 어레이는 5개의 필드로 구성되고, 도 5의 (a)에 도시된 바와 같이, 연결 관리자(200)는 데이터베이스 Open 명령어가 입력되면 어레이 커서를 0~4까지 1씩 증가시키면서 필드를 이동한다. 어레이 커서가 위치한 필드에 데이터베이스가 연결되지 않고 비어 있으면 해당 어레이 커서의 값을 데이터베이스ID로 할당하며, 질의 처리기(300)에서 버퍼 관리자(400)를 사용할 때 데이터베이스 ID의 파라미터를 추가하여 사용하도록 한다.If the array size is 5, the array consists of 5 fields, and as shown in FIG. 5 (a), the connection manager 200 sets the array cursor to 0 to 4 when the database open command is input. Move the field in increments of one. If a database is not connected to the field where the array cursor is located and is empty, the value of the corresponding array cursor is assigned as the database ID. When the buffer manager 400 is used in the query processor 300, the parameter of the database ID is added and used.
만일, 데이터베이스 Open 명령어가 입력되었지만 어레이의 모든 필드가 채워진 경우에 "데이터베이스 연결 가능한 최대 개수를 초과하였습니다."라는 메시지와 함께 데이터베이스 연결 실패를 반환한다. If the database Open command is entered but all the fields in the array are filled, the database connection failure is returned with the message "The maximum number of database connections has been exceeded."
도 5의 (b)에 도시된 바와 같이, 데이터베이스ID 관리자(210)는 데이터베이스ID가 '1'인 데이터베이스에 대한 Close 명령어가 입력되면 어레이 커서가 array[1]의 필드에 위치하고, (데이터베이스ID % 어레이 크기)를 이용한 나머지 연산의 결과 값을 이용하여 해당 필드(array[1])의 값을 초기화시킨 후 데이터베이스 연결을 종료한다. As shown in (b) of FIG. 5, the database ID manager 210 locates an array cursor in a field of array [1] when a Close command for a database having a database ID of '1' is inputted. Initialize the value of the field (array [1]) using the result of the rest of the operation using the array size) and terminate the database connection.
데이터베이스ID 관리자(210)는 적어도 하나 이상의 데이터베이스(100)를 운영중일 경우에 동적으로 프로그램 영역 내에서만 데이터베이스 ID의 생성/소멸 동작을 수행한다.(S1) 이와 같이, 본 발명에서는 데이터베이스ID가 데이터베이스(100)에 저장되어 관리되지 않기 때문에 복수의 데이터베이스 간에 어떠한 의존성도 존재하지 않고, 그로 인해 데이터베이스 시스템의 중단없이 데이터베이스를 등록/등록해제/교환 등의 동작이 가능해진다. The database ID manager 210 dynamically generates / deletes the database ID only in the program area when the at least one database 100 is in operation. (S1) As described above, in the present invention, the database ID is a database ( 100, there is no dependency between a plurality of databases because they are not stored and managed, thereby enabling operations such as registering / unregistering / exchanging databases without interruption of the database system.
이때, 어레이 커서는 Unsigned short의 최소값(0)이고, Unsigned short의 최대값은 65535이다. 따라서, 어레이 커서의 값의 범위는 0~65535로 설계되고, 이 값의 범위를 데이터베이스 시스템이 종료될 때까지 계속 반복한다.At this time, the array cursor is the minimum value (0) of the unsigned short and the maximum value of the unsigned short is 65535. Thus, the range of values for the array cursor is designed from 0 to 65535, and the range of values is repeated over and over until the database system shuts down.
질의 처리기(300)는 데이터베이스 ID와 페이지 ID를 이용하여 버퍼 관리자(400)에게 페이지요청명령을 전송하고, 요청한 페이지ID에 해당하는 데이터페이지에 데이터의 삽입/삭제/변경 등의 수정 작업을 수행한 후 버퍼 관리자(400)에게 데이터페이지가 수정되었음을 알린다.(S2)The query processor 300 transmits a page request command to the buffer manager 400 using a database ID and a page ID, and performs a modification such as inserting / deleting / modifying data into a data page corresponding to the requested page ID. After that, the buffer manager 400 is notified that the data page has been modified.
버퍼 관리자(400)는 API에 데이터베이스 ID의 파라미터 추가하여 구현하고, 페이지요청명령에 따라 데이터베이스ID를 이용해 복수의 데이터베이스(100) 중 사용해야 할 데이터베이스(100)를 선택한다.(S3 및 S4)The buffer manager 400 implements by adding a parameter of a database ID to the API, and selects a database 100 to be used among the plurality of databases 100 using the database ID according to the page request command (S3 and S4).
버퍼 관리자(400)는 선택된 데이터베이스(100)에서 페이지 ID를 이용해 데이터페이지를 버퍼풀 메모리(420)로 읽어들여 데이터페이지의 캐시 및 관리 수행한다.(S5) 이때, 버퍼 관리자(400)는 버퍼풀 메모리에 데이터페이지의 페이지ID와 데이터베이스ID를 표시함으로써 이후 해당 데이터페이지가 재요청되면 페이지ID와 데이터베이스ID를 이용해 해당 데이터페이지를 정확히 찾아서 반환할 수 있다. The buffer manager 400 reads the data page into the buffer pool memory 420 using the page ID in the selected database 100 to cache and manage the data page. (S5) At this time, the buffer manager 400 buffers the buffer pool. By displaying the page ID and database ID of the data page in memory, if the data page is requested again later, the page ID and database ID can be used to accurately find and return the data page.
도 6은 본 발명의 일 실시예에 따른 어레이 커서 값의 범위에 따른 버퍼풀 메모리의 오동작 상태를 설명하는 도면이다.6 is a diagram illustrating a malfunction state of a buffer pool memory according to a range of array cursor values according to an embodiment of the present invention.
도 6에 도시된 바와 같이, 데이터베이스ID 관리자(210)는 데이터베이스ID를 어레이 커서 값을 이용하여 생성하고 있는데, 어레이 커서 값의 범위가 좁을 경우에 Open/Close의 명령어를 반복 실행하면 버퍼 관리자(400)의 버퍼풀 메모리에는 페이지 ID가 동일하지만 서로 다른 데이터베이스에서 읽어들인 데이터페이지가 존재할 가능성이 있기 때문에 찾고자 하는 데이터페이지를 정확히 찾지 못하여 오류가 발생하게 된다. As shown in FIG. 6, the database ID manager 210 generates a database ID using an array cursor value. When the array cursor value is narrow, the database ID manager 210 repeatedly executes an open / close command. In the bufferpool memory of), there is a possibility that there are data pages that have the same page ID but are read from different databases.
만일, 어레이 크기가 3이고, 어레이 커서의 값의 범위가 0~2인 경우에, 데이터베이스ID의 범위도 0~2가 된다.If the array size is 3 and the range of the array cursor value is 0 to 2, the range of the database ID is also 0 to 2.
데이터베이스 Open 명령에 따라 데이터베이스ID[0]이 생성되고, 해당 데이터베이스(100)에서 페이지ID[0]에 해당하는 데이터페이지[0]를 버퍼풀메모리(420)로 읽어들인다. 그리고 데이터베이스의 Close 명령에 따라 데이터베이스ID가 '0'인 데이터베이스의 연결을 해제하고 array[0]을 초기화한다. 이때, 버퍼 관리자(400)는 데이터베이스 Close 명령마다 비교적 큰 저장 용량의 버퍼풀 메모리를 초기화하기에는 비용이 너무 크게 소요되므로 성능을 위해서 데이터페이지[0]를 그대로 남겨두게 된다.A database ID [0] is generated according to the database open command, and the data page [0] corresponding to the page ID [0] is read from the database 100 into the buffer pool memory 420. Then, according to the database close command, disconnect the database whose database ID is '0' and initialize array [0]. At this time, the buffer manager 400 is too expensive to initialize the buffer pool memory of a relatively large storage capacity for each database Close command, and thus leaves the data page [0] as it is for performance.
이러한 방식으로, 버퍼 관리자(400)는 데이터베이스 Open/Close 명령의 반복에 따라 데이터베이스 ID가 '1'과 '2'인 데이터베이스에 대한 데이터페이지[1], 데이터페이지[2]를 읽어들인 후에 array[1]과 array[2]를 초기화시키고, 버퍼풀 메모리에 데이터페이지[1]과 데이터페이지[2]를 남겨두게 된다.In this manner, the buffer manager 400 reads data page [1] and data page [2] for the database with database IDs '1' and '2' according to the repetition of the database Open / Close command and then array [ 1] and array [2] are initialized, leaving data page [1] and data page [2] in the buffer pool memory.
이후, 데이터베이스 Open 명령이 입력되면 어레이 커서가 array[0]에 위치하게 되고, 데이터베이스ID는 '0'으로 할당된다. 따라서, 버퍼 관리자(400)는 네번째 데이터베이스[3]에서 데이터페이지[3]를 읽어오는 것이 아니라 버퍼풀 메모리에 남아있는 데이터페이지[0]를 찾아서 반환하고, 버퍼풀 메모리에서 데이터페이지[0]를 찾았으므로 데이터베이스[3]는 읽지 않게 된다.After that, when the database open command is input, the array cursor is positioned at array [0], and the database ID is assigned to '0'. Therefore, instead of reading the data page [3] from the fourth database [3], the buffer manager 400 finds and returns the data page [0] remaining in the buffer pool memory, and returns the data page [0] from the buffer pool memory. The database [3] is not read because it is found.
이와 같이, 어레이 커서 값의 범위를 좁게 설정했을 경우에 발생되는 버퍼풀 메모리의 오동작을 방지하기 위해 어레이 커서의 값의 범위를 비교적 크게 설계해야 한다. As described above, in order to prevent a malfunction of the buffer pool memory generated when the range of the array cursor value is set narrow, the range of the value of the array cursor should be relatively large.
예를 들어, 데이터베이스 시스템에서는 데이터페이지의 크기가 16KB이고, 버퍼풀 메모리의 크기가 32MB이면, 버퍼풀 메모리에 최대 2048개의 데이터페이지가 존재할 수 있으므로 데이터베이스 ID의 범위는 0~65535로 설계할 경우에 버퍼풀 메모리의 오동작을 방지할 수 있다. For example, in a database system, if the data page size is 16 KB and the buffer pool memory is 32 MB, up to 2048 data pages can exist in the buffer pool memory. Therefore, the database ID range is 0 to 65535. Malfunction of the buffer pool memory can be prevented.
즉, 데이터베이스ID가 0에서 시작해서 65535를 거쳐 다시 0이 되기 때문에 버퍼풀 메모리에 데이터베이스ID에 대한 데이터페이지[0]는 희생 페이지가 되어 사라지므로 버퍼풀 메모리에서 잘못된 데이터페이지를 찾아 반환하는 오류를 방지할 수 있다. In other words, since the database ID starts at 0 and passes through 65535 and becomes 0 again, the data page [0] for the database ID in the buffer pool memory disappears as a victim page, and thus finds and returns an invalid data page in the buffer pool memory. It can prevent.
상기에서는 본 발명의 바람직한 실시예를 참조하여 설명하였지만, 해당 기술 분야의 숙련된 당업자는 하기의 특허 청구의 범위에 기재된 본 발명의 사상 및 영역으로부터 벗어나지 않는 범위 내에서 본 발명을 다양하게 수정 및 변경시킬 수 있음을 이해할 수 있을 것이다.Although described above with reference to a preferred embodiment of the present invention, those skilled in the art will be variously modified and changed within the scope of the invention without departing from the spirit and scope of the invention described in the claims below I can understand that you can.

Claims (16)

  1. 데이터를 저장하기 위한 데이터페이지가 적재되고, 상기 데이터페이지에 페이지 ID를 부여하는 복수의 데이터베이스;A plurality of databases in which data pages for storing data are loaded, and a page ID is assigned to the data pages;
    적어도 하나 이상의 데이터베이스를 운영중(Runtime)일 경우에 각 데이터베이스에 대한 데이터베이스 ID의 생성 또는 소멸을 포함한 동적 관리를 통해 데이터베이스 접근을 처리하는 연결관리자;A connection manager that processes database access through dynamic management, including creation or destruction of a database ID for each database when at least one database is running;
    상기 데이터페이지에 데이터의 삽입, 삭제, 변경, 검색을 포함한 질의처리 작업을 수행하도록 상기 데이터베이스 ID와 페이지 ID를 포함한 페이지요청명령을 발생하는 복수의 질의처리기; 및 A plurality of query processors for generating a page request command including the database ID and the page ID to perform a query processing operation including inserting, deleting, changing, and retrieving data in the data page; And
    상기 페이지요청명령에 따라 상기 데이터베이스 ID를 이용하여 복수의 데이터베이스 중 해당 데이터베이스를 선택하고, 상기 선택된 데이터베이스에서 상기 페이지 ID를 이용하여 데이터페이지를 읽어들여 데이터페이지의 캐시 및 관리를 수행하는 버퍼 관리자를 포함하는 것을 특징으로 하는 내장형 데이터베이스 시스템의 다중 데이터베이스 운용 장치. A buffer manager that selects a corresponding database from a plurality of databases using the database ID according to the page request command, and reads a data page using the page ID from the selected database to cache and manage the data page; Multiple database operating device of the embedded database system, characterized in that.
  2. 제1항에 있어서, The method of claim 1,
    상기 연결관리자는 어레이(Array) 자료 구조를 사용하고, 어레이 크기를 동시에 연결 가능한 데이터베이스의 최대 개수로 설정하며, 어레이 커서를 사용하여 데이터베이스를 구분하기 위한 데이터베이스 ID를 관리하는 데이터베이스ID 관리자를 더 포함하는 것을 특징으로 하는 내장형 데이터베이스 시스템의 다중 데이터베이스 운용 장치. The connection manager further includes a database ID manager that uses an array data structure, sets the array size to the maximum number of databases that can be simultaneously connected, and manages database IDs for distinguishing databases using array cursors. Multiple database operating device of the embedded database system, characterized in that.
  3. 제2항에 있어서, The method of claim 2,
    상기 데이터베이스ID 관리자는, 상기 어레이 커서를 언사인드 쇼트(Unsigned Short) 타입으로 사용하고, 상기 어레이 커서 값의 범위를 0~65535로 설정하며, 상기 어레이 커서를 제어하기 위한 Close 및 Open을 포함한 명령어 문장을 사용하는 것을 특징으로 하는 내장형 데이터베이스 시스템의 다중 데이터베이스 운용 장치. The database ID manager uses the array cursor as an unsigned short type, sets the range of the array cursor value to 0 to 65535, and includes a statement statement including close and open to control the array cursor. Multiple database operating device of the embedded database system, characterized in that using the.
  4. 제3항에 있어서, The method of claim 3,
    상기 데이터베이스ID 관리자는 상기 어레이가 기설정된 어레이 크기만큼의 필드로 구성된 경우에,If the database ID manager is configured with a field equal to a predetermined array size,
    상기 데이터베이스 Open 명령어가 입력되면 상기 어레이에서 데이터베이스가 연결되지 않고 비어있는 필드가 나올 때까지 상기 어레이 커서를 '1' 씩 증가시키고, 비어있는 필드가 발견되면 해당 필드에 위치한 어레이 커서의 값을 데이터베이스ID로 할당한 후 데이터베이스 연결을 수행하고,When the database Open command is input, the array cursor is incremented by '1' until an empty field appears without a database connected to the array, and when an empty field is found, the value of the array cursor located in the corresponding field is set to the database ID. Database connection,
    상기 데이터베이스 Close 명령어가 입력되면 데이터베이스ID에 해당하는 필드에 어레이 커서가 위치하고, 상기 데이터베이스ID와 어레이 크기를 이용한 나머지 연산을 이용하여 상기 어레이 커서가 위치한 필드를 초기화한 후 데이터베이스 연결을 종료하는 것을 특징으로 하는 내장형 데이터베이스 시스템의 다중 데이터베이스 운용 장치.When the database close command is input, an array cursor is positioned in a field corresponding to a database ID, and the database connection is terminated after initializing the field where the array cursor is located by using the remaining operations using the database ID and the array size. Multiple database operating units in embedded database systems.
  5. 제4항에 있어서, The method of claim 4, wherein
    상기 데이터베이스ID 관리자는 상기 데이터베이스 Open 명령어가 입력되었지만 어레이에 비어있는 필드가 없는 경우에 데이터베이스 연결 가능한 최대 개수를 초과하였음을 알리는 메시지를 출력하고, 데이터베이스 연결 실패를 반환하는 것을 특징으로 하는 내장형 데이터베이스 시스템의 다중 데이터베이스 운용 장치. The database ID manager outputs a message indicating that the maximum number of database connections has been exceeded when the database Open command is input but there are no empty fields in the array, and returns a database connection failure. Multiple database operating units.
  6. 제1항에 있어서, The method of claim 1,
    상기 버퍼 관리자와 데이터베이스 사이에는 하나 또는 그 이상의 논리적 기능들을 수행하는 데이터베이스 명령어들을 이용하여 하위의 데이터베이스를 사용하도록 하는 복수의 하위 모듈이 위치하고, A plurality of submodules are located between the buffer manager and the database to use a subordinate database by using database instructions that perform one or more logical functions.
    상기 버퍼 관리자는 API(application programming interface)에 상기 데이터베이스 ID의 파라미터를 추가하여 구현하고, 상기 데이터베이스ID를 이용하여 복수의 하위 모듈 중 하나의 하위 모듈을 선택하고, 상기 선택된 하위 모듈을 통해 데이터페이지를 읽어오도록 하는 하위모듈 관리자를 포함하는 것을 특징으로 하는 내장형 데이터베이스 시스템의 다중 데이터베이스 운용 장치. The buffer manager implements by adding a parameter of the database ID to an application programming interface (API), selects one submodule among a plurality of submodules using the database ID, and selects a data page through the selected submodule. Multi-database operating device of the embedded database system comprising a submodule manager for reading.
  7. 제6항에 있어서, The method of claim 6,
    상기 연결관리자는 어레이(Array) 자료 구조를 사용하고, 어레이 크기를 동시에 연결 가능한 데이터베이스의 최대 개수로 설정하며,The connection manager uses an array data structure and sets the array size to the maximum number of databases that can be connected simultaneously.
    상기 하위 모듈 관리자는 데이터베이스ID와 어레이 크기를 이용한 나머지 연산을 이용하여 복수의 하위 모듈 중 사용할 하위 모듈을 선택하는 것을 특징으로 하는 내장형 데이터베이스 시스템의 다중 데이터베이스 운용 장치. The lower module manager selects a lower module to be used from among a plurality of lower modules by using a remaining operation using a database ID and an array size.
  8. 제6항에 있어서, The method of claim 6,
    상기 버퍼 관리자는 내부의 버퍼풀 메모리에 데이터베이스ID와 페이지 ID를 표시하여 데이터페이지를 캐시하고, 해당 데이터페이지의 재요청시 상기 페이지 ID와 데이터베이스 ID를 이용하여 상기 버퍼풀 메모리에서 상기 데이터페이지를 읽어오는 것을 특징으로 하는 내장형 데이터베이스 시스템의 다중 데이터베이스 운용 장치. The buffer manager caches a data page by displaying a database ID and a page ID in an internal buffer pool memory, and reads the data page from the buffer pool memory using the page ID and the database ID when re-requesting the data page. Multiple database operating device of the embedded database system, characterized in that coming.
  9. 데이터페이지가 적재된 복수의 데이터베이스에 대한 데이터베이스 접근을 처리하는 연결관리자, 상기 데이터페이지에 데이터의 삽입, 삭제, 변경, 검색을 포함한 질의처리 작업을 수행하는 질의처리기 및 상기 데이터베이스에서 데이터페이지를 읽어들여 데이터페이지의 캐시 및 관리를 수행하는 버퍼 관리자를 포함하는 내장형 데이터베이스 시스템의 다중 데이터베이스 운용 방법에 있어서,Connection manager that handles database access to a plurality of databases loaded with data pages, a query processor that performs query processing operations including inserting, deleting, changing, and retrieving data into the data pages, and reading data pages from the database. In the multi-database operating method of the embedded database system including a buffer manager for caching and managing data pages,
    상기 연결 관리자는 데이터베이스의 운영중(RunTime)에 하나의 버퍼 관리자를 사용하기 위해 복수의 데이터베이스를 구분하는 데이터베이스ID를 생성 또는 소멸하는 데이터베이스 ID의 동적 관리를 통해 데이터베이스 접근을 처리하는 단계;The connection manager processing a database access through dynamic management of a database ID for generating or destroying a database ID for distinguishing a plurality of databases in order to use one buffer manager during run time of the database;
    상기 질의 처리기는 데이터베이스 ID와 데이터페이지의 페이지 ID를 이용하여 페이지요청명령을 버퍼 관리자에 요청하고, 상기 요청된 데이터페이지에 데이터의 삽입/삭제/변경/검색을 포함한 질의처리 작업을 수행하는 단계; 및 The query processor requesting a page request command to a buffer manager using a database ID and a page ID of a data page, and performing a query processing operation including inserting / deleting / modifying / searching data into the requested data page; And
    상기 버퍼 관리자는 데이터베이스 ID의 파라미터를 추가하여 구현하고, 상기 페이지요청명령에 따라 상기 데이터베이스ID를 이용하여 복수의 데이터베이스 중 해당되는 데이터베이스를 선택하고, 상기 선택된 데이터베이스에서 페이지 ID에 해당하는 데이터페이지를 읽어들여 버퍼풀 메모리에 상기 데이터페이지의 캐시 및 관리 역할을 수행하는 단계를 포함하는 것을 특징으로 하는 내장형 데이터베이스 시스템의 다중 데이터베이스 운용 방법.The buffer manager implements by adding a parameter of a database ID, selects a corresponding database among a plurality of databases using the database ID according to the page request command, and reads a data page corresponding to a page ID from the selected database. And performing a role of caching and managing the data page in the buffer pool memory.
  10. 제9항에 있어서, The method of claim 9,
    상기 연결관리자는 어레이(Array) 자료 구조를 사용하고, 어레이 크기를 동시에 연결 가능한 데이터베이스의 최대 개수로 설정하며, 어레이 커서를 사용하여 데이터베이스를 구분하기 위한 데이터베이스 ID를 관리하는 데이터베이스ID 관리자를 더 포함하는 것을 특징으로 하는 내장형 데이터베이스 시스템의 다중 데이터베이스 운용 방법.The connection manager further includes a database ID manager that uses an array data structure, sets the array size to the maximum number of databases that can be simultaneously connected, and manages database IDs for distinguishing databases using array cursors. Multi-database operating method characterized in that the embedded database system.
  11. 제10항에 있어서, The method of claim 10,
    상기 데이터베이스ID 관리자는, 상기 어레이 커서를 언사인드 쇼트(Unsigned Short) 타입으로 사용하고, 상기 어레이 커서 값의 범위를 0~65535로 설정하며, 상기 어레이 커서를 제어하기 위한 Close 및 Open을 포함한 명령어 문장을 사용하는 것을 특징으로 하는 내장형 데이터베이스 시스템의 다중 데이터베이스 운용 방법.The database ID manager uses the array cursor as an unsigned short type, sets the range of the array cursor value to 0 to 65535, and includes a statement statement including close and open to control the array cursor. Multiple database operating method of the embedded database system, characterized in that using the.
  12. 제11항에 있어서, The method of claim 11,
    상기 연결 관리자는 하나의 버퍼 관리자를 사용하기 위해 복수의 데이터베이스를 구분하는 데이터베이스ID를 생성 또는 소멸하는 데이터베이스 ID의 동적 관리를 통해 데이터베이스 접근을 처리하는 단계는, 상기 어레이가 기설정된 어레이 크기만큼의 필드로 구성된 경우에,The connection manager may process a database access through dynamic management of a database ID for generating or destroying a database ID for distinguishing a plurality of databases in order to use one buffer manager, wherein the array is a field corresponding to a preset array size. If configured with
    상기 데이터베이스 Open 명령어가 입력되면 현재 어레이 커서가 위치한 필드에 데이터베이스가 연결되었는지를 확인하고, 해당 필드에 데이터베이스가 연결된 경우에 비어있는 필드를 검색하기 위해 상기 어레이 커서를 '1' 씩 증가시키는 단계;Checking whether a database is connected to a field where an array cursor is located when the database Open command is input, and incrementing the array cursor by '1' to search for an empty field when a database is connected to the corresponding field;
    상기 어레이에서 비어있는 필드가 있는 경우에 해당 필드에 위치한 어레이 커서의 값을 데이터베이스ID로 할당한 후 데이터베이스 연결을 수행하고, 상기 어레이에 비어있는 필드가 없는 경우에 데이터베이스 연결 가능한 최대 개수를 초과하였음을 알리는 메시지를 출력하고, 데이터베이스 연결 실패를 반환하는 단계를 포함하는 것을 특징으로 하는 내장형 데이터베이스 시스템의 다중 데이터베이스 운용 방법.When there is an empty field in the array, the database cursor is assigned after assigning the value of the array cursor located in the field as the database ID, and when the empty field is not present in the array, the maximum number of database connections is exceeded. And outputting an informing message and returning a database connection failure.
  13. 제11항에 있어서, The method of claim 11,
    상기 연결 관리자는 하나의 버퍼 관리자를 사용하기 위해 복수의 데이터베이스를 구분하는 데이터베이스ID를 생성 또는 소멸하는 데이터베이스 ID의 동적 관리를 통해 데이터베이스 접근을 처리하는 단계는, 상기 어레이가 기설정된 어레이 크기만큼의 필드로 구성된 경우에,The connection manager may process a database access through dynamic management of a database ID for generating or destroying a database ID for distinguishing a plurality of databases in order to use one buffer manager, wherein the array is a field corresponding to a preset array size. If configured with
    상기 데이터베이스 Close 명령어가 입력되면 데이터베이스ID에 해당하는 필드에 어레이 커서가 위치하고, 상기 데이터베이스ID와 어레이 크기를 이용한 나머지 연산을 이용하여 상기 어레이 커서가 위치한 필드를 초기화한 후 데이터베이스 연결을 종료하는 것을 특징으로 하는 내장형 데이터베이스 시스템의 다중 데이터베이스 운용 방법.When the database close command is input, an array cursor is positioned in a field corresponding to a database ID, and the database connection is terminated after initializing the field where the array cursor is located by using the remaining operations using the database ID and the array size. How to operate multiple databases in an embedded database system.
  14. 제9항에 있어서, The method of claim 9,
    상기 버퍼 관리자와 복수의 데이터베이스 사이에는 하나 또는 그 이상의 논리적 기능들을 수행하는 데이터베이스 명령어들을 이용하여 하위의 데이터베이스를 사용하도록 하는 복수의 하위 모듈이 위치하고, A plurality of submodules are located between the buffer manager and the plurality of databases to use a lower database by using database instructions that perform one or more logical functions.
    상기 버퍼 관리자는 API(application programming interface)에 상기 데이터베이스 ID의 파라미터를 추가하여 구현하고, 상기 데이터베이스ID를 이용하여 복수의 하위 모듈 중 하나의 하위 모듈을 선택하고, 상기 선택된 하위 모듈을 통해 데이터페이지를 읽어오도록 하는 하위모듈 관리자를 포함하는 것을 특징으로 하는 내장형 데이터베이스 시스템의 다중 데이터베이스 운용 방법.The buffer manager implements by adding a parameter of the database ID to an application programming interface (API), selects one submodule among a plurality of submodules using the database ID, and selects a data page through the selected submodule. A method for operating multiple databases in an embedded database system, comprising a submodule manager for reading.
  15. 제14항에 있어서, The method of claim 14,
    상기 연결관리자가 어레이(Array) 자료 구조를 사용하고, 어레이 크기를 동시에 연결 가능한 데이터베이스의 최대 개수로 설정한 경우에 When the connection manager uses an array data structure and sets the array size to the maximum number of databases that can be connected simultaneously.
    상기 하위 모듈 관리자는 데이터베이스ID와 어레이 크기를 이용한 나머지 연산을 이용하여 복수의 하위 모듈 중 사용할 하위 모듈을 선택하는 것을 특징으로 하는 내장형 데이터베이스 시스템의 다중 데이터베이스 운용 방법.The submodule manager selects a submodule to be used from among a plurality of submodules by using a remaining operation using a database ID and an array size.
  16. 제14항에 있어서, The method of claim 14,
    상기 버퍼 관리자는 내부의 버퍼풀 메모리에 데이터베이스ID와 페이지 ID를 표시하여 데이터페이지를 캐시하고, 해당 데이터페이지의 재요청시 상기 페이지 ID와 데이터베이스 ID를 이용하여 상기 버퍼풀 메모리에서 상기 데이터페이지를 읽어오는 것을 특징으로 하는 내장형 데이터베이스 시스템의 다중 데이터베이스 운용 방법.The buffer manager caches a data page by displaying a database ID and a page ID in an internal buffer pool memory, and reads the data page from the buffer pool memory using the page ID and the database ID when re-requesting the data page. Multiple database operation method of the embedded database system, characterized in that coming.
PCT/KR2017/011895 2016-10-26 2017-10-26 Apparatus for operating multiple databases of embedded database system, and method therefor WO2018080187A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR10-2016-0140059 2016-10-26
KR1020160140059A KR101828328B1 (en) 2016-10-26 2016-10-26 Apparatus for Operating Multiple Database in Embedded Database System and Method thereof

Publications (1)

Publication Number Publication Date
WO2018080187A1 true WO2018080187A1 (en) 2018-05-03

Family

ID=61901179

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2017/011895 WO2018080187A1 (en) 2016-10-26 2017-10-26 Apparatus for operating multiple databases of embedded database system, and method therefor

Country Status (2)

Country Link
KR (1) KR101828328B1 (en)
WO (1) WO2018080187A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109376174A (en) * 2018-12-30 2019-02-22 北京奇艺世纪科技有限公司 A kind of method and apparatus selecting database

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20200094853A (en) * 2019-01-25 2020-08-10 삼성전자주식회사 Electronic device and Method for controlling the electronic device thereof

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20050024762A (en) * 2003-09-03 2005-03-11 삼성전자주식회사 apparatus and method of management for data base
US20050192988A1 (en) * 2004-02-26 2005-09-01 International Business Machines Corporation Method and system for managing aggregation data structures
US20120109878A1 (en) * 2010-10-27 2012-05-03 Crazy Development Debugging system for multidimensional database query expressions on a processing server
US8825959B1 (en) * 2012-07-31 2014-09-02 Actian Netherlands B.V. Method and apparatus for using data access time prediction for improving data buffering policies
KR101592479B1 (en) * 2010-12-30 2016-02-05 페이스북, 인크. Distributed cache for graph data

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20050024762A (en) * 2003-09-03 2005-03-11 삼성전자주식회사 apparatus and method of management for data base
US20050192988A1 (en) * 2004-02-26 2005-09-01 International Business Machines Corporation Method and system for managing aggregation data structures
US20120109878A1 (en) * 2010-10-27 2012-05-03 Crazy Development Debugging system for multidimensional database query expressions on a processing server
KR101592479B1 (en) * 2010-12-30 2016-02-05 페이스북, 인크. Distributed cache for graph data
US8825959B1 (en) * 2012-07-31 2014-09-02 Actian Netherlands B.V. Method and apparatus for using data access time prediction for improving data buffering policies

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109376174A (en) * 2018-12-30 2019-02-22 北京奇艺世纪科技有限公司 A kind of method and apparatus selecting database
CN109376174B (en) * 2018-12-30 2021-04-27 北京奇艺世纪科技有限公司 Method and device for selecting database

Also Published As

Publication number Publication date
KR101828328B1 (en) 2018-03-22

Similar Documents

Publication Publication Date Title
US7779016B2 (en) Parallel execution of operations for a partitioned binary radix tree on a parallel computer
US7971182B1 (en) Application environment specifications for provisioning application specific runtime environments using undefined symbols
US6539500B1 (en) System and method for tracing
US6374238B1 (en) Routine executing method in database system
US9213623B2 (en) Memory allocation with identification of requesting loadable kernel module
US9176713B2 (en) Method, apparatus and program storage device that provides a user mode device interface
EP0306702A2 (en) Virtual input/output commands
JPH0640317B2 (en) Digital data processing system
US5134711A (en) Computer with intelligent memory system
WO2013154247A1 (en) Method and apparatus for searching for corrected b+ tree nodes
WO2014142553A1 (en) Interconnection fabric switching apparatus capable of dynamically allocating resources according to workload and method therefor
WO2018080187A1 (en) Apparatus for operating multiple databases of embedded database system, and method therefor
SE413815B (en) DATA PROCESSING SYSTEM
US6463514B1 (en) Method to arbitrate for a cache block
WO2016117739A1 (en) In-memory database-based data management system and method
US11409684B2 (en) Processing accelerator architectures
JPS6017135B2 (en) data processing equipment
CN104321750B (en) The method and system of release consistency is kept in shared memory programming
WO2022124573A1 (en) Method for evaluating similarity of website on basis of menu structure and keyword in script
WO1989012277A1 (en) High speed relational data base processor
WO2015130093A1 (en) Method and apparatus for preventing bank conflict in memory
WO2022124720A1 (en) Method for detecting error of operating system kernel memory in real time
CN115878333A (en) Method, device and equipment for judging consistency between process groups
WO2019235884A1 (en) Medical information conversion method and system for constructing clinical decision system
WO2017188484A1 (en) Memory management method, computer program therefor, and rrecording medium therefor

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17864908

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17864908

Country of ref document: EP

Kind code of ref document: A1