制作实体关系图的步骤是什么? [英] what are steps to make entity relationship diagram ?

查看:182
本文介绍了制作实体关系图的步骤是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

制作实体关系图的步骤是什么?







它很难我创建实体关系diagraṃ erd 我知道有一些步骤可以实现。所以请帮助我了解它。

what are steps to make entity relationship diagram ?



it,s very difficult to me create entity relationship diagraṃ erd and i know that there are steps to make it . so please help me to know it .

推荐答案

如果你问我想用这个或那个软件工具制作实体关系图,你可以要求一些脚步。但你怎么能说有步骤制作它这是一段时间的建模方法?没有。



从理念开始学习方法(或者从理解关系模型开始);您将了解步骤,请参阅 http://en.wikipedia.org/wiki/Entity-relationship_diagram [ ^ ],http://en.wikipedia.org/wiki/Relational_model [ ^ ]。



-SA
If you asked "I want to make entity-relationship diagram using this or that software tool", you could ask for some steps. But how can you say "there are steps to make it" it this is a while modeling method? No.

Learn about the method starting from its ideas (or rather starting from understanding relational model); and you will know the "steps", see http://en.wikipedia.org/wiki/Entity-relationship_diagram[^], http://en.wikipedia.org/wiki/Relational_model[^].

—SA

右键单击您的解决方案。

Add - >新文件夹

将新文件夹命名为数据库

右键单击新文件夹。

add - >新商品

选择:数据 - > ADO.NET实体数据模型。

给模型命名。

选择:emty EF设计师模型

完成



右键单击新窗口(model.edmx)

添加新的 - >实体(这将是数据库中的一个表格)

给它起一个名字(人)

右键单击新实体

add new - >标量属性

给它命名(personLastName)

在visual studio属性窗口中,你可以对这个新属性进行更改

类型,可以为空。 ...



创建新实体

将其命名为地址

添加一些标量属性。 (街道名称,城市....)



现在连接两个实体:

右键单击地址实体。

添加新的 - >协会

(我们假设一个人可以没有或多个地址,但一个地址必须/只能有一个人)



实体地址:

多样性*很多

导航物业人物



实体人物

多样性0..1(零或一)

导航属性地址(你必须自己更改地址中的文字)



点击:添加外国关键属性.....



如果您阅读下面的所有内容,它会清楚地说明您正在创建的内容,这有助于分配。



如果您准备好了,请右键单击窗口(model.edmx)并单击从模型生成数据库。

按照步骤操作,然后创建数据库使用新创建的sql文件。



祝你好运。
Right click your solution.
Add -> new Folder
Name the new folder "Database"
Right click the new folder.
add -> New Item
Choose: Data -> ADO.NET Entity data model.
Give the model a name.
Choose: emty EF designer model
finish

Right click in the new window (model.edmx)
Add new -> entity (this will be a table in the database)
Give it a name (person)
Right click the new entity
add new -> Scalar property
give it a name (personLastName)
In visual studio properties windows you can make changes to this new property
Type, nullable ....

Make a new Entity
Name it Address
add some Scalar properties. (street name, city ....)

Now for connecting the two entities:
Right click the address entity.
Add new -> Association
(We will presume a person can none or multiple addresses, but a address must/can have only one person)

entity address:
Multiplicity *many
navigation property person

entity person
Multiplicity 0..1 (zero or one)
navigation property addresses (you have to change the text from address yourself)

Click: add foreign key properties to .....

If you read the text below all this, it clearly states what you are creating, this helps allot.

If you are ready, right click in the window (model.edmx) and click Generate database from model.
Follow the steps, and create your database with the newly created sql file.

Good luck.


1。识别系统需要存储数据的数据对象(实体)。

2.对于每个实体,列出其属性并检查属性的完整性。标记PK和FK,如果有的话

3.画一条线来显示关系并用动词标记它
4.添加关系类型(1-1,1-许多,很多很多)

5.在显示的关系中添加参与约束(可选或必需)
1. Identify data objects (entities) about which the system needs to store data.
2. For each entity, list its attributes and check the attributes for completeness. Mark the PK and FK, if any
3. Draw a line to show relationship and label it using a verb
4. Add relationship type (1-1, 1-many, many-many)
5. Add the participation constraint (optional or mandatory) to the relationship shown


这篇关于制作实体关系图的步骤是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