PranilDahal / Eagle-Post

Eagle-Post: Social Media Software Project - ACM Cal State LA
11 stars 2 forks source link

MySQL id creator #25

Closed calstatelaacm closed 5 years ago

calstatelaacm commented 6 years ago

Currently, we use AUTO_INCREMENT to create the unique ids for users, organizations, etc. Do some research, and find a way that can create a unique random string of mixed numbers and chars. And try to implement it so that whenver there is a new entry in the - lets say SSU table - it creates a random unique id thats a bit more complicated than what AUOT_INCREMENT does.

My ideas: Google "MySQL GUID" GUID stands for Globally Unique Identifier. It is a 16 byte data type that is globally unique across tables. The chances of 2 GUID's being same is less than the chances of you being hit by a metor on a tuesday morning.

You will need to create funtion/trigger that will generate a GUID when a SSU/user is inserted to the database. Find out a way to implement GUID into our mySql database.

Google it. Do research on how to create random unique id. Update our sql setup scripts accordingly.

PranilDahal commented 5 years ago

Implemented by Brian.