views:

68

answers:

1

Hi Guys,

I'm trying to develop a system, and doing the ER diagram now, i have two questions

  1. I'm always thinking about the process and trying to do the ER, now i'm so confused i can't really think and do it, even though i have a knowledge in databases, how to over come this?

  2. how to represent a login in the ER? please elaborate guys?

thanks in advance!

regards, Rangana

A: 

The "login" itself can't be presented in the database. You mean users and their access, maybe their rights inside groups/ACL/...

In the most basic case, you would have a usertable with the login data

       user
---------------------
id            int
name          varchar
passwd        varchar
[ last_login  datetime
active        boolean
..... ]

Of course this is a simple example and needs to be adopted. So if you need more provileges, you could introduce a is_admin (bool) column. For more ACL stuff, you can create a groups table that stores the permissions and is connected to the user with a n:m relation.

DrColossos