xeraph <[EMAIL PROTECTED]> wrote:
I am terribly new to sqlite. I wrote an address book application in
Swing and would like to back it with an sqlite database. Basically,
the address book consists of entries which each contain a
collection(linked list) of address objects and a collection(linked
list) of phone number objects. I have 3 tables set up currently:
phonenumber, address, entry. What is the easiest way to have a given
row in the entry table "contain" a collection of rows from the
phonenumber table and a collection of rows from the address table?

A typical relational model approach is to make each entry have a unique ID, and make each phone number and each address have a column that contains the ID of its "owner" entry. If your entry does not naturally have a unique field that can serve as an ID, just declare a column with the type of "integer primary key": SQLite automatically generates unique integers in such a column whenever a new record is inserted.

Igor Tandetnik

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to