Hello all,
I'm looking for some table structure advice. I'm making a database that will track several To Do's. I want to have different List names (Projects, Next Actions, Waiting For, ect.). I then want to click on one of my lists to display the items in the list, which can have sub items on them. Also, each sub-item can have a sub-item, et al. As an example, on my Next Actions list:
At Work
├ Do This
├ And This
├ Plus This
Phone Calls
├ Call Joe
├ Call Bob
At Status Meeting
├ Ask About Project X
├ Request Project Y Update
│ ├ Update Financial
│ └ Update Timline
└Propose Project Z
OK, so I am envisioning the following table structure:
tblLists
pk ListID
List Name
tblListDetail
pk ListDetailID
fk ListID
ListDetailName
ListDetailParentID <-- this would be the ListDetailID of the parent, null if there is no parent
So, in my example, if ListID = 1 was Next Actions, then my tblListDetail would look look:
ListDetailID, ListID, ListDetailName, ListDetailParentID
1, 1, At Work,
2, 1, Do This, 1
3, 1, And This, 1
4, 1, Plus This, 1
5, 1, Phone Calls,
6, 1, Call Joe, 5
7, 1, Call Bob, 5
8, 1, At Status Meeting,
9, 1, Ask about Project X, 8
10, 1, Req Project Y Update, 8
11, 1, Update Financial, 10
12, 1, Update Timeline, 10
13, 1, Propose Project Z, 8
Does this table structure make sense? Is there a better way?
Thanks in advance!!
I'm looking for some table structure advice. I'm making a database that will track several To Do's. I want to have different List names (Projects, Next Actions, Waiting For, ect.). I then want to click on one of my lists to display the items in the list, which can have sub items on them. Also, each sub-item can have a sub-item, et al. As an example, on my Next Actions list:
At Work
├ Do This
├ And This
├ Plus This
Phone Calls
├ Call Joe
├ Call Bob
At Status Meeting
├ Ask About Project X
├ Request Project Y Update
│ ├ Update Financial
│ └ Update Timline
└Propose Project Z
OK, so I am envisioning the following table structure:
tblLists
pk ListID
List Name
tblListDetail
pk ListDetailID
fk ListID
ListDetailName
ListDetailParentID <-- this would be the ListDetailID of the parent, null if there is no parent
So, in my example, if ListID = 1 was Next Actions, then my tblListDetail would look look:
ListDetailID, ListID, ListDetailName, ListDetailParentID
1, 1, At Work,
2, 1, Do This, 1
3, 1, And This, 1
4, 1, Plus This, 1
5, 1, Phone Calls,
6, 1, Call Joe, 5
7, 1, Call Bob, 5
8, 1, At Status Meeting,
9, 1, Ask about Project X, 8
10, 1, Req Project Y Update, 8
11, 1, Update Financial, 10
12, 1, Update Timeline, 10
13, 1, Propose Project Z, 8
Does this table structure make sense? Is there a better way?
Thanks in advance!!