翻譯|使用教程|編輯:吳園園|2020-04-14 09:36:37.973|閱讀 366 次
概述:您可以使用Entity Relationship Diagram(ERD)設(shè)計數(shù)據(jù)庫,然后根據(jù)設(shè)計生成一個物理數(shù)據(jù)庫。在本教程中,您將為在線自行車商店繪制一個簡單的ERD,為數(shù)據(jù)庫輸入示例數(shù)據(jù),然后生成Amazon Redshift數(shù)據(jù)庫。
# 界面/圖表報表/文檔/IDE等千款熱門軟控件火熱銷售中 >>
相關(guān)鏈接:
Visual Paradigm是包含設(shè)計共享、線框圖和數(shù)據(jù)庫設(shè)計新特性的企業(yè)項目設(shè)計工具?,F(xiàn)在你只需要這樣單獨的一款模型軟件 Visual Paradigm就可以完成用UML設(shè)計軟件,用BPMN去執(zhí)行業(yè)務(wù)流程分析,用ERD企業(yè)設(shè)計數(shù)據(jù)庫的任務(wù)。Visual Paradigm現(xiàn)已加入在線訂購,現(xiàn)在搶購立享優(yōu)惠!
輸入樣本數(shù)據(jù)
樣本數(shù)據(jù)使您的團隊可以基本了解要存儲的數(shù)據(jù)類型。還可以在數(shù)據(jù)庫生成過程中將樣本數(shù)據(jù)生成到數(shù)據(jù)庫,從而節(jié)省了準(zhǔn)備樣本以試運行數(shù)據(jù)庫的時間。要為數(shù)據(jù)庫設(shè)計輸入樣本數(shù)據(jù):
1、右鍵單擊ERD的空白區(qū)域,然后選擇顯示表記錄編輯器或視圖編輯器。
2、在圖中選擇實體客戶。現(xiàn)在,您將看到表記錄編輯器列出了Customer實體的列。
3、在表記錄編輯器中輸入客戶的以下詳細(xì)信息。
|
---|
5、這將顯示我們?yōu)镃ustomer輸入的樣本數(shù)據(jù)。從列表中選擇Peter。彼得的FK值將在訂單記錄中為您填寫。
6、重復(fù)上述步驟,輸入以下示例數(shù)據(jù)。
Order
ID (PK) | date | CustomerID (FK) |
---|---|---|
1 | 2016-04-10 17:30:15 | 2 |
2 | 2016-04-10 18:20:22 | 1 |
ID (PK) | name |
---|---|
1 | 3R |
2 | Red Line |
ID (PK) | name |
---|---|
1 | Components |
2 | Cloths |
ID (PK) | name | price | CategoryID (FK) | BrandID (FK) |
---|---|---|---|---|
1 | Handle Bar | 799 | 1 | 1 |
2 | Head Set | 999 | 1 | 2 |
3 | Jersey | 299 | 2 | 1 |
4 | Shpes | 1599 | 2 | 1 |
ID (PK) | detail | color | size | qty | ItemID (FK) |
---|---|---|---|---|---|
1 | full carbon | black | NA | 50 | 1 |
2 | NA | black | NA | 40 | 2 |
3 | NA | pink | NA | 40 | 2 |
4 | short sleeve | white | M | 150 | 3 |
5 | short sleeve | white | L | 150 | 3 |
6 | short sleeve | white | XL | 50 | 3 |
7 | short sleeve | white | S | 100 | 3 |
8 | short sleeve | blue | M | 150 | 3 |
9 | short sleeve | blue | L | 150 | 3 |
10 | short sleeve | blue | XL | 50 | 3 |
11 | short sleeve | blue | 5 | 80 | 3 |
12 | short sleeve | blue | XS | 20 | 3 |
13 | road | black | 39 | 40 | 4 |
14 | road | white | 39 | 20 | 4 |
OrderID (PK) | ItemVariantID(PK) | qty |
---|---|---|
1 | 1 | 1 |
1 | 4 | 1 |
2 | 13 | 1 |
2 | 9 | 1 |
2 | 3 | 1 |
生成數(shù)據(jù)庫
數(shù)據(jù)庫設(shè)計完成。讓我們從中生成一個Redshift數(shù)據(jù)庫。生成數(shù)據(jù)庫:
1、從應(yīng)用程序工具欄中選擇工具>數(shù)據(jù)庫>生成數(shù)據(jù)庫...。
2、如果您希望為數(shù)據(jù)庫保留DDL文件,請指定輸出路徑。
3、在“ 生成數(shù)據(jù)庫”字段中,保持選中“ 創(chuàng)建數(shù)據(jù)庫”。
4、選擇“ 導(dǎo)出到數(shù)據(jù)庫”以使Visual Paradigm直接將DDL腳本執(zhí)行到數(shù)據(jù)庫中。在實踐中,如果要手動執(zhí)行更改,請取消選中它,但是對于本教程,請先選中它。
5、在“ 生成樣本數(shù)據(jù)”字段中,選擇“ 是”(沒有自動生成的PK)。
=====================================================
更多Visual Paradigm相關(guān)資源,請點擊此處進(jìn)行查看~
想要購買Visual Paradigm正版授權(quán)的朋友可以
關(guān)注下方微信公眾號,及時獲取產(chǎn)品最新消息和最新資訊
本站文章除注明轉(zhuǎn)載外,均為本站原創(chuàng)或翻譯。歡迎任何形式的轉(zhuǎn)載,但請務(wù)必注明出處、不得修改原文相關(guān)鏈接,如果存在內(nèi)容上的異議請郵件反饋至chenjj@fc6vip.cn
文章轉(zhuǎn)載自: