A4.8 Next, we want to draw the relationship between the two entities. Follow similar steps as above to create the table "Course" with attributes: coursed (int), courseName (varchar(45)), course Level (int), courseCredit (int). Other checkboxes correspond to: UQ (Unique), BIN (Binary), UN (Unsigned), ZE (Zero Fill), AI (Autoincrement) A4.7 Next, we will add the second entity in the database: Course. Do that by making sure to check the PK (Primary key) and NN (Not Null) check boxes for the attribute studentID. A4.6 Select the attribute StudentID to be the primary key for the Student relation. Select the appropriate data type for the attributes. A4.5 Add in the attributes of relation Student: StudentID (int), StudentName (varchar(45)). A4.4 Name the table: double click on the table to open the table editor window. Select the table icon from the vertical menu bar or press T to create a new table. A4.3 Next, we will start adding our database entities. Go to File -> New Model A4.2 Click on Model->Add Diagram. For this exercise, we will use MySQL Workbench to model the same ER diagram from Exercise Al. MySQL Workbench is able to interpret and generate the database based on our ER modeling. ![]() In MySQL Workbench, the rectangle is used to represent relationhips. For the remaining lab exercises we will use MySQL Workbench to model our ER Diagram. Exercise A4: Creating ER diagram using MySQL Workbench In the previous exercises, we used the traditional diamond shape to represent relationships in our ER diagram.
0 Comments
Leave a Reply. |