Page 464 - Computer_Science_F5
P. 464

For the Course entity, more attributes could for example, be Duration, Credits,
               Assignments, etc. For ease, we have considered just one attribute for each entity.

               Step 5: Create the ERD Diagram
               A more modern representation of the ERD example.                                    Chapter Eight: Databases and Database Management Systems
          FOR ONLINE READING ONLY

                    Student                       Course                         Professor
                   Student_ID      Assigned      Course_ID        Delivers      Employee_ID
                  StudentName                    CourseName                     ProfessorName

               Deliverables:

               Submit the completed E-R diagram depicting the relationships between students,
               courses, and professors. Provide a brief description outlining the rationale behind
               your design decisions and how the diagram accurately represents the university
               database scenario. Document your work in a portifolio.


              Functional dependency                    (b) Importance of functional

              (a) Meaning of functional dependency           dependencies
              Functional dependency is a constraint that   (i)  Functional dependency helps to
              determines how one attribute relates to       maintain the quality of data in the
              another in a relational database. It means    database.
              we can derive the value of one attribute   (ii) It helps to define databases’
              from another. For example, knowing a          constraints, ensure data integrity,
              student’s roll number allows us to find their   and avoid data anomalies.
              address and marks, meaning the address     (iii) It plays a vital role in finding the
              and marks are functionally dependent          difference between good and bad
              on the roll number. Similarly, knowing        database design, thus promoting
              an employee’s number lets us determine        robust and impactful databases.
              their name and salary, making the name
              and salary functionally dependent on the  (c) Types of functional dependencies
              employee number. Table 8.1 illustrates   There are four main types of functional
              this concept.                            dependency which are: Multivalued

               Table 8.1: Functional dependency        dependency, Trivial functional dependency,
               Employee  Employee    Employee          Non-trivial functional dependency and
               Number      Name          Salary        Transitive functional dependency.
               EMP01       Diana        900,000        (i)  Multivalued dependency
               EMP02       Juma         950,000        This type of functional dependency occurs
               EMP03       Andrew       850,000        when there are multiple independent


                                                    455
               Student’s Book  Form Five



     Computer Science Form 5.indd   455                                                     23/07/2024   12:34
   459   460   461   462   463   464   465   466   467   468   469