Link to home
Start Free TrialLog in
Avatar of CEHJ
CEHJFlag for United Kingdom of Great Britain and Northern Ireland

asked on

User database

Can anyone point me in the direction of the SQL DDL for a standard website user database? E.g. username, password, address etc.
 
Perhaps as part of a larger ecommerce db?
Avatar of krispols
krispols

create table USERS(
USR_ID numeric(10,0) identity,
USR_LOGIN varchar(20) not null,
USR_PWD varchar(15) not null,
USR_PWD_PHRASE varchar(100) null,
USR_PWD_ANSWER varchar(100) null,
USR_EMAIL varchar(50) not null,
USR_EMAIL_OK char(1) not null,
USR_CREATED_DATE datetime not null,
USR_CHANGE_DATE datetime not null)

the field USR_EMAIL_OK is must be set to 'N' until user confirm his email address by answer to the confirm email, then set to 'O'.

regards
Avatar of CEHJ

ASKER

OK thanks. I'm toying with the notion of there being no id column though. Possibly email as PK...
ASKER CERTIFIED SOLUTION
Avatar of krispols
krispols

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of CEHJ

ASKER

That's a point, thanks.
Avatar of CEHJ

ASKER

Thanks. Although i've still not come  to a decision on how these things should be done!