Reputation: 13258
I have a Flex GUI where I have to place quadrate elements. The position of these elements need to be stored into a database. So I can create two integer fields in the db table x and y. Also I need an angle, because the user can rotate these elements, so I can also make a int (int is okay, I do not need a double value therefore).
As a ORM, I use Hibernate. But the question is, if creating three integer fields is the best way to handle this.
Perhaps someone can tell me if this will be okay or if there are better ways?
Thanks a lot in advance & Best Regards.
Upvotes: 1
Views: 1272
Reputation: 137128
Personally I'd go with three doubles, however if you say you only need the resolution/precision of ints then three separate values is a perfectly acceptable solution.
I would have said store the coordinate as a point (x & y in the same field), but that appears only to be available if you use GIS extensions.
Upvotes: 1