If you're talking about multiple Notices for each Machine, then your schema 
would be something like this:

create table Machine
(       ID integer primary key not null
,       Name text
,       Location text
)
;
create table Notice
(       ID integer primary key not null
,       Machine integer not null references Machine(ID) on delete cascade on 
update cascade
,       Type integer
,       Date integer
,       ExecutedBy text
,       RequestedBy text
,       Description text
)
;

Make sure that you enable foreign keys for each session (which isn't on by 
default, weirdly):

pragma foreign_keys = ON

Then, you just populate using inserts.

Hope this helps,
Tom

Tom Brodhurst-Hill
BareFeetWare

--
iPhone/iPad/iPod and Mac software development, specialising in databases
develo...@barefeetware.com
--
Follow us on Twitter: http://twitter.com/barefeetware/
Like us on Facebook: http://www.facebook.com/BareFeetWare


On 19/12/2012, at 12:37 PM, Guillaume Saumure <gsaumur...@videotron.ca> wrote:

> Hello everyone,
> 
> I have to create a small program to track changes done on multiple machines. 
> The data structure look like :
> 
> Structure Notice
>    PrimaryKeyID.l
>    Type.l
>    Date.l
>    ExecutedBy.s
>    RequestedBy.s
>    Description.s
> EndStructure
> 
> Structure Machine
>    PrimaryKeyID.l
>    Name.s
>    Location.s
>    List Notices.Notice()
> EndStructure
> 
> Structure Assets
>    ...
>    ...
>    DatabaseFileName.s
>    List Machines.Machine()
> EndStructure
> 
> To make a long story short, I have a Linked list nested inside Linked list 
> but I really don't know how to manage a scenarios like this using Database 
> recording system. Any suggestions ?
> 
> Thanks beforehand and best regards.
> Guillaume Saumure


_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to