self referencing tables, good or bad?
- by NimChimpsky
Representing geographical locations within an application, the design of the underlying data model suggests two clear options (or maybe more?).
One table with a self referencing parent_id column
uk - london (london parent id = UK id)
or two tables, with a one to many relationship using a foreign key.
My preference is for one self-refercing table as it easily allows to extend into as many sub regions as required.
IN general do people veer away from self referencing tables, or are they A-OK ?