条件① ~ ④を全て満たすとき, 出版社と著者と本の関係を示す E-R 図はどれか。 ここで, E-R 図の表記法は次のとおりとする。 〔表記法〕 a から b への矢印 (a → b) は, a と b が, 1 対多の関係であることを表す。 〔条件〕 ① 出版社は, 複数の著者と契約している。 ② 著者は, 一つの出版社とだけ契約している。 ③ 著者は, 複数の本を書いている。 ④ 1 冊の本は, 1 人の著者が書いている。
令和3年度 ITパスポート試験 問70
This question's explanation and your answers so far.
問 70
- ア
正解 In this notation, “a→b” means a and b are in a one-to-many relationship, where the tail a is the “one” side and the head b is the “many” side. From conditions ① and ② (a publisher has contracts with multiple authors; an author has a contract with only one publisher), the publisher is the “one” and authors are the “many”, so it is Publisher → Author. From conditions ③ and ④ (an author writes multiple books; one book is written by one author), the author is the “one” and books are the “many”, so it is Author → Book. Linking the two gives “Publisher → Author → Book” with all arrows pointing rightward, which matches ア, the correct answer.
Incorrectイ
“Author ← Book” would make the book the “one” side and authors the “many” side, i.e. one book written by multiple authors, which contradicts conditions ③ and ④ (an author writes multiple books and one book is written by one author, i.e. Author → Book). Therefore it is wrong.
Incorrectウ
“Publisher ← Author” would make the author the “one” side and publishers the “many” side, i.e. one author having contracts with multiple publishers, which contradicts condition ② (an author has a contract with only one publisher, i.e. Publisher → Author). Therefore it is wrong.
Incorrectエ
“Publisher ← Author ← Book” has both arrows pointing the opposite way, contradicting both Publisher → Author from conditions ① and ② and Author → Book from conditions ③ and ④. The one-to-many directions are all reversed, so it is wrong.
- How to read one-to-many from the E-R diagram arrow notation “a→b”: the tail of the arrow is the “one” side and the head is the “many” side.
- From each condition statement, identify the “one” side and the “many” side to decide the arrow direction, then link them together to assemble the whole E-R diagram.