Database Research & Development

  • Home
  • NoSQL
    • NoSQL
    • Cassandra
  • Databases
    • Database Theory
    • Database Designing
    • SQL Server Coding Standards
    • SQL Server
    • PostgreSQL
    • MySQL
    • Greenplum
    • Linux
  • Interviews
    • SQL Server Interviews
    • MySQL Interviews
    • SQL Puzzles
  • DBA Scripts
    • SQL Server DBA Scripts
    • PostgreSQL DBA Scripts
    • MySQL DBA Scripts
    • Greenplum DBA Scripts
  • Home
  • Blog Archives !
  • (: Laugh@dbrnd :)
  • Contact Me !
sqlserverinterviews
Home 2015 October Database Theory: What is Character Set and Collation

Database Theory: What is Character Set and Collation

This article is half-done without your Comment! *** Please share your thoughts via Comment ***

In this post, I am sharing small Database theory on Character Set and Collation.
As we are Database Professionals and already experienced with “Collate” in SQL Server and MySQL.
I found that fresher and intermediate Database Professional have doubt and question about Character Set and Collation.

Let me clear this with a natural note.

What is Character Set?

A Character Set is nothing but just a list of symbols and encodings.

For example, latin1 and UTF-8 are the most traditional character set.
Using latin1, you will be able to write all American words because latin1 contains all ASCII characters, which are sufficient to write an English word. On the contrary, with ASCII you will not be able to write all words of Western European specific languages because for instance, characters like ‘ë’, ‘õ’, ‘Ñ’ are missing.

A Character Set encodes characters so that they fit in memory. For example, the euro symbol, €, will be encoded as 0xa4, and in UTF-8, it will be 0xe282ac.

What is Collation?

A collation is a set of rules for comparing characters in a character set. It has also ruled for sorting of characters, and proper order of two characters varies from language to language.
A Collation compared two strings like, if a word is greater than another one, and sort accordingly.

If you are using “latin1” Character set, you can use “latin1_swedish_ci” Collation.
You have to choose right collation because wrong collation may affect your database performance.

Now create one database in MySQL using Character Set and Collation:

1
CREATE DATABASE DatabaseName CHARACTER SET latin1 COLLATE latin1_swedish_ci;

Oct 29, 2015Anvesh Patel
MySQL: Mathematical Calculation using Values, Parameters, Variables and ColumnsMySQL: How to change default Character set to UTF-8
Comments: 3
  1. Marcia Cerullo
    November 25, 2015 at 12:43 am

    Nice theory thanks !

  2. marinir
    December 17, 2015 at 6:00 pm

    This is the right site for everyone who wishes to understand this topic. You realize so much its almost tough to argue with you (not that I really would want toHaHa). You certainly put a fresh spin on a subject that’s been written about for a long time. Wonderful stuff, just great!|

  3. Salis
    February 16, 2016 at 6:08 pm

    well-favored than you may be now. You’re so intelligent.

Anvesh Patel
Anvesh Patel

Database Engineer

October 29, 2015 Database TheoryAnvesh Patel, character set, collation, database, database concept, database research and development, database standards, Database Theory, database topic, dbrnd, latin1, RDBMS, utf-8
About Me!

I'm Anvesh Patel, a Database Engineer certified by Oracle and IBM. I'm working as a Database Architect, Database Optimizer, Database Administrator, Database Developer. Providing the best articles and solutions for different problems in the best manner through my blogs is my passion. I have more than six years of experience with various RDBMS products like MSSQL Server, PostgreSQL, MySQL, Greenplum and currently learning and doing research on BIGData and NoSQL technology. -- Hyderabad, India.

About DBRND !

dbrnd

This is a personal blog (www.dbrnd.com).

Any views or opinions represented in this blog are personal and belong solely to the blog owner and do not represent those of people, institutions or organizations that the owner may or may not be associated with in professional or personal capacity, unless explicitly stated.

Feel free to challenge me, disagree with me, or tell me I’m completely nuts in the comments section of each blog entry, but I reserve the right to delete any comment for any reason whatsoever (abusive, profane, rude, or anonymous comments) - so keep it polite.

The content of this website is protected by copyright. No portion of this website may be copied or replicated in any form without the written consent of the website owner.

Recent Comments !
  • Anvesh Patel { Sure will do... } – May 27, 12:43 PM
  • Anvesh Patel { Great... } – May 27, 12:41 PM
  • Anvesh Patel { Great... } – May 27, 12:39 PM
  • Anvesh Patel { Great... } – May 27, 12:36 PM
  • Anvesh Patel { Great... } – May 27, 12:28 PM
  • Anvesh Patel { Great... } – May 27, 12:27 PM
  • Anvesh Patel { Great... } – May 27, 12:16 PM
  • Older »
Follow Me !
  • facebook
  • linkedin
  • twitter
  • youtube
  • google
  • flickr
© 2015 – 2019 All rights reserved. Database Research & Development (dbrnd.com)
Posting....