Below is an entity relationship diagram with the ProjectItem table created by Gliffy.
![]() |
ERD Diagram with data types |
I've decided to do all of my dates in UTC format and store them as text, as discussed in stack overflow post. I've decided to have a field in case I store an icon for each task later.
One of the more unique things I'm introducing into this app is the ParentProjectItem. Because larger tasks can generally infinitely be broken up into sub tasks, I want to form a ProjectItem heiarchy. ProjectItems that have a ProjectItemParentID of 0 are root level ProjectItems, sub ProjectItems will have the idea of their parent stored in this field. I have tried to edit the ERD diagram to reflect this.
![]() |
Tried to add the one-to-one relationship, this will get very interesting in the iOS storyboarding! |
Now it is time to create the Java class that has the code that will create this table. I will upload it to my newly created GitHub repository and you can see the class ProjectItemTable.java below.
The class above creates or performs updates on the ProjectItem table in the database. It is good practice to have one class to each table, as I add tables I will update my diagrams and add classes to my code.
No comments:
Post a Comment