ถ้าเป็น ACL Design DB ควรอยู่ในลักษณะนี้มากกว่าครับ
Example
Table:permissions [id,name] การเข้าถึง many to many => controls
1,'Write'
2,'Read'
3,'Edit',
4,'Delete',
Table:roles[id,name] ระบบจัดการ many to many => controls
1,'Users'
2,'Access Control Lists',
3,'Articles'
Table:controls[id,name] กลุ่มจัดการ many to many => permissions,roles && hasMany => users
1,'Root'
2,'Staff'
3,'User'
Table:control_permission[control_id,permission_id]
1,1
1,2
1,3
1,4
2,2
Table:control_role[control_id,role_id] many to many
1,1
1,2
1,3
2,1
2,2
Table:user[id,email,control_id,password(hash)] belongsTo => control
1,[email protected],1,your password
2,[email protected],3,your password
3,[email protected],2,your password