|

ER Diagrams

1 Leave a comment on paragraph 1 0 With our final papers due within a week, I thought I might make a post about something that could be useful for anyone writing a project proposal. A big part about a lot of digital projects is the database. Representing that in a written format can be difficult, but luckily there is a way! I’m going to do a quick overview of it and give some resources to help you build your own.

2 Leave a comment on paragraph 2 0 In database design, the best way to plan out a relational database is by creating something called an entity-relationship diagram, or ER diagram for short. It’s a simple connected diagram, showing how each table relates to the others. It’s far more useful than a chart or just a list of each table and their columns. Here is an example of one I created for my project proposal. I hosted it on imgur to make it easier to see.

3 Leave a comment on paragraph 3 0 As you can see from mine, there are four different aspects of the database represented there: the main tables, the associative tables, each attribute of the tables, and the relationship. The rectangles are main tables. These should always be separate from each other, with each having a distinct ID. The bubbles around them are the columns or attributes associated with them. The diamonds are how they relate to each other. For example, a teacher can “own” a book. Between these are the associative entities, which are another table that contain references to the main tables. These relations themselves also have attributes, which are usually made up of IDs from the connecting tables. From this, you can see that I have a total of eight tables (four main and four associative).

4 Leave a comment on paragraph 4 0 The lines between the main tables denote the type of relationship. Mine are entirely made up of many-to-many relationships, which are shown by the three-way fork that connects to the associative table. This means that the main tables can have many relations between them. An example of this is how a teacher can own many books and a book can have many owners. Now, you can’t think of them as specific objects; the book is not a specific book, but rather the idea of one. The Hobbit can be owned by multiple teachers because there are multiple copies of it.

5 Leave a comment on paragraph 5 0 It’s tough to explain ER diagrams over a quick blog post, but I hope the idea made it through. The annoying thing about them is that depending on who you ask, they’ll explain different ways of how to make them. I actually learned them in undergrad using a different set of relational arrows than most and it was devoid of associative tables. That was just how my professor taught them. A good resource is this Wikipedia entry and also this step-by-step explanation.

6 Leave a comment on paragraph 6 0 I also made my diagram using ERDPlus. They have a free stand-alone version that allows you to create an image and save an ER file.

7 Leave a comment on paragraph 7 0 I hope this was somewhat helpful. Please feel free to ask me any questions.

css.php

Source: https://dhpraxisfall16.commons.gc.cuny.edu/2016/12/16/1467/

Need help with the Commons? Visit our
help page
Send us a message
Skip to toolbar