[UPHPU] postgresql arrays vs intermediate tables

jtaber jtaber at johntaber.net
Thu Oct 5 19:12:09 MDT 2006


One thing I really miss about C++ and java data classes is the use of 
dynamica arrays or vectors.   And PHP is quite array friendly.  Now I've 
noticed that postgresql supports array data types.  So is it wise to use 
an array vs creating an intermediate lookup table.
Example
table flights
table frequentflyers

flights could contain an array field listing frequentlyflyers on a flight
or
have another table flightflyers with
  flight_id, flyer_id

problem with flightflyers table is that if a flight is deleted, then 
logic has to be added to delete all records in flightflyers for that 
flight. 

any thoughts as to best way to go.  Anyone have experience with 
postgresql arrays?  Can they be read into PHP arrays ?


More information about the UPHPU mailing list