designing database tables using JDBC
- by Noona
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