0

I'm trying to write a diagram, but I have the following question: my site must manage a User entity and a signed-in user one. Since the signed in the entity must be generalized from the user one which attribute can be inserted into the user-father entity to make the diagram correct? Otherwise, it can exist a father entity without any primary key attribute? Can you suggest me some advice to solve the problem? Thank you

whackamadoodle3000
  • 6,684
  • 4
  • 27
  • 44
Cyberch
  • 1
  • 1
  • Would you need the second table to keep information ONLY on currently signed in users or do you need it to hold information on sign in and sign out-s? This would affect the answer. If you only need `Users` and currently signed in users you could just have an attribute on the `User` table,`IsSignedIn` or so, to keep track if the user is signed in at a certain moment. Otherwise, if you would also need timestamps of signing in and out for each user, you would need a new table, called `Logins` (`SignIns?`, whatever) which would have a foreign key to the `User(UserId)` table. – Rigerta Sep 13 '17 at 23:11
  • Maby i don't write my question very clearly. The two entities did not have common attitude tributes since but logically one is derivated from the other(signedInUser->User) Ouwever the SignedUser entity share a relation with his father. From a theoretical point of view, may i divide the two entities cutting the relation between then? It is correct? – Cyberch Sep 13 '17 at 23:24

0 Answers0