Showing posts with label website. Show all posts
Showing posts with label website. Show all posts

Sunday, March 11, 2012

Columns vs. Rows

hi,

I'm building a multi-lingual website

In my database tables I have, in some of them, a column with the Language, because some of the columns depend on what language the user wants to see the site.

My question is: what is better? have that column and consequently two row (for two languages) with repeated column information? or have two column within a row with the language specification?

e.g.

table: id, description, price

(1) With language:

id,description, price, language='EX'

id,description, price, language='EN'

vs.

(2)

id, descriptionEN,descriptionEX,price

if I have 500 products

in 1 whould result in 1000 entries

in 2 just 500 results

can anyone tell me a diference/advantage between the two approachs?

thanks in advance.

In a problem like this, I would be guided by the following:

If the number of languages is fixed (i.e. the number of columns is not expected to change), go with the second approach (each language in a different field)

In case the number of languages can increase, go with the first approach as it gives you the flexibility to add another row for every new language.

Friday, February 10, 2012

Collation settings for a website in Russian

I am using html, vbscript, asp and sql server.
The website is mainly in Russian but may have some English.
The consensus appears to be that it is best to use utf-8, so I plan to use
html charset utf-8, asp codepage 65001 and ntext, nchar and nvarchar
character
types.
If the above is correct, what collation should I use in SQL Server?
Thanking you in anticipation.
Posted Via webservertalk.com Premium Usenet Newsgroup Services
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
http://www.webservertalk.com
It all depends on what type of data you are storing and is it
case-sensitive/case-insensetive in the DB. Run the following query and
will explain you each collation usage.
SELECT *
FROM ::fn_helpcollations()
-SAI

Collation settings for a website in Russian

I am using html, vbscript, asp and sql server.
The website is mainly in Russian but may have some English.
The consensus appears to be that it is best to use utf-8, so I plan to use
html charset utf-8, asp codepage 65001 and ntext, nchar and nvarchar
character
types.
If the above is correct, what collation should I use in SQL Server?
Thanking you in anticipation.
Posted Via mcse.ms Premium Usenet Newsgroup Services
----
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----
http://www.mcse.msIt all depends on what type of data you are storing and is it
case-sensitive/case-insensetive in the DB. Run the following query and
will explain you each collation usage.
SELECT *
FROM ::fn_helpcollations()
-SAI

Collation settings for a website in Russian

I am using html, vbscript, asp and sql server.
The website is mainly in Russian but may have some English.
The consensus appears to be that it is best to use utf-8, so I plan to use
html charset utf-8, asp codepage 65001 and ntext, nchar and nvarchar
character
types.
If the above is correct, what collation should I use in SQL Server?
Thanking you in anticipation.
Posted Via Usenet.com Premium Usenet Newsgroup Services
----
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----
http://www.usenet.comIt all depends on what type of data you are storing and is it
case-sensitive/case-insensetive in the DB. Run the following query and
will explain you each collation usage.
SELECT *
FROM ::fn_helpcollations()
-SAI