I just want an advice or suggestions of how i can do it. i've been thinking about it for hours now and can't find a solution.
My aim is to convert this ER Diagram to tables.
So i have a Rectangle(Entity) that is linked to an ellipse(Attribute). I've already worked out on the collisions of the shapes where the line will retrieve the object that is linked to it. See the picture below:
the result will be as follows when the above diagram is drawn:
LINE(1) COLLIDES WITH RECTANGLE OF INDEX(0)
LINE(1) COLLIDES WITH ELLIPSE OF INDEX(2)
My Shapes are being stored in an ArrayList of shapes and what am trying to achieve is :
1- I want to be able to enter text inside the shapes. That text(e.g "Student") i will also need it later on when i want to make the conversion of ER Diagram to tables. I'm already using an Array List of Shapes, is it possible to add pointers to each index of this Array List of Shapes, stating that this index(0) (which is a rectangle) is named "Student"? (See picture below)
Where should the text be stored so that i can later on retrieve the text "Student" using a specific index of that rectangle. If my approach is not good, i will appreciate other suggestions of how i can do it. Can i use partitions?
Advice!
Please help guys?