Skip to content

平成21年度 秋期 ITパスポート試験 問97

This question's explanation and your answers so far.

問97
頻出度★★☆

I社は,企業に対してPC関連機器の販売を行っており,販売管理業務の情報をデータベースによって管理している。図1に示すデータベースとデータベース管理システムの印刷機能を使って,販売時に図2の請求書を発行する。 各商品の販売単価は適宜変更され,新たな販売単価とその更新日時が販売単価表の該当レコードに上書きされる。また,取引を行う企業(以下,取引先という)の担当者は原則1人であるが,取引先によっては部署ごとに1人存在することがある。取引先コードは,取引先ごとに採番する。 **図1 販売管理業務に関するデータベースの構造** 商品表

商品コード商品名分類コードメーカコード仕入先コード

販売単価表

商品コード販売単価更新日時

取引先表

取引先コード取引先名

取引先担当者表

取引先コード部署名所在地名前役職電話番号

**図2 請求書の様式** - 表題: 請求書 - 右上: 平成YY年MM月DD日 - 宛先欄 (左側): - [取引先名] [部署名] - [役職] [名前]様 - [所在地] [電話番号] - 本文: 下記のとおりご請求申し上げます。 - 発行者欄 (右側): 東京都文京区本駒込×丁目××番×号/株式会社 I - 右側: 伝票番号 XXXXXXXXXX - 明細表 (見出し行のみ。データ行は空欄):

商品コード商品名数量単価金額

- 合計欄 (明細表の下部。「合計」の行に「税抜」「消費税」「総額」の見出しがあり,その下の値セルは空欄):

合計税抜消費税総額

I社は,月末に図1の各表のデータをバックアップしている。取引先担当者表が次のような構成となっているとき,取引先担当者表を記録するには,少なくとも何kバイトの領域を確保する必要があるか。ここで,バックアップでは,データの圧縮は行わないものとする。 〔取引先担当者表の構成〕 ・件数:10,000件 ・取引先コード,電話番号:それぞれJISの1バイトコードで10文字 ・部署名:JISの2バイトコードで20文字 ・所在地:JISの2バイトコードで40文字 ・名前,役職:それぞれJISの2バイトコードで10文字

出典 平成21年度 秋期 ITパスポート試験 問97
解説

問 97

  • Incorrectア

    1,000 kbytes is the value you get if you treat all six fields as 1-byte code and simply add up the character counts. 10 + 10 + 20 + 40 + 10 + 10 = 100 characters counted as 100 bytes gives 100 × 10,000 = 1,000,000 bytes = 1,000 kbytes. However, the department name, location, name, and job title use 2-byte code, so the character count must not be used directly as the byte count.

  • Incorrectイ

    1,500 kbytes is the value obtained if one record is estimated at 150 bytes, but adding up the six fields in the figure correctly always gives 180 bytes; there is no calculation path that yields 150 bytes. If you check the breakdown of 20 bytes for the 1-byte fields plus 160 bytes for the 2-byte fields, this value cannot be chosen.

  • ウ

    正解 First add up the number of bytes for one record (one row) field by field, then multiply by the number of records. The business partner code and the phone number are each 10 characters in JIS 1-byte code, so 10 characters × 1 byte × 2 fields = 20 bytes. The department name is 20 characters in 2-byte code, so 20 × 2 = 40 bytes. The location is 40 characters in 2-byte code, so 40 × 2 = 80 bytes. The name and the job title are each 10 characters in 2-byte code, so 10 × 2 × 2 fields = 40 bytes. One record is therefore 20 + 40 + 80 + 40 = 180 bytes. For 10,000 records this gives 180 × 10,000 = 1,800,000 bytes. Because the choices are lined up as 1,000/1,500/1,800/2,000, the question assumes the decimal conversion of 1 kbyte = 1,000 bytes (dividing by 1,024 would give about 1,758 k, which is not among the choices). Hence 1,800,000 ÷ 1,000 = 1,800 kbytes, so “ウ” is correct.

  • Incorrectエ

    2,000 kbytes is the opposite mistake: the value obtained when all six fields are counted as 2-byte code. A total of 100 characters × 2 bytes = 200 bytes, and 200 × 10,000 = 2,000,000 bytes = 2,000 kbytes. The business partner code and the phone number use 1-byte code, so counting these two fields at 2 bytes overestimates the record by 20 bytes.

ここがポイント
  • Estimating a data volume is calculated as “bytes per record × number of records”. The bytes per record are obtained by computing (character count × bytes per character) for each field and adding them up.
  • JIS 1-byte code is counted as 1 byte per character, and 2-byte code as 2 bytes per character. The key point is not to confuse character count with byte count. For the conversion to kbytes, judge from the way the choices are lined up that it is the decimal conversion of 1 k = 1,000 bytes.
用語

Your answers