Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Sql > How to manage c...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 3529 of 3799
Post > Topic >>

How to manage category-ids as array-fields ?

by maps.on@[EMAIL PROTECTED] (Andreas) Jun 13, 2008 at 06:02 PM

Hi,

I get from an outside source tables as simple textfiles to im****t.
Those are obviously results of views with joined tables.

Among the normal stuff are columns that have one or a list of id-numbers 
devided by a semicolon.
In the next column there is the corresponding text for this ids.

It looks like this:
17, ... ,  "1; 2;", "cat; mouse;", ...
23, ...,  "3;", "dog;", ...
42, ..., "2; 7;", "mouse; horse;", ...

Obviously the meaning is that some entity has those listed attributes. 
Most likely they are stored as a n:m-relation like:
17, 1
17, 2
23, 3
42, 2
42, 7

Is there a way to reproduce the output in the form above (as array) ?

Is there a way to im****t the data in the form above, so it gets neately 
stored in a n:m ?

Is it seen as a conceptual good solution to store such information 
within a text-column or array?
I'd rather doubt that PG would watch the integrity of those ids then.




-- 
Sent via pgsql-sql mailing list (pgsql-sql@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql
 




 1 Posts in Topic:
How to manage category-ids as array-fields ?
maps.on@[EMAIL PROTECTED]  2008-06-13 18:02:45 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Tue Dec 2 21:41:58 CST 2008.