Compare the Difference Between Similar Terms

Difference Between

Home / Technology / IT / Database /Difference Between Entity and Attribute

Difference Between Entity and Attribute

June 11, 2011Posted byIndika

实体vs Attribute

实体关系建模(ERM)技术被广泛用于建模数据库。实体关系建模是提出数据的抽象和概念表示的过程。ERM的主要构建块之一是一个实体。实体代表一个现实世界的对象或可以独立站立并可以独特地识别的事物。属性是这些实体的属性。ER图是实体关系建模的产物。ER图是使用实体,属性和其他符号(例如关系)绘制的。

什么是实体?

An entity represents a thing that can exist independently and that can be identified uniquely. More specifically, an entity often represents a class, group or category of similar objects. Most often, an entity represents a real world object such as a car or an employee. Entities can be though of as nouns that come up during the description of the problem to be solved. Entities are represented as tables in relational databases. In general, each entity will map to exactly one table in the database. Individual rows in the tables correspond to the actual instances of the object/thing represented by the entity. For example, in an Employee database, each row corresponds to records of individual employees of the company.

What is an Attribute?

In the entity-relationship modeling, properties of entities are called attributes. In other words, attributes represent a sub group of information of the object represented by the entity. Attributes define the individual instances and help to differentiate between each instance by describing their characteristic. It is important to note that attributes cannot be set-valued and they should be atomic. In relational databases, where entities are realized as tables, each column represents the attributes of these entities. For example, in the Employee table, columns such as department, rank and salary are examples of attributes of the employees. In order to differentiate between individual instances of the entity, one or more attribute fields with unique values (for all instances) can be selected as a key. For example, the social security number attribute (which is unique for all employees) is often used as the primary key of an Employee table. Sometimes multiple attributes can makeup the primary key as well.

What is the difference between an Entity and an Attribute?

In entity-relationship modeling, entities represent real world objects/things that can be identified as unique and independent, while attributes represent the properties of those entities. In relational databases, entities become tables (each row representing individual instances), whereas attributes become columns of those corresponding tables. When designing databases, it is common to have confusion over choosing an entity vs. an attribute to represent a certain real word object. For example, should the address of the employee represented as an attribute or another entity (connected to employee entity through a relationship)? A general rule of thumb is, if an employee has more than one address, then the address must be an entity (because attributes are not set-valued). Similarly, if the structure of the address is important to capture, then again the address should be an entity (because attributes are atomic).

Related posts:

Difference Between SQL Server 2008 and Express Difference Between RDBMS and ORDBMS Difference Between DBMS and Data Warehouse 堆栈和堆之间的区别 Difference Between ER Diagram and Class Diagram

Filed Under:DatabaseTagged With:attribute,实体,实体-relationship modeling,ER diagrams,ERM,ERM technique

About the Author:Indika

Indika, BSc.Eng, MSECE Computer Engineering, PhD. Computer Science, is an Assistant Professor and has research interests in the areas of Bioinformatics, Computational Biology, and Biomedical Natural Language Processing.

Leave a ReplyCancel reply

Your email address will not be published.Required fields are marked*

Request Article

Featured Posts

Difference Between Coronavirus and Cold Symptoms

Difference Between Coronavirus and Cold Symptoms

Difference Between Coronavirus and SARS

Difference Between Coronavirus and SARS

Difference Between Coronavirus and Influenza

Difference Between Coronavirus and Influenza

Difference Between Coronavirus and Covid 19

Difference Between Coronavirus and Covid 19

You May Like

Difference Between Teleological and Deontological

Difference Between Teleological and Deontological

Difference Between Rob and Steal

Difference Between Rob and Steal

Difference Between Pressure Cooker and Slow Cooker

Difference Between Pressure Cooker and Slow Cooker

Difference Between Extortion and Blackmail

Difference Between Amiable and Amicable

Difference Between Amiable and Amicable

Latest Posts

  • What is the Difference Between Acne and Rosacea
  • What is the Difference Between Blood Transfusion and Dialysis
  • What is the Difference Between Language Acquisition and Language Learning
  • What is the Difference Between Heart Attack and Gastric Pain
  • 维生素和之间的区别是什么Amino Acids
  • What is the Difference Between Induction Cooker and Normal Cooker
  • Home
  • Vacancies
  • About
  • Request Article
  • 联系我们

Copyright © 2010-2018Difference Between. All rights reserved.Terms of Useand Privacy Policy:Legal.