Лабораторная работа: Проектирование РБД "Санатория" с помощью инструментария AllFusion ERwin Data Modeler

ERwinField.Required = True

ERwinTableDef.Fields.Append ERwinField

Set ERwinField = ERwinTableDef.CreateField("ID client", DB_INTEGER)

ERwinField.Required = True

ERwinTableDef.Fields.Append ERwinField

Set ERwinField = ERwinTableDef.CreateField("ID enterprise", DB_INTEGER)

ERwinField.Required = True

ERwinTableDef.Fields.Append ERwinField

Set ERwinField = ERwinTableDef.CreateField("Number of flat", DB_INTEGER)

ERwinField.Required = True

ERwinTableDef.Fields.Append ERwinField

ERwinDatabase.TableDefs.Append ERwinTableDef

' CREATE INDEX "PrimaryKey"

Set ERwinTableDef = ERwinDatabase.TableDefs("Department_Client")

Set ERwinIndex = ERwinTableDef.CreateIndex("PrimaryKey")

Set ERwinField = ERwinIndex.CreateField("ID department")

ERwinIndex.Fields.Append ERwinField

Set ERwinField = ERwinIndex.CreateField("ID client")

ERwinIndex.Fields.Append ERwinField

Set ERwinField = ERwinIndex.CreateField("ID enterprise")

ERwinIndex.Fields.Append ERwinField

Set ERwinField = ERwinIndex.CreateField("Number of flat")

ERwinIndex.Fields.Append ERwinField

ERwinIndex.Primary = True

ERwinTableDef.Indexes.Append ERwinIndex

' CREATE TABLE "Enterprise-sender"

Set ERwinTableDef = ERwinDatabase.CreateTableDef("Enterprise-sender")

Set ERwinField = ERwinTableDef.CreateField("ID enterprise", DB_INTEGER)

ERwinField.Required = True

К-во Просмотров: 625
Бесплатно скачать Лабораторная работа: Проектирование РБД "Санатория" с помощью инструментария AllFusion ERwin Data Modeler