ps:
①ER圖:就是PD中的 Physical Diagram
參考:https://blog.csdn.net/weixin_37530941/article/details/107331105
利用建表語句sql匯入表
-- 建表語句1_未修改前的
CREATE TABLE "TABLE_1"
(
"COLUMN_11" CHAR(10),
"ID" CHAR(32) NOT NULL,
"AGE" NUMBER(22,6),
"C_2222" CHAR(10),
UNIQUE("AGE"),
NOT CLUSTER PRIMARY KEY("ID")
) STORAGE(ON "MAIN", CLUSTERBTR) ;
COMMENT ON COLUMN "TABLE_1"."AGE" IS 'CS_AA';
COMMENT ON COLUMN "TABLE_1"."COLUMN_11" IS 'CS_11';
COMMENT ON COLUMN "TABLE_1"."C_2222" IS 'CS_';
COMMENT ON COLUMN "TABLE_1"."ID" IS 'CS_DD';
-- 建表語句2_修改之後的
-- 主鍵的名字規則:PK_表名
CREATE TABLE "TABLE_1"
(
"COLUMN_11" CHAR(10),
"ID" CHAR(32) NOT NULL,
"AGE" NUMBER(22,6),
"C_2222" CHAR(10),
UNIQUE("AGE"),
constraint PK_CS1 PRIMARY KEY("ID")
) STORAGE(ON "MAIN", CLUSTERBTR) ;
COMMENT ON COLUMN "TABLE_1"."AGE" IS 'CS_AA';
COMMENT ON COLUMN "TABLE_1"."COLUMN_11" IS 'CS_11';
COMMENT ON COLUMN "TABLE_1"."C_2222" IS 'CS_';
COMMENT ON COLUMN "TABLE_1"."ID" IS 'CS_DD';
修改詳情:
Option Explicit
ValidationMode = True
InteractiveMode = im_Batch
Dim mdl ' the current model
' get the current active model
Set mdl = ActiveModel
If (mdl Is Nothing) Then
MsgBox "There is no current Model "
ElseIf Not mdl.IsKindOf(PdPDM.cls_Model) Then
MsgBox "The current model is not an Physical Data model. "
Else
ProcessFolder mdl
End If
Private sub ProcessFolder(folder)
On Error Resume Next
Dim Tab 'running table
for each Tab in folder.tables
if not tab.isShortcut then
tab.name = tab.comment
Dim col ' running column
for each col in tab.columns
if col.comment="" then
else
col.name= col.comment
end if
next
end if
next
Dim view 'running view
for each view in folder.Views
if not view.isShortcut then
view.name = view.comment
end if
next
' go into the sub-packages
Dim f ' running folder
For Each f In folder.Packages
if not f.IsShortcut then
ProcessFolder f
end if
Next
end sub
設計規範——有需要的私我。或者評論
①工具列中的這個圖示,可以把拖入ER圖的有外來鍵關聯的表連線起來。
——這個功能適用於,同一張表出現在不同的ER圖中。
撥出介面:
②其他工具列:
參考:https://www.somode.com/jiaocheng/36995.html
①、如Table_2(從表
) 中的 TABLE_ID 是 TABLE_1(主表
) 的 ID 的外來鍵。
②、雙擊連線,設定如下:
見①。子表的外來鍵欄位出現 <FK> 就是對的
參考:https://www.cnblogs.com/EasonJim/p/4715282.html
①結果
②操作
①結果:
②操作步奏:
1)表:
2)線: