开发者

Database Instance

开发者 https://www.devze.com 2022-12-26 03:24 出处:网络
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. D
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 |
                |---|              \   /         开发者_如何学JAVA   |---|
                                    \ /
                                     |
                                     |
                                   |---|
                                   | D |
                                   |---|


In that context it probably means just "construct a database" so you just have to construct your database structure (tables, foreign keys etc)

UPDATE: yes I think I will stick to my opinion. You have to design a database structure that will conform to that diagram (the diagram describes table relationships inside the database) and entities are tables. Database instance just means database. A quick search on google provides the answer:

"An organization with an employees database might have three different instances: production (used to contain live data), pre-production (used to test new functionality prior to release into production) and development (used by database developers to create new functionality)." http://databases.about.com/od/administration/g/instance.htm

Good luck :)

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号