Generate a Data Model from an existing database (25 pts)
For this assignment, we will be connecting to the classroom database with SQL Developer Data Modeler and Reverse Engineering an Entity-Relationship Diagram from an existing set of database tables. Before you can begin with this assignment, you must log into the Marist College VPN using the Cisco Any Connect client that you installed last week.
1. Launch SQL Developer Data Modeler a. This is not the same program we were just using, this is the other application you were asked to download. i. You can download from here if you have not already done so: http://www.oracle.com/technetwork/developer- tools/datamodeler/overview/index.html 2. When the application opens, click on File Import Data Dictionary a. You should see the screen below.
b. You are going to need to add a database connection to this application the same way we did for SQL Developer in the lesson. 3. Click Add at the bottom of the screen and you should see the following:
a. This screen should be identical to the one you saw in SQL Developer. b. Please fill out the following: i. Connection Name Whatever you want to call it ii. Username First Initial + Last Name ex. IBecker iii. Password your password iv. Hostname dm.ecrl.marist.edu v. Port 1521 vi. SID MSIS537L711
c. Press Test and you should get a Status: Success message appear on the lower left corner. d. Click Save. e. Click Connect i. In the pop-up window, enter your password. 4. Now that you have a database connection, you are going to proceed by clicking the connection we just created to select it from the list. 5. Once you have selected it, click Next at the bottom.
6. You are going to see a large list of Schemas / Databases on this step. Scroll through and find COMMON and check the box to the left of it.
a. Once you have selected COMMON, clock next. 7. The next screen is going to show you all of the tables that are in the COMMON schema. We are going to select all of them to import into our model.
a. Once you have them selected, click Next. 8. Once you have clicked Next, you should be taken to a screen that will summarize what is going to happen. Your screen should look like this:
a. You will want to verify that it says 5 Tables will be imported. b. If your screen looks like mine, click Finish. 9. You should see an import log when the operation finshes.
10. Click Close and you will be taken back to the application with your tables added to the diagram.
11. Now that you have the diagram, you are going to need to save it so you can submit it for the assignment. a. Click on File Save as i. Name it AssignmentOne_USERNAME where USERNAME is your Oracle account (First Initial + Last Name) 12. One you have your file saved, submit that as part of your assignment. Questions to answer (5 pts each)
1. What are the names of the primary keys for each table? 2. What are the names of the foreign keys for each table? 3. In order for a Student to Enroll in a class, what tables need to have data entered into them? 4. Based on the tables that you see, if I wanted to determine which students are have been enrolled in COURSENO 12345 which tables would I need to look at? 5. What if I wanted to see how many students were enrolled in COURSENO 12345 for the Fall of 2014. Which table would I find the Semester or Term?