関係データベースの設計で用いられる E-R 図が表現するものは何か。
平成24年度 秋期 ITパスポート試験 問53
This question's explanation and your answers so far.
問 53
Incorrectア
What expresses “the movement of states that change according to time, behavior, and so on” is a state transition diagram (statechart diagram). A state transition diagram draws the states that an object or a system can take and which state it moves to from which state when an event occurs; it deals with behavior along a time axis. An E-R diagram statically shows the data structure (entities and relationships) at one point in time, and it does not express changes of state themselves.
Incorrectイ
What expresses “the relationship among a system's input data, processing, and output data” is an IPO chart (Input-Process-Output, a part of HIPO). It is a notation that organizes, in three columns, what a given process takes as input, how it transforms it, and what it outputs; its focus is on the inside of each individual process. An E-R diagram has no concept of processing, and it does not draw flows of input and output either.
- ウ
正解 The correct answer is ウ. An E-R diagram (Entity-Relationship Diagram), just as its name shows, is a diagram that expresses two things: entities and relationships. An entity is something that makes up the target world (the world of the business) — a person, a thing, a place, an event, and so on — and that you want to manage as data; it is drawn as a rectangle. A relationship is a connection between entities, such as “an employee belongs to a department” or “a customer orders a product”; it is drawn as a line (with a diamond), and the correspondence (cardinality) — one-to-one, one-to-many, or many-to-many — is written alongside it. In relational database design, you first use an E-R diagram to organize the entities of the target world and the relationships between them (conceptual design), and then turn the entities into tables and the relationships into foreign keys or associative tables so as to decide the structure of the tables. Therefore what an E-R diagram expresses is “the entities that make up the target world and the relationships between those entities”, so ウ is correct.
Incorrectエ
What expresses “the movement of a business process when focusing on the flow of data” is a DFD (data flow diagram). A DFD uses four symbols — source/sink, process, data store, and data flow — to draw how data flows through the business and is processed. An E-R diagram draws not how data flows but what structure data exists in, so its purpose is different.
- E-R diagram = a diagram that shows entities and relationships. It is used in the conceptual design of a relational database, to organize the entities of the target world and the relationships between those entities (one-to-one / one-to-many / many-to-many).
- Memorize which diagram is used for what, in pairs: change of state → state transition diagram; input-process-output → IPO chart (HIPO); flow of data and business processes → DFD; structure of data (entities and relationships) → E-R diagram.