简体   繁体   中英

Definition of entity in EER Diagram

I have to write the conceptual diagram of a DBMS.

I have a very simple, maybe banal question, but I found no answers on the internet.

This DBMS will be used by the secretaries of a school. In this schema there are entities like students, courses, exams and so on.

Can I also add the entity " secretary ", even if the secretaries will be the ones who will use the DBMS?

Sure your can. You can, and in fact, you should throw everything on your conceptual design whiteboard that has any relevance to your system. And do some contemplation of where the chips might fall.

Usually you would have a "User" in your system, and that "User" might be a "Secretary" but very quickly you have other "Users", which would include the "Students" and possibly "Managers" and "Advisors".

The whole point about a word as general as "Entity" in an Entity-Relationship Model is that it is general and anything whatsoever of interest to your problem can be an "Entity" in that sense.

An entity is a type of thing to store in your database system.

Each different entity type has an identifying key, and a distinct set of attributes. For example, a user entity might have some identification number, and perhaps attributes for login name, password, creation date, email, real name, etc.

Then you have to ask if a secretary is just one of the users, or is it a distinct entity?

The answer is driven by whether a secretary has unique attributes. Is there some fact about each secretary that needs to be stored in the database, that no other user has?

If not, then perhaps secretary is just an example of a user entity. Maybe it would be helpful to make the user entity have an attribute column to note the type of user (secretary, administrator, faculty, parent, etc.), but not create a separate entity unless the category of secretary needs their own attributes.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM