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

ERwinTableDef.Fields.Append ERwinField

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

ERwinField.Required = True

ERwinTableDef.Fields.Append ERwinField

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

ERwinTableDef.Fields.Append ERwinField

ERwinDatabase.TableDefs.Append ERwinTableDef

' CREATE INDEX "PrimaryKey"

Set ERwinTableDef = ERwinDatabase.TableDefs("Sector")

Set ERwinIndex = ERwinTableDef.CreateIndex("PrimaryKey")

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

ERwinIndex.Fields.Append ERwinField

ERwinIndex.Primary = True

ERwinTableDef.Indexes.Append ERwinIndex

' CREATE TABLE "Work place"

Set ERwinTableDef = ERwinDatabase.CreateTableDef("Work place")

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("Name work place", DB_TEXT, 18)

ERwinTableDef.Fields.Append ERwinField

ERwinDatabase.TableDefs.Append ERwinTableDef

' CREATE INDEX "PrimaryKey"

Set ERwinTableDef = ERwinDatabase.TableDefs("Work place")

Set ERwinIndex = ERwinTableDef.CreateIndex("PrimaryKey")

Set ERwinField = ERwinIndex.CreateField("ID work place")

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