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?
LVL 87
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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'.

CEHJAuthor Commented:
OK thanks. I'm toying with the notion of there being no id column though. Possibly email as PK...
hello CEHJ,

Carrefull with PK on varchar type, it's really slowest than on numric type. It's also consume more disk space to build the index.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
CEHJAuthor Commented:
That's a point, thanks.
CEHJAuthor Commented:
Thanks. Although i've still not come  to a decision on how these things should be done!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.