For this past week, my software engineering class covered data design modeling. Fortunately, I have encountered this topic before during my undergraduate career in a database class. Data design modeling is the idea of making relationships between different entities for describing data. Known as the Entity-Relationship (ER) diagram, software developers are able to use this information to implement the model into a relational database. To test our capability of designing ER diagrams, my software engineering class provided two WODs to do.
WOD 1 Library Data Model
The first WOD (link) involves creating an ER diagram that can be used in a library to keep track of borrowers, reservations, books, and loans. To implement the ER diagram, our professor instructs us to use a Google Drive plug-in called LucidCharts. LucidCharts is an application that allows creation of flow charts, tables, floor plans, circuit diagrams, and many more. In addition, it is also intuitive to use as creating a flow chart is as simple as click and dragging the shapes.
Being familiarized with LucidCharts after a experimenting for a few minutes, I attempted my first try at the WOD. Since I have not done ER diagrams in years, I had some struggles at first when trying to conceptualize the problem. First, I initially thought that each individual book should be its on entity. However, spending some time thinking made me realize that I should instead have an entity for each copy of a book for a unique book title. This made creating the entity for loans and reservations a lot simpler because I no longer had to keep track of the copy number for each individual book. My first try at this WOD, got me a time of 15 minutes. Since I was still rusty with ER diagrams, I attempted the WOD again the next day and I got my time down to 9 minutes.
WOD 2 Car Rental Model
The second WOD (link) is similar to the first WOD, but we are instead designing for a vehicle rental company. The car rental company needs to keep track of offices in cities, vehicles, customers, rentals of vehicles, and reservation for vehicles. When I was designing this ER diagram, I actually ran into a problem of how to uniquely identify different vehicles. At first, I had a field called vehicleID for each vehicle, but I felt this was too arbitrary. However, I realized this vehicleID is the same as a license’s plate number a moment later. Laughing at my own foolishness for a little bit, I continued work on this ER diagram and was able to finish in 11 minutes.
This week was a good review on basic database concepts of ER diagrams. I quite enjoyed the WODs as I was able to use my previous experiences from my undergraduate database class to design the ER diagrams. I also gave myself a pat on the back for being able to remember the concepts from a class that I took years ago. Hopefully my past experiences will make the next module on implementing databases somewhat painless compared to learning about web development.