We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4
1. Construct an ER-diagram by using suitable symbols for Company Database.
Entity Types for Company Database applications may be
• Employee • Department • Project • Dependent (Weak entity set) • Entity Type: Employee ➢ Attributes: Ssn, Bdate, Name, Address, Salary, Sex ➢ Primary key: Ssn • Entity Type: Department ➢ Attributes: Name, Number, Locations ➢ Primary key : Name • Entity Type: Project ➢ Attributes: Name, Number, Location ➢ Primary key: Name • Weak Entity Type: Dependent ➢ Attributes: Name, Sex, Birth_date, Relationship ➢ Partial key: Name Relationship sets for Company Database applications may be • Relationship set: worksfor ➢ Participating entity types: Employee and Department, Employee and Project ➢ Mapping cardinality: many to many • Relationship set: manages ➢ Participating entity types: Employee and department ➢ Mapping cardinality: one to one • Relationship set: Dependents_of ➢ Participating entity types: Employee and Dependent ➢ Mapping cardinality: one to many 2. Construct an ER-diagram by using suitable symbols for University Database.
Entity Types for University Database applications may be
• Instructor • Department • Student • Course • Dependent (Weak entity set) • Entity Type: Instructor ➢ Attributes: id,name, dept, salary ➢ Primary key: id • Entity Type: Department ➢ Attributes: deptname, building, budget ➢ Primary key : deptname • Entity Type: Student ➢ Attributes: regno, phone, name, totalcredit, cgpa ➢ Primary key: regno • Entity Type: course ➢ Attributes: courseid, title, credits ➢ Primary key: courseid • Weak Entity Type: Dependent ➢ Attributes: name, relationship, location ➢ Partial key: name Relationship sets for University Database applications may be • Relationship set: worksfor ➢ Participating entity types: instructor and department ➢ Mapping cardinality: many to one • Relationship set: manages ➢ Participating entity types: instructor and department ➢ Mapping cardinality: one to one • Relationship set: teaches ➢ Participating entity types: instructor and student ➢ Mapping cardinality: many to many • Relationship set: enrolls ➢ Participating entity types: student and course ➢ Mapping cardinality: one to many • Relationship set: depends on ➢ Participating entity types: student and dependent ➢ Mapping cardinality: one to many 3. Construct an ER-diagram by using suitable symbols for Student Management Database.
Entity Types for Student Management Database applications may be
• Student • Course • Lecturer • Subjects • Entity Type: Student ➢ Attributes: Student_id, Age, Hobby, DOB, Student_Name, Course_ID ➢ Primary key: Student_ID • Entity Type: Course ➢ Attributes: Course_ID, Course_Name ➢ Primary key : Course_ID • Entity Type: Lecturer ➢ Attributes: Lecturer_id, Lecturer_name, Course_id ➢ Primary key : Lecture_id • Entity Type: Subjects ➢ Attributes: Lecturer_id, Lecturer_name, Course_id ➢ Primary key : Lecture_id Relationship sets for Student Management Database applications may be • Relationship set: attends ➢ Participating entity types: Students and Course ➢ Mapping cardinality: many to many • Relationship set: teaches ➢ Participating entity types: Student and Lecturer, Lecturer and Subjects ➢ Mapping cardinality: one to many, one to one • Relationship set: takes ➢ Participating entity types: Course and Lecturer ➢ Mapping cardinality: many to many • Relationship set: has ➢ Participating entity types: Course and Subjects ➢ Mapping cardinality: one to many