Informační tok Funkční structura Datová struktura ER model Modulová struktura Typová struktura Relační model Dokumentace


[Celkový datový model] [Funkce] [Externí rohraní] [Stavové diagramy] [Datové elementy] [Entity] [Relace]
[Databáze] [Události] [Materiály] [Generovací funkce] [Vyhodnocovací funkce] [Konfigurace] [Uživatelé] [Projekt] [Home]



Vyhodnocovací funkce
List_Attributes_with_Keys
(Entity Type)


Vytvořeno: 11-27-1996 11:49:04
Poslední změna: 12-03-2002 13:50:28

Outputs a list of all attributes of the specified entity type with information about whether an attribute belongs to a primary or foreign key.

Modul

Module: Entity Type

Zdrojový kód:

PROCEDURE List_Attributes_with_Keys FOR ENTITY
BEGIN
/*
  list attributes of entity type together with primary keys
*/
  PRINT {BOLD, "ARIAL", 12} "seznam atributů a klíčů entity ";
  PRINT {BOLD, "ARIAL", 12,ITALIC} CONV$(Boxname), NL(2);
  
  foundattr% = 0;
  PRINT {BOLD, "Arial", 10} "Atributy", NL;
  
  FOREACH Attribute WHERE Entity = Entity.Name ORDER BY Position DO
      foundattr% = 1;
       FOR Data WHERE Name = Attribute.Data DO
            PRINT {"Arial", 8} TAB(4), Attribute.Name, TAB(30), Boxname;
            PRINT NL;
       END
  END
  
  IF foundattr% = 0 THEN
      PRINT {"Arial", 10, ITALIC} TAB(4), "Nemá žádné atributy.", NL;
  END
  PRINT {"Arial", 8} NL;
  
  PRINT {BOLD, "Arial", 10} "Klíče", NL;
  FOREACH Identifier WHERE Entity = Entity.Name ORDER BY Name DO
    
    IF Entity.Primaryidentifier = Identifier.Name THEN
      PRINT {BOLD, "ARIAL", 8} TAB(4), Identifier.Name, " ( primární klíč )", NL;
    ELSE
      PRINT {BOLD, "ARIAL", 8} TAB(4), Identifier.Name, NL;
    END

    FOREACH Identifierattribute WHERE Identifierattribute.Identifier = Identifier.Name
                                  AND Entity = Identifier.Entity DO
      FOR Attribute WHERE Name = Identifierattribute.Attribute
                      AND Entity = Entity.Name DO
         PRINT {"ARIAL", 8} TAB(6), Attribute.Name, NL;
      END
    END
    
    first% = 0;
    FOREACH IdentifierERconnection WHERE Entity = Identifier.Entity
                                   AND Identifier = Identifier.Name
                                   ORDER BY Entity DO
      FOR ERconnection WHERE Entity = IdentifierERconnection.Refentity
                           AND Rship = IdentifierERconnection.Rship
                           AND ERconnectionno = IdentifierERconnection.ERconnectionno DO
        FOR Entity WHERE ERconnection.Entity = Name DO
          IF first% = 0 THEN
            PRINT {"ARIAL", 8} TAB(6),"závisí na:";
            first% = 1;
          END
          PRINT {"ARIAL", 8} TAB(15);
          PRINT {"ARIAL", 8} CONV$(Boxname),"(",ERconnection.Name,", ",ERconnection.Cardinality,")",NL;
        END
      END
    END
    PRINT {"Arial", 8} NL;
  END
  
    PRINT {"Arial", 8} NL;

END


Generováno: 16.10.2003 7:41 Systém: C:\Documents and Settings\hajsman\Dokumenty\Vyuka\Irs2\Projekt case40\Projekt03.csf Generováno systémem case/4/0
Vygeneroval: Administrator Soubor: C:\Documents and Settings\hajsman\Dokumenty\Vyuka\Irs2\Projekt case40\html\12625.htm (C) microTOOL GmbH 2002