SDU Tools: T-SQL tools for working with Chinese Calendars and Years in SQL Server

To celebrate Chinese New Year this week, I thought I should write about some options that we recently added to our free SDU Tools for developers and DBAs, for working with Chinese calendar concepts.

Let's start with the basic one: when is Chinese New Year? We added a function called DateOfChineseNewYear. You just supply our year number (Gregorian calendar), and it will tell you when Chinese New Year is.

You can see it in use in the image above, along with the much more cute function that tells you what the Chinese Zodiac animal is for the year. It's called ChineseNewYearAnimalName.

So next year (2020), Chinese New Year is January 25th, and it will be the year of the Rat.

These functions all work for years 1900 to 2099.

We also added a useful view called ChineseYears for working with these. It contains the following:

You can see them all in action here:

To become an SDU Insider and to get our free tools and eBooks, please just visit here:

http://sdutools.sqldownunder.com

Happy new year to all my Chinese buddies

Just a quick post to say Happy New Year to all my Chinese buddies and family members, and welcome to the year of the pig.

新年快乐 (Xīnnián kuàilè)

is pretty much "Happy New Year" directly translated. It's pronounced pretty much like "shin neean kwai ler", so remember to say that to your Chinese friends.

But you'll often also hear:

恭喜发财 (Gōngxǐ fācái)

which is pretty much "wishing you happiness and prosperity". It's pronounced pretty much like "gong she far tsai".

恭喜恭喜 (Gōngxǐ gōngxǐ)

is a phrase you'll often hear just for "congratulations".

Thank you to all those who've helped me with my continued learning of the Chinese language and culture.

 

Learning Mandarin

I'll write more soon on the best methods for learning. If you want to get a taste for it in the meantime though, my current favorite site is iTalki, and my favorite teacher by far is Amy He. If you decide to try it, click here and it's cheaper for both you and me.

Learning Mandarin: PinYin Sound Groups

In an earlier post, I described the use of Pīnyīn (拼音). It allows us to enter Chinese characters quickly, using a keyboard that's designed for Western languages like English.

When you first look at the characters though, you might not realize that there isn't a random pattern to them, the characters are constructed from particular groups of sounds.

The words are constructed from 声母(Shēngmǔ) or "initials" and 韵母(Yùnmǔ) or "finals".

The initials come from this list of single characters:

b, c, d, f, g, h, j, k, l, m, n, p, q, r, s, t, x, z

and this list of double characters:

ch, sh, zh

The finals come from this list of single characters:

a, o, e, i, u, ü 

and this list of double characters:

ai, ei, ao, ou, ui, iu, an, en, in, ün, er

and finally, this list of triple characters:

ang, eng, ing, ong

You'll find that all words are created from this list of initials and finals.

Learning Mandarin

I'll write more soon on the best methods for learning. If you want to get a taste for it in the meantime though, my current favorite site is iTalki, and my favorite teacher by far is Amy He. If you decide to try it, click here and it's cheaper for both you and me.

Learning Mandarin: Electric words

I mentioned last week that the word for computer 电脑 (diànnǎo) was wonderful because it was literally "electric brain".  I tend to learn words in groups rather than individually, and the words related to electricity  (diàn) are fun.

I love the allusions that they bring forward, and I thought you might enjoy knowing a few of them.

电力 (Diànlì) or "electric power" means just what it says but is often used for just electricity.

电子 (Diànzǐ) could be translated like "electric child", so that one's a bit odd. It means "electronic" as an adjective, and "electron" as a noun.

电梯 (Diàntī) or "electric ladder" is an elevator.

电影 (Diànyǐng) is one of my favorites. It's close to "electric shadow" and means "movie".

电话 (Diànhuà) or "electric speech" is "telephone".

电视 (Diànshì) or "electric vision" is "television".

电信 (Diànxìn) or "electric letter" is "telecommunications".

A less common one today 电报 (Diànbào)  or "electric newspaper" is "telegram".

电池 (Diànchí) or "electric pool" is "battery".

