I have a tree like structure that I have created using a SWT Tree. I save this to an XML when I close the application and open it again when the application is restarted.

Being my first SWT project I started is a round about way swapping and changing things as I went. Finally I decided to introduce an ID filed into each TreeItem which is associated with a class I have created.

(This was starting to look too much like a relational database structure instead of proper OO principles)

Later I found that I could actually store the Class with the treeItem through the setData() method.

My questions is this.

1. Should I drop the ID field altogether and instead save the entire Tree to an XML file?

2. Is using a Relational Database structure in OO development considered BAD.

3. Should I just drop the whole XML idea and instead use Serializable.

Thanks