Okay, so I'm creating an SQL database to run an archive system off of, but I'm somewhat confused as to what a couple things mean:

What does the Null option mean? what is it used for?

What is the difference between an empty default value and a "NULL" one?

what is "unsigned"?

Yes, I'm googling this, but I can't seem to find much.
unsigned means whether it can't hold negative values.
Third line in the second Google result: http://en.wikipedia.org/wiki/Unsigned
Null means a blank entry, ie, not only zero, but no value whatsoever.
Okay, didn't think to search just for "unsigned" >>;;
Anywho, the wiki article helped. I suppose it's best to have archive db fields unsigned.

As for NULL, I still don't understand what it's USEFUL for in an SQL database. Confused Is it better to have fields that will be user-defined set to be NULL?
NULL is useful if you want to be able to distinguish between a field that has not been set to anything yet, and a field that has been set to zero.
ah, so whether it's Null or Not Null wouldn't really matter in the case of an archives database since the fields wouldn't be changed beyond initial user definition.

Also, one last question:

What's the point of "Unique" and "Index"? I know "Primary" would be the main field that has to have defined values, but the others I don't know.
unique columns can't have multiple instances of the same value between rows

an index is an auto incrementing column
Ah, but under phpMyAdmin, I can only choose one of the three and "auto_increment" is a choice under "extra"
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement