designing database tables using JDBC
Posted
by Noona
on Stack Overflow
See other posts from Stack Overflow
or by Noona
Published on 2010-06-13T18:36:22Z
Indexed on
2010/06/13
18:42 UTC
Read the original article
Hit count: 207
database-design
|jdbc
I am creating a users table using JDBC and mysql, each user has a permissions list that comprises Integer values, I am wondering if I should use an array for storing these values and then have only 1 record for this user in the table, or simply create a new table that comprises 2 columns: user ID and permissions, and then have multiple records for each user that specify the user name in one columns and one permission value in the second column, the second option seems to be redundant since a permission value is a simple object that isn't associated with any other objects (like a student and courses list for example, because the course is associated with many other objects, like grade, teacher, etc, so in this case it is natural to have multiple records), but the first one seems to be a bit unnatural to me, so if someone has experience with these things and direct me? thanks
© Stack Overflow or respective owner