0

I'm trying to model a database (for my assignment) that involves two user groups that post content to the platform. A third user group would be the system/database admins that are responsible for moderating these posts, as well as handling user accounts (and all the data in the DB for that matter).

My issue is that the DB admins are clearly a significant entity, however I'm having trouble modelling them into the ERD. For instance, if I have a relationship that looks like this:

  • [Admin] -- <Manages> -- [Customer] or
  • [Admin] -- <Moderates> -- [CustomerPost]

This would imply one particular Customer/CustomerPost can only be managed by one particular Admin. I have considered using a common "Moderation" bridge entity that can connect Admins with all the other entities they need to manage, but I'm unsure about this (it seems like a weird thing to store in the DB).

My other option would be to simply model Admins as a subtype of the general "User" entity, and omit relational connections to anything else in the ERD, with the assumption that they can access the data of every other entity in the DB.

Essentially, I am under the impression that an ERD should model things only on the higher business/system level, and not on the lower database/metadata level (where the Admins would operate).

  • Re "looks like this" It's not clear what rows you are trying to say are in this relationship in a given situation. I suspect you're trying to say, 'a row in it satisfies one bullet or the other', but that makes no sense because they have different columns--likely you mean, '[A] manages [M]' where a M can be a C or CP. (Saying rather that a row in it it satisfies the OR of the bullets is neither sensible nor practical.) Re "This would imply one particular Customer/CustomerPost can only be managed by one particular Admin." Why? A given M could just appear with multiple As. – philipxy Mar 24 '19 at 05:40
  • Possible duplicate of [How can you represent inheritance in a database?](https://stackoverflow.com/questions/3579079/how-can-you-represent-inheritance-in-a-database) – philipxy Mar 24 '19 at 05:52
  • What does your last paragraph have to do with the rest of your post? Either you model admins or you don't. Anyway: Make up your mind whether you are modeling a DB that can represent all your user types or just some of them. Presumably your "conceptual" database has 2 "external" ones, Admin & Customer. (ANSI schema terms.) PS All 3 of admin vs customer (types of users), customer vs customer post (types of managed things) & groups (ie types) of customer user involve DB subtyping/inheritance--a faq. PS Admin of your application is not the same as an admin of the DBMS implementing the application. – philipxy Mar 24 '19 at 06:03

0 Answers0