j.silver Posted November 12, 2015 Share Posted November 12, 2015 I am creating a table using phpMyAdmin. I would appreciate if someone would explain: In the collation, I am selecting utf8_general_ci. Is this OK? For indexing, when should I use ''unique and when would I use 'index'? Link to comment Share on other sites More sharing options...
justsomeguy Posted November 12, 2015 Share Posted November 12, 2015 In the collation, I am selecting utf8_general_ci. Is this OK?It's OK if you want to use case-insensitive UTF-8. For indexing, when should I use ''unique and when would I use 'index'?Use unique if you want the database to enforce unique values in that column. Make it an index if it is a foreign key or is often used for searching, like with joins or the WHERE clause. Link to comment Share on other sites More sharing options...
j.silver Posted November 13, 2015 Author Share Posted November 13, 2015 Many thanks, jusomeguy. When should we use utf8_general_mysql500_ci and is it better to use it or use utf8_general_ci? Which of the two provides better security for DB to avoid hacker's attack? Link to comment Share on other sites More sharing options...
Ingolme Posted November 13, 2015 Share Posted November 13, 2015 Collation has no relevance to database security. It does not matter which you choose. Collation determines how text fields are ordered when doing a search. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now