Reputation: 5148
Recently I got a project about making a script to generate serial keys for some company's software. At first my idea was saving on different MySQL tables for each software. What they required me to do was generating 2000 unique key codes for each of their 10 software . After hearing that amount of data they are asking , my concern went on saving the data on different text files.
Now I'm thinking of a solid MySQL table with 10 columns for each software and saving 2000 serial keys in columns as text format.
each serial key is a 10 integer code and without repetition.
they are asking to make a script that can generate serial keys for printing on CD's and in their website they need a script that can get the serial key from a end user and mix it with a unique computer encoded key and give the users a password .
In this case , I think saving on text files is a better idea as MySQL database can't cope with this giant amount of data , but I am not sure about security of this action.
My problem is the decision I should make about the database design of my project .
Which one do you suggest ?
Upvotes: 0
Views: 52
Reputation: 72636
I don't understand why saving this data into a MySQL database could be a problem, for example you can design two simple tables like the followings :
Table : programs
-id - INT [PK]
-name - VARCHAR(50)
Table : serials
-id - INT [PK]
-p_id - INT [FK] ---> programs.id
-scode - INT (the program serial)
One table (programs) contains the list of the program (it is a kind of enum for the available programs), the other one contains programs serial number referring to a specific program in the programs table .
Upvotes: 2