电车 (Diànchē) or "electric vehicle" is "tram".

电灯 (Diàndēng) is literally "electric light".

电线 (Diànxiàn) or "electric line or pipe" is "wire".

Also, some the other way around like:

闪电 (Shǎndiàn) or "flash electricity" is "lightning".

And there are many, many more. I really love the way that many of these have been formed.

Learning Mandarin

I'll write more soon on the best methods for learning. If you want to get a taste for it in the meantime though, my current favorite site is iTalki, and my favorite teacher by far is Amy He. If you decide to try it, click here and it's cheaper for both you and me.

Learning Mandarin: Using measure words

Over the years, I've enjoyed attending trivia nights at local pubs and schools. It's fun to try to stretch your thinking, and of course, fun to meet up with lots of interesting people. I can't tell you how many times though, I've been asked about collective nouns for words in English.

"Group" is a common enough word, but if you use it all the time, you won't be considered very literate. While you can say "There is a group of dogs", it's more correct to say "There is pack of dogs". Instead of "There is a group of sheep", you say "There is a herd of sheep".

A similar thing applies to individual items within a collection. We could say "This is a paper", the meaning isn't the same as if we say "This is a piece of paper". The word "piece" is a type of word that's used to measure part of a collection i.e. it's a "measure word". "Three coffees" isn't quite as meaningful as "Three cups of coffee". If you said "Three pieces of coffee", you'd probably get strange looks.

A similar thing happens in Chinese, but it's even more pronounced. That's most likely because it doesn't have separate words for singular and plural nouns like we do. We know that when we say "goose" we mean one, and by "geese" we mean more than one.

The general word for a unit is  (gè). While you could use it for almost anything, you'd sound like you can't speak properly. So part of the trick is learning a bunch of measure words. So, instead of

那是一个狗。(Nà shì yīgè gǒu.) or "that is a dog"

you'd instead say 那是一只狗。(Nà shì yī zhǐ gǒu.)

or even 那是一条狗。(Nà shì yītiáo gǒu.)

Note that the measure word for dog is  (zhǐ) but (tiáo) is also a generic measure word for long skinny things. It can be used for dogs, but also applies to snakes, fish, etc.

So, previously I mentioned "a piece of paper". That would be: 一张纸 (Yī zhāng zhǐ) In this case (zhāng) is the measure word  or 量词 (Liàngcí) for paper (). So three pieces of paper is: 三张纸 (Sān zhāng zhǐ)

And while it's important to learn that  (Chuán) is a ship or boat, it's just as important to know that five ships is 五艘船 (Wǔ sōu chuán) where  (sōu) is the measure word for ships. And two books is 两本书 (Liǎng běn shū) where  (běn) is the measure word for books. One computer is 一台电脑 (Yī tái diànnǎo) where  (tái) is the measure word for computers.

By the way, the word computer 电脑 (diànnǎo) is wonderful. It's literally "electric brain".

This is a pretty good reference for these measure words: 

http://www.languagerealm.com/chinese/chinese_measure_words.php

Learning Mandarin

I'll write more soon on the best methods for learning. If you want to get a taste for it in the meantime though, my current favorite site is iTalki, and my favorite teacher by far is Amy He. If you decide to try it, click here and it's cheaper for both you and me.

Learning Mandarin: Tone rules also apply

I mentioned in an earlier post that Mandarin was a tonal language and I described the four tones and the neutral tone. Well, while that's all true, things aren't quite a simple as that.

There are also tone rules that can change the pronounced tone for a word. Let me show you:

One rule says that if  you have two third tones in a row, the first character changes to second tone. (It will still be shown as 3rd tone in pinyin). An example is the simple greeting (literally "you good" but used as "hello") that is the first thing most people learn in Mandarin (although not all that many natives say it that often):

你好 (nǐ hǎo)

It's not pronounced with two descending and rising tones like the tones (both 3rd tone) would suggest. The first character is pronounced with a simple rising 2nd tone, and the second character is pronounced as expected.

One tricky rule deals with the character 一 (yī) that means "one". On its own, it's 1st tone. But then it gets messy. If the next character is 4th tone (a sharp fall), then this one is 2nd tone. But if the next character is any other tone, it becomes 4th tone. Here is an example:

一个 (yī gè)

The word ge is a general purpose measure word. But because it's 4th tone, yi is pronounced as a 2nd tone instead of its usual 1st tone. That helps to make the falling sound of the second character more emphatic.

Another rule for today is about the word  (bù) (which means "not"). It's normally 4th tone, but when it precedes another 4th tone, that would sound a bit odd, so it changes to a second tone. Again that makes the drop on the next character (which is the more important one for the meaning), more emphatic. Here is an example:

不错 (bù cuò)

This basically means "not bad" or more literally, "not wrong". Learning

Learning Mandarin

I'll write more soon on the best methods for learning. If you want to get a taste for it in the meantime though, my current favorite site is iTalki, and my favorite teacher by far is Amy He. If you decide to try it, click here and it's cheaper for both you and me.

Learning Mandarin: Tones used in Mandarin

I mentioned in an earlier post that Chinese dialects are tonal. As well as words being different in different dialects (but often still the same characters), the tones are also different for different dialects. Mandarin is generally considered to have four tones or  声调 (Shēngdiào) plus a neutral tone. So, some would describe that as a total of five tones.

The first tone or 第一声 (Dì yī shēng) is often drawn as level but it's actually both high and level.

An example is  (Mā) meaning mother. The second tone or 第二声 (Dì èr shēng) is a rising sound.

An example is  (Má) which is a word for hemp. The third tone or 第三声 (Dì sān shēng) is a falling then rising sound.

An example is  (Mǎ) which means horse. The fourth tone or 第四声 (Dì sì shēng) is a sharp falling sound.

An example is 骂 (Mà) which means to curse or is a curse.

The neutral tone is both central and flat. An example is  (Ma) which is like a question mark. In the main image above (by Lufti Gaos), you can see yet another "ma". The second word from the top means "code" and is also 3rd tone. (The sentence basically means "scan code, use bike". The last word is more like "vehicle" but here it'll be an abbreviation of the word for bike).

It's important to understand that Chinese people don't hear the above words like variations of the word "ma". They hear them as different words.

Learning Mandarin

I'll write more soon on the best methods for learning. If you want to get a taste for it in the meantime though, my current favorite site is iTalki, and my favorite teacher by far is Amy He. If you decide to try it, click here and it's cheaper for both you and me.

Learning Mandarin: What is pinyin?

I've mentioned before that the Chinese language uses tens of thousands of characters. It's the same for either simplified or traditional Chinese. That can make it hard for someone learning the language, as there seems to be an endless list of characters to learn.

You also might not have thought about it, but how do you type all those characters on a standard computer keyboard? The answer to both those questions is Pīnyīn (拼音).

For people who are familiar with western character sets,  Pīnyīn provides a way to represent the Chinese words with familiar characters.  This makes it easier to type them on a keyboard as well.

In the main image above, I told Google Translate that I was going to type Chinese characters. Instead, I typed the characters pinyin into it, and it showed me things that I could have meant. Here's another example. I'll type ma:

It shows me the characters and I can choose which one I want by just typing the number. The first one is a horse, the second one is like a question mark, the third one is a mother, and so on.

Tones are really important and while each of those is ma, they don't all have the same tone. We'll talk about that more another day. We don't need to enter the tone to find the character.

While the Pīnyīn characters look familiar, and many are pronounced as you'd expect, you do also have to learn how to pronounce them. For example, the character is written as Xīn but is pronounced more like "shin". Additional characters also change things. For example, while  is written as  and pronounced like "chee", the character  is written as Qiě and pronounced more like "chair".

There are also some sounds that we really don't have. For example, the character  is written as Céng but the "c" is pronounced more like "ts", so this is like "tseng".

If you try to learn this, it won't take that long to get to a point where you can read Pīnyīn fairly easily. Because Japanese has a lot of Chinese characters (they call them 漢字 or Kanji), they also adopted a way of writing using our familiar characters. It's called ローマ字 or Romaji. It works much the same:

 

Learning Mandarin

I'll write more soon on the best methods for learning. If you want to get a taste for it in the meantime though, my current favorite site is iTalki, and my favorite teacher by far is Amy He. If you decide to try it, click here and it's cheaper for both you and me.

Learning Mandarin: Loan words can be tricky

In English, we often "borrow" words from other languages. The Chinese call these "loan words". For example, we might talk about a feeling of Déjà vu. Now we'll often write it without the original accents on the "e" and the "a" but we'll happily just use the French word in conversation.

Ironically, the French tend to do the opposite. They keep inventing words to fill in the gaps in their language. I've heard that this is causing them great difficulty in technical words and that their language academy is a long, long way behind in creating those words.

In Mandarin, a similar thing happens. And it's one of the things that confuses me when I'm reading Mandarin. Let's look at an example:

夏洛克  (Xià luòkè)

I normally read the first character as being related to summer. The second character is often a surname. It's also an old name of several rivers in Henan, Shaanxi, Sichuan, and Anhui. The third character is typically used for the word gram.

So when I read this, I'm thinking "summer, some name, gram". And it's only after a while I pronounce the whole thing and realize that it makes no sense at all as written. It's all about how it sounds. In this case, it was meant to be Sherlock (as in Sherlock Holmes).

I find names quite tricky to recognize to start with, but these transliterated words are especially tricky. But they are used extensively. It's not always names though. Here's another:

巧克力  (Qiǎokèlì)

Again when reading this, the words are like "skillful, gram, force or energy". But the word is chocolate.

And another:

酒吧  (Jiǔbā)

In this case, the first word is Chinese for alcohol, but the second word means bar in English.

So when reading Mandarin, and the words seem to make no sense at all together, one of the things I'm learning to do, is to step back and pronounce them, just in case the meaning of the characters isn't relevant, and only how they sound matters.

Learning Mandarin

I'll write more soon on the best methods for learning. If you want to get a taste for it in the meantime though, my current favorite site is iTalki, and my favorite teacher by far is Amy He. If you decide to try it, click here and it's cheaper for both you and me.

Learning Mandarin: East, West, Something, and Nothing

In Mandarin, the word for compass directions are:

East is  (Dōng)
West is 西 (Xī)
North is  (Běi)
South is  (Nán)

Curiously though, the Chinese don't say North, South, East, and West for compass directions like we do. Instead they say (Dōng), (Nán), 西 (Xī), (Běi) ie: they do them clockwise which is probably more sensible than us.

Awesome image by G Crescoli
Awesome image by G Crescoli

These directions are often combined with  (Biān) which roughly means side.

You'll hear 北边 (Běibian) as the north side (or sometimes more like locating something as being to the north of).  (Fāng) might also be used in a related way but mean more like in the direction of.  So 北方 (Běifāng) would be "in the direction of north" or perhaps "northward".

You'll often also hear them in relation to cities:

北京 (Běijīng)
南京 (Nánjīng)

The character  (Jīng) means something like the capital of a country or a region. So Běijīng is really like "northern capital" and Nánjīng was more like "southern capital".

And you'll hear them combined together, much the same way we say "northeast":

东北 (Dōngběi)

When they are combined like this though, East and West always come first.

But then the most curious combination of all is:

东西 (Dōngxī)

which you'd generally expect to mean East to West, and while it can have a meaning like that, it's generally used for "something".

我会买东西。(Wǒ huì mǎi dōngxī) or "I will buy something".

Not having it can also be used to define "nothing":

我没有东西。(Wǒ méiyǒu dōngxī)

is literally "I not have thing" would mean "I have nothing".

Learning Mandarin

I'll write more soon on the best methods for learning. If you want to get a taste for it in the meantime though, my current favorite site is iTalki, and my favorite teacher by far is Amy He. If you decide to try it, click here and it's cheaper for both you and me.