0

Hey, the data in my DB isn't going to be in english, and I'm wondering if I should name the tables and the fields not in english as well, or there might be problems later when using the names in PHP or SQL code?
any one had experience with that?

3
Contributors
5
Replies
6
Views
6 Years
Discussion Span
Last Post by smantscheff
0

All reserved keywords of mysql are derived from english words. Therefore you are better off not using english words for table and column names to avoid conflicts.
Make sure that all components involved - database, tables, columns, server, clients etc. - use an appropriate character set, presumably utf8. Check the settings of the system variables
character_set_client
character_set_connection
character_set_database
character_set_filesystem
character_set_results
character_set_server
character_set_system

0

All reserved keywords of mysql are derived from english words. Therefore you are better off not using english words for table and column names to avoid conflicts.

but this makes me think that that's why I SHOULD use english..it's gonna be easier to write SQL queries where most of the command is gonna be in 1 language, I don't see why there should be a conflict.. :?:

0

but this makes me think that that's why I SHOULD use english..it's gonna be easier to write SQL queries where most of the command is gonna be in 1 language, I don't see why there should be a conflict.. :?:

I would say definitely avoid using SQL reserved words to name tables and columns. I've seen examples posted here where the table is named `table` and one of the columns that happens to have a DATETIME type is called `datetime`. I find that confusing, to say the least.

However, I would rather use names consisting of non-accented characters with an English-like spelling for ease of typing and remembering the correct spelling, because my first language is English and my usual keyboard layout is US English.

0

oh, I didn't understand the answer then..sure I'm not planing to use the SQL words as the names of the tables/fields..that basic stuff..

0

Since you happened to ask: SQL is not a natural language, nor is any other programming language. Natural languages have built-in redundancies which help avoid disambiguities. By using your mother tongue for meaningful table and column names instead of english you might help yourself to develop code which is easy to understand for yourself even in some years from now. It helps you to realize which part of your code is data manipulation language and which part leans towards semantics. Think of it in terms of syntax highlighting. You wouldn't want all your C# or PHP code look uniform, would you?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.