PDA

View Full Version : Understanding A Social Networking Database


wiseguy89
04-23-2008, 09:06 AM
Does anyone have a link to a sample model of a social networking database? If not, then can someone please explain to me how you can generate a user ID upon registration? For example lets just say I register and my ID is 399, how would the next user automatically be registered as 400? Where would you specify the auto-incrementation?

abduraooft
04-23-2008, 09:17 AM
http://dev.mysql.com/doc/refman/5.0/en/example-auto-increment.html

wiseguy89
04-23-2008, 09:32 AM
for a social networking, do you think that i should start with a number more then 1 or would that be fine for security issues?

abduraooft
04-23-2008, 09:35 AM
I don't think so. If you wish, it's also possible ,mysql> ALTER TABLE tbl AUTO_INCREMENT = 100;

Andrew Johnson
04-23-2008, 05:44 PM
How does raising a user's id increase security ?

Fumigator
04-23-2008, 09:03 PM
Most script kiddies can't count past 10?

DaveGerard
05-07-2008, 06:41 AM
I can't speak for MySQL, but for MsSQL, to create an identity column you basically create a column with a data type of INT and select 'Yes' for the identity property. This would also be your primary key and it will auto-increment.

It doesn't really matter what number you start the IDs at, but MsSQL will let you chose your seed (first) number.

Hope that helps.

Dave