## 计算机代写|数据库作业代写Database代考|The Multivalued Attribute

Another type of non-simple attribute to be managed is called a multivalued attribute. The multivalued attribute, as the name implies, may take on more than one value for a given occurrence of an entity. For example, the attribute school could easily be multivalued if a person attends (or has attended, depending on the context of the database) more than one school. As a counter example, most people go by only one name; hence, the name is not multivalued.

The multivalued attribute called school is depicted in Figure $4.5 \mathrm{~A}$ (Chen-like model) as a double oval; this illustrates the situation for which a database will store data about students who may have attended more than one school. Although we have chosen to illustrate school as a multivalued attribute, we do not mean to imply this will always be the case in all databases. In fact, the attribute school may well be single valued in some databases. The idea of school may mean the current (or just previous) school as opposed to all schools attended. If the subjects about whom we are storing data can attend only one school at a time (and that is what we want to depict), then the attribute school may well be a single valued attribute.

Again, the test of single versus multivalued will depend entirely on the circumstances the database designer encounters-the desire of the user of the to-be-built database. It is recommended if the sense of the database is the attribute school means “current school,” then the attribute should be called “current school” and illustrated as a single-valued attribute. We show a multivalued attribute in Figure 4.5A. This diagram implies multiple schools may be recorded for each student.

## 计算机代写|数据库作业代写Database代考|The Derived Attribute

A database is used to store data for retrieval. An attribute used to find a particular entity occurrence is called a key. As we model our database with the ER models, we may find some attributes naturally seem to be keys.

If an attribute nay be thought of as a unique identifier for an entity, it is called a candidate key. When a candidate key is chosen to be the unique identifier, it becomes the primary key for the entity.

As an example of keys, suppose we add an attribute called student_ number to our STUDENT entity example. We might well consider a student_number to be a unique identifier for the entity-a candidate key because of uniqueness. A name is often unique, but not necessarily so. Members of the same class often share last names. Address may or may not be a unique identifier and hence is not a likely candidate key. Siblings who take classes together could easily have the same address. Schools often choose to assign a unique student number to each student to be able to find student records. The idea of a key is to provide a unique way to find an entity instance (a particular record).

Some schools also choose to record a Social Security number (SSN) as an attribute. An SSN is also unique and hence a candidate key along with student_number. If both $S S N$ and student_number were recorded, then the designer would have to choose which candidate key would be the primary key. In our case, we choose not to record an SSN. The STUDENT entity with the unique identifier student_number, added as a key, is depicted in Figure 4.6.

In the Chen-like ER model unique identifiers (candidate keys), are usually underlined (as shown in Figure 4.6). A unique identifier may be an attribute or a combination of attributes. It is not necessary to choose which candidate key will be the primary key at this point, but one could do so. When there is only one candidate key, we will generally speak of it as the primary key simply because it is obvious the primary key is a candidate key. In Figure 4.6, we also depict a short form of the ER diagram (at the bottom of the figure) with composite attributes and multivalued attributes as well as primary keys. The composite attributes are listed with its component parts, and the multivalued attributes are enclosed in parentheses in the abbreviated form.

# 数据库代考

## 计算机代写|数据库作业代写Database代考|The Derived Attribute

myassignments-help数学代考价格说明

1、客户需提供物理代考的网址，相关账户，以及课程名称，Textbook等相关资料~客服会根据作业数量和持续时间给您定价~使收费透明，让您清楚的知道您的钱花在什么地方。

2、数学代写一般每篇报价约为600—1000rmb，费用根据持续时间、周作业量、成绩要求有所浮动(持续时间越长约便宜、周作业量越多约贵、成绩要求越高越贵)，报价后价格觉得合适，可以先付一周的款，我们帮你试做，满意后再继续，遇到Fail全额退款。

3、myassignments-help公司所有MATH作业代写服务支持付半款，全款，周付款，周付款一方面方便大家查阅自己的分数，一方面也方便大家资金周转，注意:每周固定周一时先预付下周的定金，不付定金不予继续做。物理代写一次性付清打9.5折。

Math作业代写、数学代写常见问题

myassignments-help擅长领域包含但不是全部: