On 2/17/2015 8:00 PM, zach cruise wrote:
> i can't keep creating tables or adding columns every time i need to
> add a nickname- this happens a lot.
>
> so i want to put everything in an array or json.
>
> remember rows can have different number of nicknames.
david was suggesting a join table.
one table with names (id, first name, last name, other attributes...)
with one row per person
and another table with (id, names_id, nickname, nickname attribute) with
as many rows as there are nicks and users...
you'd join these to get all the nicks for a given name, or to get all
the names for a given nickname, etc.
--
john r pierce 37N 122W
somewhere on the middle of the left coast