天天看點

使用ERStudio建立資料庫邏輯模型,實體模型并生成資料庫表

1.建立邏輯模型

File->New

[img]http://dl.iteye.com/upload/picture/pic/101428/ced166cc-d878-3091-9a9f-39c3d1c66a4d.png[/img]

Entities->New Entity

[img]http://dl.iteye.com/upload/picture/pic/101430/87138407-e276-3e19-b8e7-447d5a91dd57.png[/img]

2.生成實體模型

Logical->Generate Physical Model

[img]http://dl.iteye.com/upload/picture/pic/101432/86d0a2d8-dfd0-3855-819f-260e85b15a4c.png[/img]

3.安裝ODBC

這裡以MySQL為例,安裝mysql-connector-odbc-5.1.9-win32.msi

[url]http://www.mysql.com/downloads/connector/odbc/5.1.html[/url]

4.生成資料庫表

PhysicalModel->Main Model->Generate Database

[img]http://dl.iteye.com/upload/picture/pic/101434/54bfb4fc-ae18-3c62-9da5-ff6e56baf0b9.png[/img]

選擇Generate Objects with a Database Connection

點選“Connect...”

[img]http://dl.iteye.com/upload/picture/pic/101436/9345f5da-ea21-3a36-aad3-ae668933ee5b.png[/img]

點選“Setup”

[img]http://dl.iteye.com/upload/picture/pic/101438/a08f26e6-93d2-3816-af43-ed2449e07de0.png[/img]

如果清單中沒有MySQL,點選“添加”

[img]http://dl.iteye.com/upload/picture/pic/101440/f024c843-b0ed-36a6-ad71-bb90db641899.png[/img]

如果清單中有MySQL,選擇後點選“配置”

[img]http://dl.iteye.com/upload/picture/pic/101442/8353ee92-ba9b-37e1-9793-488dda15c1e5.png[/img]

根據提示,填入相關資訊,然後“Next”

[img]http://dl.iteye.com/upload/picture/pic/101444/c903a66e-8f72-35bb-957d-33d120e1820a.png[/img]

完成

[img]http://dl.iteye.com/upload/picture/pic/101446/626784b6-ddaa-3524-9248-91ae2235ae96.png[/img]