2
I read a statement from an exercise: construct a database instance which conforms to diagram 1 but not to diagram 2. The diagrams are different n-ary relationships that have different relationships. Diagram 1 has a many to one to many to one relationship. Diagram 2 has many to many to many to one relationship. So, to really understand this problem, what does a database instance mean? Is it to make an example or abstract entities like a1, a2, or a3. Thanks for your time.  
EDIT: Here is the exercise: Consider the E/R diagrams in figure (2).
a: Construct a database instance which conforms to diagram 2 but not to diagram 1
b: Construct a database instance which conforms to diagram 3 but not to diagram 2
The instances may assume values like a1, a2, a3 for the entity A, b1, b2, b3 for the entity B, and so on. (If you are unable to come up with an instance explain why.).
                                   |---|
                     Diagram 2     | C |
                                   |---|
                                     |
                                    / \
                |---|              /   \            |---|
                | A |-------------     -------------| B |
                |---|              \   /            |---|
                                    \ /
                                     |
                                     |
                                    \ /  -- arrow
                                   |---|
                                   | D |
                                   |---|
Diagram 1 
                                   |---|
                                   | C |
                                   |---|
                                     ^
                                     |
                                    / \
                |---|              /   \            |---|
                | A |-------------     -------------| B |
                |---|              \   /            |---|
                                    \ /
                                     |
                                     |
                                    \ /  -- arrow
                                   |---|
                                   | D |
                                   |---|
Diagram 3 
                                   |---|
                                   | C |
                                   |---|
                                     |
                                    / \
                |---|              /   \            |---|
                | A |-------------     -------------| B |
                |---|              \   /            |---|
                                    \ /
                                     |
                                     |
                                   |---|
                                   | D |
                                   |---|
4

1 回答 1

2

在那种情况下,它可能只是“构建数据库”,所以你只需要构建你的数据库结构(表、外键等)

更新:是的,我想我会坚持我的意见。您必须设计一个符合该图的数据库结构(该图描述了数据库内的表关系)并且实体是表。数据库实例仅表示数据库。谷歌上的快速搜索提供了答案:

“拥有员工数据库的组织可能具有三种不同的实例:生产(用于包含实时数据)、预生产(用于在发布到生产之前测试新功能)和开发(数据库开发人员用于创建新功能)。 " http://databases.about.com/od/administration/g/instance.htm

祝你好运 :)

于 2010-04-10T22:20:52.750 回答