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

Set ERwinField = ERwinTableDef.CreateField("Name", DB_TEXT, 18)

ERwinTableDef.Fields.Append ERwinField

Set ERwinField = ERwinTableDef.CreateField("Legal address", DB_TEXT, 18)

ERwinTableDef.Fields.Append ERwinField

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

ERwinTableDef.Fields.Append ERwinField

ERwinDatabase.TableDefs.Append ERwinTableDef

' CREATE INDEX "PrimaryKey"

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

Set ERwinIndex = ERwinTableDef.CreateIndex("PrimaryKey")

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

ERwinIndex.Fields.Append ERwinField

ERwinIndex.Primary = True

ERwinTableDef.Indexes.Append ERwinIndex

' CREATE TABLE "Function"

Set ERwinTableDef = ERwinDatabase.CreateTableDef("Function")

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

ERwinField.Required = True

ERwinTableDef.Fields.Append ERwinField

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

ERwinField.Required = True

ERwinTableDef.Fields.Append ERwinField

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

ERwinField.Required = True

ERwinTableDef.Fields.Append ERwinField

Set ERwinField = ERwinTableDef.CreateField("Function's name", DB_TEXT, 18)

ERwinTableDef.Fields.Append ERwinField

ERwinDatabase.TableDefs.Append ERwinTableDef

' CREATE INDEX "PrimaryKey"

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