[Lazarus] SQLite: Several foreign keys

Usuario AnĂ³nimo usuarioanonimomysql at gmail.com
Sun Oct 19 16:33:05 CEST 2008


I have three TDBGrids.

Phone has two foreigns keys: Contact and Company.

2008/10/15 Luiz Americo Pereira Camara <luizmed at oi.com.br>

> Usuario AnĂ³nimo wrote:
> > If I want to create a simple master/detail relationship of
> > one-to-many, it is easy:
> >
> []
> >
> > But, if I want to create a master/detail relationship of one-to-many
> > with several foreign keys, how I do it?
> >
> > For example I want to create this relationship:
> >
> > Contact: [u]Code[/u], Name <-- Master table
> > Company: [u]Code[/u], Name <-- Master table
> > Phone: [u]Number[/u], Contact, Company (Contact and Company are
> > foreigns keys) <-- Detail table
> >
> > How I do it?
>
> What is the application design?
> You will have a Contact grid and a Company grid in the same window
> sharing the same Phone table/grid?
> Or you will have a window with Contact + Phone and other window with
> Company + Phone?
>
> Luiz
>
>
> _______________________________________________
> Lazarus mailing list
> Lazarus at lazarus.freepascal.org
> http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20081019/938eebf4/attachment-0007.html>


More information about the Lazarus mailing list