I had thought about this also, but thought the other variant was
better. (Do not ask me why.)
What are the pro's and cons of the two solutions?
I already gave you the pro's of using the table.
Con of using domain in H2 is that domain support is not full-fledged.
But as long as you get the work done in a clear and efficient manner
then it really does not matter.
Why are you using PERIOD_ID and do not put the primary key on period_name?
You can freely choose your primary key as long as the attribute is not
null and unique.
By the way, at the moment it is not an issue, but I think in the
future it could.
What if I would like to use different periods in different tables. For
example in one table I can use daily, weekly, monthly and another
table I can use weekly, monthly, yearly. I suppose that could be best
done with another table and a field with flags.
Well you have to different enums then. Even if they are very much alike
they are not the same.
So you either create two different tables for them or two different domains.
Simple, right?
- Rami
--
You received this message because you are subscribed to the Google Groups "H2
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/groups/opt_out.