Обсуждение: Multilingual database

Поиск
Список
Период
Сортировка

Multilingual database

От
Terence Ng
Дата:
Hi!

I would like to store the title and description of a
product in different languages.  Should I use unicode
(UTF-8) to store the different languages in one
database, or I should initialize different databases
for the different languages?  I appreciate if someone
can give me some suggestions and what I should aware
of.  I have use the keyword "multilingual" to search
the achrieves but cannot find an answer.

Terence

_________________________________________________________
第二世(謝霆鋒),習慣失戀(容祖兒),兄妹(陳奕迅)...
Yahoo! 鈴聲下載
http://ringtone.yahoo.com.hk


Re: Multilingual database

От
"M. Bastin"
Дата:
Use two tables (all in UTF8, if you're sure your front-end handles this), the first holding the general product information like code and price, and then the other one holding a record for each language, with the code (as a relation to the other table with general information), the language, and the description in that language.

At 10:48 AM +0800 5/10/03, Terence Ng wrote:
Hi!

I would like to store the title and description of a
product in different languages.  Should I use unicode
(UTF-8) to store the different languages in one
database, or I should initialize different databases
for the different languages?  I appreciate if someone
can give me some suggestions and what I should aware
of.  I have use the keyword "multilingual" to search
the achrieves but cannot find an answer.

Terence

_________________________________________________________
ëÊìÒê¢(é"˪ñN)ÅCèKäµé½ú–(óeëcôZ)ÅCåZñÖ(í¬öÛêv)...
Yahoo! óȓþâ†çŽ
http://ringtone.yahoo.com.hk


---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

Re: Multilingual database

От
Terence Ng
Дата:
Thanks for your idea.  What if I give every language a
table for title and description, and use the code as a
relation?  And one more table for the code, price and
photos.  Please criticize!

 --- "M. Bastin" <marcbastin@mindspring.com> wrote: >
Use two tables (all in UTF8, if you're sure your
> front-end handles
> this), the first holding the general product
> information like code
> and price, and then the other one holding a record
> for each language,
> with the code (as a relation to the other table with
> general
> information), the language, and the description in
> that language.
>
> At 10:48 AM +0800 5/10/03, Terence Ng wrote:
> >Hi!
> >
> >I would like to store the title and description of
> a
> >product in different languages.  Should I use
> unicode
> >(UTF-8) to store the different languages in one
> >database, or I should initialize different
> databases
> >for the different languages?  I appreciate if
> someone
> >can give me some suggestions and what I should
> aware
> >of.  I have use the keyword "multilingual" to
> search
> >the achrieves but cannot find an answer.
> >
> >Terence
> >
>
>_________________________________________________________
> >ëÊìÒê¢(é"˪ñN)ÅCèKäµé½ú–(óeëcôZ)ÅCåZñÖ(í¬öÛêv)...
> >Yahoo! óȓþâ†çŽ
> >http://ringtone.yahoo.com.hk
> >
> >
> >---------------------------(end of
> broadcast)---------------------------
> >TIP 5: Have you checked our extensive FAQ?
> >
> >http://www.postgresql.org/docs/faqs/FAQ.html
>

_______________________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com.hk address at http://mail.english.yahoo.com.hk


Re: Multilingual database

От
Terence Ng
Дата:
I see. Thank you very much.  But I have come up
another question.  For the language-dependent
information, there is a code to differentiate each
record, and every column has the same language.  What
if I expand my web site, allowing customers from
different countries lookup their orders.  How do I
record their information if I allow them to register
their info in their languages?  For example, I will
have customer_id and customer_name.  How do I record
customer_name?  Is it a good practice if I create
every language a column, with customer_id as a
relation?

 --- "M. Bastin" <marcbastin@mindspring.com> wrote: >
>Thanks for your idea.  What if I give every
> language a
> >table for title and description, and use the code
> as a
> >relation?  And one more table for the code, price
> and
> >photos.  Please criticize!
>
> In my opinion, it's not good practice to create a
> table per language.
> This will very likely get you into trouble (or, in
> other words,
> you'll have to do much more work), when you want to
> add or remove a
> language afterwards.
>
> Using only two tables is what I'd do: one for the
> general
> information, and one with the language-dependent
> information.  For
> every single record in the general table, there will
> be several
> related records in the language table.
>
> Whenever you'll need to retrieve information, you'll
> only need the
> code, and the language of the user, to find the
> right product
> description.  You won't need to hard-code a lookup
> in some separate
> 'per-language' table.

_______________________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com.hk address at http://mail.english.yahoo.com.hk


can't alter user with the postgres user

От
Katy Earl
Дата:
I'm brand new to postgres, and I didn't install it on
the machine I'm using so I don't entirely understand
its configuration. But isn't the 'postgres' user
supposed to be like the root user for PostgreSQL?
Well, for some reason, my postgres user doesn't have
the privilege to create other users...

How do I give 'postgres' the privilege to create
users?

Katy

PS Should my entire /usr/local/pgsql directory by
owned by the user and group 'postgres'?

__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com


Re: can't alter user with the postgres user

От
Josh Berkus
Дата:
Katy,

> I'm brand new to postgres, and I didn't install it on
> the machine I'm using so I don't entirely understand
> its configuration. But isn't the 'postgres' user
> supposed to be like the root user for PostgreSQL?
> Well, for some reason, my postgres user doesn't have
> the privilege to create other users...

Who installed it?  They may not have made "postgres" the superuser.  Who owns
the PostgreSQL directories?

--
-Josh Berkus
 Aglio Database Solutions
 San Francisco


Re: Multilingual database

От
"M. Bastin"
Дата:
At 11:12 AM +0800 5/13/03, Terence Ng wrote:
>I see. Thank you very much.  But I have come up
>another question.  For the language-dependent
>information, there is a code to differentiate each
>record, and every column has the same language.


No!  One single column contains all descriptions, regardless of their language!
If you'd have a column per language, then you'd get into the same
kind of problems as when you'd have a table per language.

Example:

CODE    LANGUAGE    DESCRIPTION
x123    French        frites surgeles
x123    English        frozen french fries
z456    French        gaufres belges
z456    English        belgian waffles

>  What
>if I expand my web site, allowing customers from
>different countries lookup their orders.  How do I
>record their information if I allow them to register
>their info in their languages?  For example, I will
>have customer_id and customer_name.  How do I record
>customer_name?  Is it a good practice if I create
>every language a column, with customer_id as a
>relation?

Your customer data is probably not language dependent.  One table
should be enough.

Example:

ID    LAST NAME    FIRST NAME    GENDER    LANGUAGE    ADDRESS
101    Dupont        Louis        m    French        ... France
102    Jones        Tina        f    English        ... USA

The way you present this information on screen should be in the
customer's language, but each bit of customer information you
actually want to store, is unique per customer, and the language is
not relevant: a last name is just always a last name, whether the
person speaks French or English.

Marc


Re: Multilingual database

От
Terence Ng
Дата:
Thank you very much for your patience.  May I have one
more question?

May I put the login and password of my customers in
the same table containing my customers name and
address?

Thanks in advance
Terence Ng

 --- "M. Bastin" <marcbastin@mindspring.com> wrote: >
At 11:12 AM +0800 5/13/03, Terence Ng wrote:
> >I see. Thank you very much.  But I have come up
> >another question.  For the language-dependent
> >information, there is a code to differentiate each
> >record, and every column has the same language.
>
>
> No!  One single column contains all descriptions,
> regardless of their language!
> If you'd have a column per language, then you'd get
> into the same
> kind of problems as when you'd have a table per
> language.
>
> Example:
>
> CODE    LANGUAGE    DESCRIPTION
> x123    French        frites surgeles
> x123    English        frozen french fries
> z456    French        gaufres belges
> z456    English        belgian waffles
>
> >  What
> >if I expand my web site, allowing customers from
> >different countries lookup their orders.  How do I
> >record their information if I allow them to
> register
> >their info in their languages?  For example, I will
> >have customer_id and customer_name.  How do I
> record
> >customer_name?  Is it a good practice if I create
> >every language a column, with customer_id as a
> >relation?
>
> Your customer data is probably not language
> dependent.  One table
> should be enough.
>
> Example:
>
> ID    LAST NAME    FIRST NAME    GENDER    LANGUAGE    ADDRESS
> 101    Dupont        Louis        m    French        ... France
> 102    Jones        Tina        f    English        ... USA
>
> The way you present this information on screen
> should be in the
> customer's language, but each bit of customer
> information you
> actually want to store, is unique per customer, and
> the language is
> not relevant: a last name is just always a last
> name, whether the
> person speaks French or English.
>
> Marc
>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster

_______________________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com.hk address at http://mail.english.yahoo.com.hk

Re: Multilingual database

От
"M. Bastin"
Дата:
At 6:11 PM +0800 5/14/03, Terence Ng wrote:
>Thank you very much for your patience.  May I have one
>more question?
>
>May I put the login and password of my customers in
>the same table containing my customers name and
>address?

It is a convenient thing to do, but it's not very safe unless you
somehow store this information encrypted, or at least, scrambled.

Re: Login and Password

От
Terence Ng
Дата:
What is a good practice to contain the login and
password?  I really have to find some books to read.

 --- "M. Bastin" <marcbastin@mindspring.com> wrote: >
At 6:11 PM +0800 5/14/03, Terence Ng wrote:
> >Thank you very much for your patience.  May I have
> one
> >more question?
> >
> >May I put the login and password of my customers in
> >the same table containing my customers name and
> >address?
>
> It is a convenient thing to do, but it's not very
> safe unless you
> somehow store this information encrypted, or at
> least, scrambled.

_______________________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com.hk address at http://mail.english.yahoo.com.hk

Re: Multilingual database

От
"M. Bastin"
Дата:
You should encrypt all sensitive information, like password, credit
card, social security number, etc.  It should be encrypted while
traveling over the internet, e.g. by using SSL, but it should also be
stored in an encrypted way.

We hear all too often how "hackers have stolen a million personal
records from company xyz."  You wouldn't want your company to get
into the news like that.

Cheers,

Marc



At 6:11 PM +0800 5/14/03, Terence Ng wrote:
>Thank you very much for your patience.  May I have one
>more question?
>
>May I put the login and password of my customers in
>the same table containing my customers name and
>address?

It is a convenient thing to do, but it's not very safe unless you
somehow store this information encrypted, or at least, scrambled.

MD5 encryption, Was: Multilingual database

От
"M. Bastin"
Дата:
Say Dani,

Do you know where I can find the specs of MD5, like it is implemented in pgsql?
I've been doing google searches on MD5 a week ago or so, but didn't
come up with any explanation on how to program MD5 encryption.  I
didn't even find *the* MD5, but all kinds of derivated encryption
techiques--without explanations.

Thanks,

Marc

At 5:02 PM +0200 5/14/03, Dani Oderbolz wrote:
>M. Bastin wrote:
>
>>At 6:11 PM +0800 5/14/03, Terence Ng wrote:
>>
>>>Thank you very much for your patience.  May I have one
>>>more question?
>>>May I put the login and password of my customers in
>>>the same table containing my customers name and
>>>address?
>>
>>
>>It is a convenient thing to do, but it's not very safe unless you
>>somehow store this information encrypted, or at least, scrambled.
>
>If you use a Hash Functions such as MD5 to store it,
>I would say you are pretty save.
>
>The check you do in pseudo-code:
>
>If  MD5(supplied_password) = = password_in_database Then
>    Password Ok
>Else
>    Password bad
>
>Cheers,
>Dani


Re: MD5 encryption, Was: Multilingual database

От
Reshat Sabiq
Дата:
M. Bastin wrote:

> Say Dani,
>
> Do you know where I can find the specs of MD5, like it is implemented
> in pgsql?
> I've been doing google searches on MD5 a week ago or so, but didn't
> come up with any explanation on how to program MD5 encryption.  I
> didn't even find *the* MD5, but all kinds of derivated encryption
> techiques--without explanations.
>
> Thanks,
>
> Marc

MD5 is a hash function, but can approximate encryption the way it was suggested. I'd suggest checking the RFCs for how
tos. 

Sincerely,
Reshat.

-------------------------------------------------------------------------------------------
If you see my certificate with this message, you should be able to send me encrypted e-mail.
Please consult your e-mail client for details if you would like to do that.



Вложения

Re: MD5 encryption, Was: Multilingual database

От
Dani Oderbolz
Дата:
M. Bastin wrote:

> Say Dani,
>
> Do you know where I can find the specs of MD5, like it is implemented
> in pgsql?
> I've been doing google searches on MD5 a week ago or so, but didn't
> come up with any explanation on how to program MD5 encryption.  I
> didn't even find *the* MD5, but all kinds of derivated encryption
> techiques--without explanations.
>
> Thanks,
>
> Marc

Well, I suggest you download the phplib
(http://sourceforge.net/projects/phplib/, I does all that kind of stuff
for you.

Cheers, Dani



MD5 encryption how to store in database

От
Sudheesh Krishnankutty
Дата:
Hi,

  May some one help me in how to store encrypted password into
  postgres database.

  My problem is

  I want to store username, password into the postgres database

  I am using java functions to encrypt the password.

  My questions are.

  -- What should be the data type of encrypted password ( will varchar
  do?)
  -- I tried storing it as varchar but when i do a select, I could see
  some characters gets changed.
  -- What all characters needs to be escaped and how do i do it in an
  insert query.
    // insert into user_pass (username, do_escape(encrypted_pass));
  -- is there a do_escape kind of function?

  -- If I do_escape and store; while selecting from database do i need
  to do some conversion.

  I went thru the postgres manuals but i couldn't follow it.

  If any one can throw some lights on it, it will be of great help.

regards

sudheesh

> M. Bastin wrote:
>
> > Say Dani,
> >
> > Do you know where I can find the specs of MD5, like it is implemented
> > in pgsql?
> > I've been doing google searches on MD5 a week ago or so, but didn't
> > come up with any explanation on how to program MD5 encryption.  I
> > didn't even find *the* MD5, but all kinds of derivated encryption
> > techiques--without explanations.
> >
> > Thanks,
> >
> > Marc
>
> Well, I suggest you download the phplib
> (http://sourceforge.net/projects/phplib/, I does all that kind of stuff
> for you.
>
> Cheers, Dani
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>

--
Sudheesh K
Software Engineer EDA
SoftJin Infotech Pvt. Ltd.
No 227/70/A Sigma Arcade 1
Marathahalli
Airport Road,
Bangalore - 560037
Phone: 91-080-5234641/2 ext 206
Fax: 91-080-5234643
--------------------------------------------------------------------------------
This e-mail message and any files transmitted with it are intended solely for
the use of the individual or entity to which they are addressed. It may contain
confidential, proprietary or legally privileged information. If you are not the
intended  recipient please be advised that  you have  received this message in
error and any use is strictly prohibited. Please immediately delete it and all
copies of it from your system, destroy any hard copies of it and notify the
sender by return mail. You must not, directly or indirectly, use, disclose,
distribute, print, or copy any part of this message if you are not the intended
recipient.
------------------------------------------------------------------------------