# 计算机代写|数据库作业代写Database代考|EECS484

## 计算机代写|数据库作业代写Database代考|EXAMINING AN ENTITY: CHANGING

Consider Figure 5.1. In this figure, we have a STUDENT entity with the following attributes: name (a composite attribute), student_number (an atomic attribute and key), school (a multivalued attribute), and address (an atomic attribute). Suppose during our first session with the user, we show the diagram, the English, and the sample data, and the user says, “Wait a minute. I want to record all schools a student attended, and I want to record not only the name of the school, but also the location (city and state) and school type (community college, university, high school, etc.).”

What the user just told us was that the attribute school should really be an entity. Remember, the definition of an entity was something about which we wanted to record information. Our original thought was we were recording schools-attended, but now we are told we want to record information about the schools. The first indicator an attribute should be considered an entity is we need to store information about the attribute. What we do then is to migrate from Figure $5.1$ to Figure 5.2. In Figure 5.2, $\mathrm{SCHOOL}$ is now an entity by itself, so we have two separate entities, SCHOOL and STUDENT. We assume school_name to be unique and choose that as the key for the entity $\mathrm{SCHOOL}$.

The next step would be to define a relationship between the two entities.

## 计算机代写|数据库作业代写Database代考|DEFINING A SECOND ENTITY

Having examined the original primary entity for “suspicious” attributes, we may now begin to add more data. Let us presume the user wants to add information about automobiles the students own or drive. Ignoring the $\mathrm{SCHOOL}$ entity for the moment, let us suppose this time we have developed the following additional description:

We want to record information about students-their name and student numbers. In addition to information about students, we want to record information about their automobiles-the vehicle identification number, make of the car, body style, color, and year of the model. Let us further suppose we made the decision to choose STUDENT as the primary entity and want to add the automobile information.

The automobile is clearly an entity-it is something about which we want to record information. If we add the automobile into the database, we could have included it in step 1 of our methodology by adding an attribute called automobile, only later to perform step 3 of the methodology and migrate Automobile and school to the status of entities. The depiction of automobile as an attribute of the STUDENT entity is shown in Figure $5.4$ in the Chen-like model. (We ignore the SCHOOL entity for the moment.)

If we added the automobile attribute to the STUDENT entity and then recognized that automobile should have been an entity, we would then create the AUTOMOBILE entity and add the relationship to the model. Figure $5.4$ could be sufficient if the user did not want to store information about the automobiles themselves.

Of course, we could have recognized the attribute automobile was going to be an entity all along and simply recorded it as such in our diagram in the first place. By recognizing AUTOMOBILE as an entity, we would draw the two entities STUDENT and AUTOMOBILE and then look for a relationship between the two-Figure $5.5$ with two entities, STUDENT and AUTOMOBILE, and some relationship between the two entities.

# 数据库代考

## 计算机代写|数据库作业代写Database代考|DEFINING A SECOND ENTITY

myassignments-help数学代考价格说明

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

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

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

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

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