There are several signs of important records. There are users, groups, and divisions. Need to organize a security mechanism to access the data. To allow users to read and edit only their records, his group or his unit. Something like the security on the file system. The difficulty is that one object — the entry in the table can be assigned to multiple users, groups or departments.
For example whether to do a separate table with the rights, or add a column. That's just not clear what to write, how to encode the value of the rights, in order to quickly make selections. What are the different approaches how to implement, what to read?
The Java language, MySQL database.