Method signatures

Method signatures define/describe:

  • the name/identifier of the method
  • the parameters of the method (identifier and data type)
  • the return type of the method eg void or int etc

Objectives

Students will be able to:

  • draw an Entity Relationship Diagram from a given scenario

Relational Databases

Entity Relationship Diagrams

Entity Relationship Diagrams

Database normalization often results in a database with mulitple entities (tables).

For database designers working in teams, it is very useful to be able to clearly visualize the relationships between entities.

Entity Relationship Diagrams (ERDs) serve this purpose. Click the buttons above to view 2 common methods of creating ERDs.

Watch the video and complete the worksheet.

Here is a very nice video to further your understanding of this topic:

Practical ERD Design Activity

University Course Registration System

Objective

Design an Entity Relationship Diagram (ERD) for a university course registration system, demonstrating understanding of entities (tables), attributes (fields), relationships (cardinality and modality).

Scenario

The university database must manage the following data:

  • Students - every student has an ID, a name, and an email
  • Courses - every course has a course ID, a professor, a title, and a department)
  • Professors - every professor has an ID, a name, a department, and an email)
  • Registrations - every registration has a registration date, a studentID and a courseID

System Rules:

  • Students can register for many courses; each course can have many students.
  • Each course is taught by one and only one professor; a professor can teach multiple courses or no courses.
  • Each registration links one student to one course
  • A student might not be registered for any courses yet.

Instructions

  1. Identify and define all entities and their attributes.
  2. Determine relationships between entities.
  3. Specify cardinality and modality for each relationship.
  4. Draw the ERD using software or on paper.
  5. Write a paragraph explaining your choices for each relationship's cardinality and modality.

Resources

Tags

methodCoding Bat recursion base case recursive call stack overflow returnunwind