The Entity-Relationship Data Model, also called ER, is one of the various data models you can use to reason about your data.
实体关系数据模型 (也称为ER )是可用于推理数据的各种数据模型之一。
In particular, it’s a conceptual data model, as it’s not linked to any particular implementation. That’s a task left to the logic data model.
特别是,它是一个概念数据模型 ,因为它没有链接到任何特定的实现。 这是逻辑数据模型的任务。
The ER Data Model is so general, so high level, that it can be implemented by a variety of completely different kinds of databases.
ER数据模型是如此通用,如此高级,以至于可以通过各种完全不同的数据库来实现。
It is great because you don’t think about the implementation details, but instead you only think about your data and how it’s organized. And while doing so, you are forced to analyze the problem in ways that you didn’t think about before.
很棒是因为您无需考虑实现细节,而只考虑数据及其组织方式 。 在这样做的同时,您不得不以以前从未想到的方式来分析问题。
I find ER diagrams great at helping you analyze a scenario where data is involved.
我发现ER图非常有助于您分析涉及数据的场景。
The ER Model gives you the tools to represent, using a graphical notation, all the data you need to model, the relations between the different kind of data, and the information associated with it.
ER模型为您提供了使用图形表示法表示需要建模的所有数据,不同类型的数据之间的关系以及与之关联的信息的工具。
There are 2 items that compose an ER Model:
组成ER模型的项目有2个:
the entities
实体
the relations
关系
Entities are types of data, like items or people, that have common properties.
实体是具有共同属性的数据类型,例如项或人。
Relations are the relations between entities.
关系是实体之间的关系。
Let me give you an example, let’s talk about books and their authors. We have 2 entities:
让我举一个例子,让我们谈谈书籍及其作者。 我们有2个实体 :
- book 书
- author 作者
A particular book is an instance of the book entity.
特定书籍是书籍实体的实例。
Since we have 2 entities, we have 2 relations between them. One is the relation between a single book, and the authors entity. One is the relation between a single author, and the books entity. If we think about it, wre have:
由于我们有2个实体,因此它们之间有2个关系 。 一个是单本书与作者实体之间的关系。 一种是单个作者与图书实体之间的关系。 如果我们考虑一下,有:
- a book has an author 一本书有一位作者
- an author can write many different books 作者可以写很多不同的书
实体的视觉符号 (The visual notation for entities)
Given this simple example, we can start introducing the visual notation that will help us create the ER Data Model of our scenario.
给出了这个简单的示例,我们可以开始引入视觉符号,这将帮助我们创建场景的ER数据模型。