联系我们: 手动添加方式: 微信>添加朋友>企业微信联系人>13262280223 或者 QQ: 1483266981
Contemporary online services such as social networking and multimedia-sharing sites, massive multiplayer online games and commerce services have database management systems at their back-end. In this subject, students will obtain a deep understanding of the concepts behind database management systems. In particular, the students will become familiar with the database system architecture, and will exercise the concepts such as query processing and optimisation, database tuning and transactions, which are the foundation of any modern data processing application. This subject is core within the Bachelor of Science for the Major of Computing and Software Systems and the Major of Informatics. Students completing the Diploma of Informatics are also required to undertake this subject.
这是一份unimelb墨尔本大学COMP20007 的成功案例
算法设计|Design of Algorithms COMP20007
问题 1.
Explain the following terms briefly: attribute, domain, entity, relationship, entity set, relationship set, one-to-many relationship, many-to-many relationship, participation constraint, overlap construint, covering constraint, weak entity set, aggregation, and role indicater.
证明 .
Attribute – a property or description of an entity. A toy department employee entity could have attributes describing the employee’s name, salary, and years of service.Domain – a set of possible values for an attribute.Entity – an object in the real world that is distinguishable from other objects such as the green dragon toy.Relationship – an association among two or more entities.Entity set – a collection of similar entities such as all of the toys in the toy department.Relationship set – a collection of similar relationshipsOne-to-many relationship – a key constraint that indicates that one entity can be associated with many of another entity. An example of a one-to-many relationship is when an employee can work for only one department, and a department can have many employees.
Many-to-many relationship – a key constraint that indicates that many of one entity can be associated with many of another entity. An example of a manyto-many relationship is employees and their hobbies: a person can have many different hobbies, and many people can have the same hobby.
问题 2.
Exercise 3.73.7 Consider the relations Students, Faculty, Courses, Rooms, Enrolled, Teaches, and MeetsIn defined in Section 1.5.2.
List all the foreign key constraints among these relations.Give an example of a (plausible) constraint involving one or more of these relations that is not a primary key or foreign key constraint.
证明 .
There is no reason for a foreign key constraint (FKC) on the Students, Faculty, Courses, or Rooms relations. These are the most basic relations and must be free-standing. Special care must be given to entering data into these base relations.In the Enrolled relation, sid and cid should both have FKCs placed on them. (Real students must be enrolled in real courses.) Also, since real teachers must teach real courses, both the fid and the cid fields in the Teaches relation should have FKCs. Finally, Meets.In should place FKCs on both the cid and rno fields.
It would probably be wise to enforce a few other constraints on this DBMS: the length of sid, cid, and fid could be standardized; checksums could be added to these identification numbers: limits could be placed on the size of the numbers entered into the credits, capacity, and salary fields; an enumerated type should be assigned to the grade field (preventing a student from receiving a grade of GG, among other things); ete.


发表回复