Your SlideShare is downloading. ×
0
Erd examples
Erd examples
Erd examples
Erd examples
Erd examples
Erd examples
Erd examples
Erd examples
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Erd examples

16,431

Published on

ERD Diagram Modle

ERD Diagram Modle

Published in: Education
2 Comments
3 Likes
Statistics
Notes
  • thanks :)
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • When we use a verb to denote a relation, how we specify subject and object?
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Views
Total Views
16,431
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
514
Comments
2
Likes
3
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. The (min,max) notation Employee Department Manages (1,1) (0,1) Employee Department Works-for (1,N) (1,1)
  • 2. SUMMARY OF ER-DIAGRAM NOTATION FOR ER SCHEMAS <ul><li>Meaning </li></ul><ul><li>ENTITY TYPE </li></ul><ul><li>WEAK ENTITY TYPE </li></ul><ul><li>RELATIONSHIP TYPE </li></ul><ul><li>IDENTIFYING RELATIONSHIP TYPE </li></ul><ul><li>ATTRIBUTE </li></ul><ul><li>KEY ATTRIBUTE </li></ul><ul><li>MULTIVALUED ATTRIBUTE </li></ul><ul><li>COMPOSITE ATTRIBUTE </li></ul><ul><li>DERIVED ATTRIBUTE </li></ul><ul><li>TOTAL PARTICIPATION OF E 2 IN R </li></ul><ul><li>CARDINALITY RATIO 1:N FOR E 1 :E 2 IN R </li></ul><ul><li>STRUCTURAL CONSTRAINT (min, max) ON PARTICIPATION OF E IN R </li></ul>Symbol R E 2 E 1 R E 2 R (min,max) E N E 1
  • 3. ER DIAGRAM – Entity Types are: EMPLOYEE, DEPARTMENT, PROJECT, DEPENDENT
  • 4. COMPANY ER Schema Diagram using (min, max) notation
  • 5. Designing an ER Diagram <ul><li>Consider the following set of requirements for a University database. Design an ER diagram for this application: </li></ul><ul><li>The university keeps track of each student's name, student number, social security number, current address and phone number, permanent address and phone number, birthdate, sex, class (freshman, graduate), major department, minor department (if any), degree program (B.A., B.S., ... Ph.D.).  Some user applications need to refer to the city, state, and zip code of the student's permanent address and to the student's last name.  Both social security number and student number are unique for each student. All students will have at least a major department. </li></ul><ul><li>Each department is described by a name, department code, office number, office phone, and college.  Both the name and code have unique values for each department. </li></ul><ul><li>Each course has a course name, description, course number, number of credits, level and offering department.  The course number is unique for each course. </li></ul><ul><li>Each section has an instructor, semester, year, course, and section number.  The section number distinguishes sections of the same course that are taught during the same semester/year; its value is an integer (1, 2, 3, ... up to the number of sections taught during each semester). </li></ul><ul><li>A grade report must be generated for each student that lists the section, letter grade, and numeric grade (0,1,2,3, or 4) for each student and calculates his or her average GPA. </li></ul>
  • 6. University ER Diagram Student Class StudentID SSN Sex Zip Degree City Birth date State Name Address Section Instructor Year Semester SectionNumber GPA Numeric Grade Letter Grade Grade_Report Belong_To Offer Minor In Major In Department DName DCode OfficeNumber OfficePhone College Course CName CourseDesc CNumber Credits
  • 7. ER DIAGRAM FOR A BANK DATABASE © The Benjamin/Cummings Publishing Company, Inc. 1994, Elmasri/Navathe, Fundamentals of Database Systems, Second Edition
  • 8. FIGURE 3.17 An ER diagram for an AIRLINE database schema.

×