INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

UTF8 database with one table that doesn't need to be

UTF8 database with one table that doesn't need to be

UTF8 database with one table that doesn't need to be

(OP)
I will be making multiple copies of this structure, so little decisions like this will add up. My database has 24 tables, and all but one of them might have multibyte characters entered in them, so the tables are UTF8 with either utf8_general_ci or utf8_unicode_ci collation, whichever seemed to make the most sense. But one little reference table only holds MIME encoding info, so it will have nothing but ASCII text and a couple of booleans.

So my question is: Is it better for all the tables in a database to use the same character set (and just vary at the column level sometimes), or if even one table can be ASCII it is best to make it so? In other words, if all the rest of the tables are UTF8, which of these would fit better into that environment?

CODE --> SQL-choice-A

CREATE TABLE IF NOT EXISTS `uploadtype` (
  `Extension` varchar(8) character set ascii NOT NULL,
  `MIME` varchar(100) character set ascii NOT NULL,
  `BinaryFile` tinyint(1) NOT NULL default '1',
  `InBrowser` tinyint(1) NOT NULL default '0',
  PRIMARY KEY  (`Extension`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; 

CODE --> SQL-choice-B

CREATE TABLE IF NOT EXISTS `uploadtype` (
  `Extension` varchar(8) NOT NULL,
  `MIME` varchar(100) NOT NULL,
  `BinaryFile` tinyint(1) NOT NULL default '1',
  `InBrowser` tinyint(1) NOT NULL default '0',
  PRIMARY KEY  (`Extension`)
) ENGINE=MyISAM DEFAULT CHARSET=ascii; 

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close