Is it OK to have an entity in an ER diagram without a relationship

database-designerd

I'm creating an ER diagram for a class assignment and I was wondering if it would be possible to create an entity that had no direct relationship to any other entity, and simply use foreign keys to connect them. The diagram below illustrates what I'd like to do

enter image description here

Basically, my diagram is starting to get really complex and it would be great if I didn't have to maintain a connection between every single entity.

FWIW, I'm using Chen and Crow's Foot notation, if that's any help.

Best Answer

An ER diagram is merely a tool to aid you in development. An ER diagram doesn't even by mandate require you to show all the entities in the system.

So to answer your question by one route: It's perfectly acceptable to have an entity on a diagram that has no relationship to any other entity. Consider a settings table that is used by a simple application to store the settings for the program. It would not need any other entities to do its job. But it would still be an object which existed within the scope of the datastore.

So to answer your question by another route: You can display as many or as few diagrams on your ER diagram as are required to show the information you're trying to represent. But if you choose to omit a relationship for purposes of clarity, it would still make sense to make a note that the R is omitted. I would personally but a -{#} with a number inside the related circles for each entity, with a footnote for that # at the bottom of the page. That way other readers won't have to ask if there should be another relation.

That's my $0.05 worth on this one anyways. The point here is that this is partly a matter of style. Some people will tell you that you always have to put the relationships (like, for instance, your boss might require that, and that would trump my advice). But the final truth is what's in the database.