×

SYSTEM, METHOD, AND PROGAM PRODUCT FOR DATABASE RESTRUCTURING SUPPORT

  • US 20100217759A1
  • Filed: 04/30/2008
  • Published: 08/26/2010
  • Est. Priority Date: 05/11/2007
  • Status: Active Grant
First Claim
Patent Images

1. A database restructuring system that calculates an evaluation value in the case of changing a structure of a database by using a storage cost and an access cost, the storage cost indicating a capacity of a storage device necessary to store data and the access cost indicating a capacity of the storage device accessed by a relation operation, the database restructuring support system comprising:

  • a database storage unit that stores a database, the database being a set of schemata which are tables or views;

    a log storage unit that stores an access log of the database;

    a catalog information storage unit that stores catalog information including a number of tuples of a table, a header size of the tuple, an attribute set of the table, a size of each attribute belonging to the attribute set of the table, a number of types of a value of each attribute belonging to the attribute set of the table, a block size of a management area of the database, and a size of a block header;

    an input unit that inputs information to specify an existing schema inside the database stored to the database storage unit, a definition of a new schema generated from the existing schema, and information to specify an existing schema remaining after a restructure;

    an existing schema storage cost calculation unit that sets a storage cost of a view to 0, and calculates a storage cost of an existing table by calculating a number of tuples of a table that can be stored to one block by using the catalog information and dividing a number of tuples of the existing table by the number of tuples that can be stored to one block;

    an existing database storage cost calculation unit that calculates a storage cost of the database before a restructure by obtaining a sum of the storage cost of each view and each table, the storage cost of each view and each table being calculated by the existing schema storage cost calculation unit;

    a new schema storage cost calculation unit that sets a storage cost of a new schema to 0 if the new schema is a view and calculates a storage cost of a new schema if the new schema is a table by calculating a number of tuples of the new schema, calculating a number of tuples that can be stored to one block by using the catalog information, and dividing the number of tuples of the new schema by the number of tuples that can be stored to one block;

    a new database storage cost calculation unit that calculates the storage cost of the database after the restructure by obtaining a sum of the storage cost of the new schema and the storage cost of the existing schema remaining after the restructure;

    an existing schema access cost calculation unit that calculates an access cost of the existing schema by calculating a number of tuples accessed by a relation operation for each SQL sentence representing a relation operation in an access log of a schema to calculate the access cost therefor, converting the number of tuples for each relation operation into a number of blocks by using the catalog information, calculating an access cost for each SQL sentence by obtaining a sum of each block, and obtaining a sum of the access cost of the each SQL sentence;

    an existing database access cost calculation unit that calculates an access cost of the database before the restructure by obtaining the sum of the access cost calculated for the each SQL sentence in the access log calculated by the existing schema access cost calculation unit;

    a new schema access cost calculation unit that calculates an access cost of the new schema by creating a virtual access log considered as an access log of the new schema from an access log of an existing schema in which the new schema is generated from, calculating a number of types of a value of each attribute belonging to an attribute set of the new schema, calculating a number of tuples accessed by a relation operation for each SQL sentence representing the relation operation in the virtual access log, converting the number of tuples for the each relation operation into a number of blocks by using the calculated number of types of the value of the attribute, the number of tuples of the new schema, and the catalog information, and calculates a sum of the access cost for the each SQL sentence;

    a new database access cost calculation unit that calculates the access cost of the database after the restructure by calculating a sum of an access cost for each SQL sentence in an access log of an existing schema not used to create the virtual access log and the access cost calculated by the new schema access cost calculation unit for each SQL sentence in the virtual access log; and

    an integrated cost estimate unit that calculates an integrated cost of the database before the restructure by integrating the access cost and the storage cost of the database before the restructure, calculates an integrated cost of the schema before the restructure by integrating the access cost and the storage cost of the schema before the restructure, calculates an integrated cost of the database after the restructure by integrating the access cost and the storage cost of the database after the restructure, and calculates an integrated cost of the schema after the restructure by integrating the access cost and the storage cost of the schema after the restructure.

View all claims
  • 1 Assignment
Timeline View
Assignment View
    ×
    ×