Relational model for user login

Asked

Viewed 416 times

1

I need to make a simple trademark registration system, but I would like the person who is registering a new brand to be logged in to the system, I have a difficulty where to fit the login table in my relational model.

If there’s something wrong with my template, you can let me know and help me place the Login table?

Here is my model:

Modelo

  • What would that be login?

  • This login would be to allow the user to have access to the registration of marks, that is, if he does not login, he can not change anything, only view the registered marks

  • 1

    "Login" is an operation, the operation of logging into the system. In this case it does not need a table, the user table already has the necessary data to perform the "login".

  • But you already have it on the user.

  • And how I would make the user table relationship with others?

  • What others? I cannot see any direct relation, at least according to your description.

  • 1

    Usually when speaking in a login table, it is to save the dates that the user has been authenticated, can also be saved information such as source IP and device used, for security purposes

Show 2 more comments

1 answer

1


Without knowing the real requirements there is not much to help, they are always the ones who will define what is right or wrong. If there was only one way to do it then everything would be ready and no one would ever have to do it again. Even in an exercise he needs to define well what he wants.

Abstractly, within my knowledge, I see no reason why there should be a table of login, after all already have this information in the users table.

The login It’s a pretty isolated operation and it’s not usually related to other parties. You authenticate there, get permission (on more sophisticated systems you can have permissions tables) and end up using it. The application should treat this properly. The other tables have nothing to do with the login which is a mechanism of application, the other tables are part of the domain of the problem itself. Unless that table is there for another reason.

In addition in general the more experienced say that it does not make sense to name a table with a prefix tbl, is redundant information that decreases readability.

It seems to me that you want to create a relationship at all costs even if they’re not needed.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.