Re: Normalization question



* top posting fixed *

"Last Boy Scout" <BadBill@xxxxxxxxxxxxxx> schreef in bericht
news:FaBUh.1190$7n.877@xxxxxxxxxxxxxxx
amygdala wrote:
Hi,

Not too experienced yet when it comes to database normalization. And
right now I'm working on a project in which I would like to have user
profiles:

My first impulse was to create a User table, a Person table and a
Person_profile table

The User table would just have the basics for a user to access in the
system:
- id // unique id
- username
- password
- email // needed for registration verification
- active // is user allowed to login?

The Person table would have extended info about that person:
- id // unique id
- user_id // foreign key User.id
- gender
- firstname
- lastname
- birthdate
- phone
- etc..

The Person_profile table would have stuff like:
- id // unique id
- person_id // foreign key Person.id
- image
- url
- description
- active // is user allowed to have a profile
- etc..

This all seemed logic from a perspective that things should be clarifying
and well structured. Also I'm not to thrilled about having too many
columns in one table (possible performance issues?)
But the more I think about it the more I get the feeling that this
approach is unnecessary, because all the information so far still belongs
to only one user.
And from browsing a little through some recent threads in this group I
also got the impression that the id's in each table is overkill too.

What are some of your views on this structure? Insights are much
appreciated.

Cheers.
If you use an ID number as they key, one problem can be looking for
duplicates as you enter the data. This is a problem if the key is a
completely incremented field.

Thanks for your insights.
I hear you. I would have used UNIQUE KEY `email` (`email`) and UNIQUE KEY
`username` (`username`) though. But using email as primary key is probably
better yeah.

PS.: Please don't toppost, as it makes threads difficult to read.


.



Relevant Pages

  • Normalization question
    ... Not too experienced yet when it comes to database normalization. ... now I'm working on a project in which I would like to have user profiles: ... email // needed for registration verification ...
    (comp.databases)
  • Re: roaming profiles
    ... Robbo wrote: ... > Do I put %USERNAME% or the actual username. ... >> Set up a profiles folder on the server wherever you wish (and have ... Call it profiles, and share it as profiles$ to hide ...
    (microsoft.public.windows.server.sbs)
  • Re: Python doesnt understand %userprofile%
    ... what do you mean "run on machines where the username is ... can get quite complicated if users have roaming profiles and the like. ... I'm surprised you didn't mention your excellent winshell utility. ...
    (comp.lang.python)
  • Re: Change names, usernames - newbie
    ... install up initially, so this is what I have to work with. ... to Manage Users -- it has the old AD username for the user. ... Nor do I understand why I have user profiles, ... I created user groups in windows and added members to this...i then ...
    (microsoft.public.sharepoint.windowsservices)
  • Re: Python doesnt understand %userprofile%
    ... the expansion of environment variables like USERPROFILE is done for you by the shell or the command prompt. ... what do you mean "run on machines where the username is ... can get quite complicated if users have roaming profiles and the like. ...
    (comp.lang.python)