class #04
|Contents |Development Proposal |Data Flow Diagram |Output Image |Data Structures |Program Specifications |Procedure Specifications |Development Plan |Cost Package

PROGRAM SPECIFICATION


»ç¿ëµÉ ÇÁ·Î±×·¥À» ÇÊ¿äÇÑ °æ¿ì State Transition Diagram°ú Block DiagramÀ» ÅëÇÏ¿© Ç¥ÇöÇÑ´Ù. ÇÊ¿äÇÑ °æ¿ì¿¡ ÇÁ·Î±×·¥ Á¤ÀÇ ¾ð¾î Çü½ÄÀ» ºô·Á ¾Ë°í¸®µëÀ» Á¤ÀÇÇÒ ¼ö ÀÖ´Ù.

Diagram for Programs

- N/A -

BrowseStructure()

This procedure lists the product structure in the indented BOM format. It uses the recursive function call and provides the depth first tree search.

void BrowseStructure(PART current_part_id, NUMBER level, NUMBER qty)
{
SELECT child_part, qty FROM EDGE
WHERE partent_part = current_part_id
FOR (cursor)
{
PrintPart(child_part, level, qty)
BrowseStructure(child_part, level++)
} }

PrintPart()

void PrintPart(PART current_part_id, NUMBER level, NUMBER qty)
{
SELECT part_no, part_version, part_name, status FROM PART
WHERE part_id = current_part_id
PrintIndent(level)
print part_no, part_version, part_name, status, qty
}

class #04


Knowledge & Engineering Databases (c) copyright Namchul Do, 2002