I'm about to start programming some kind of website which works like this:
User logs in, and if he's a normal user(not an admin) he'll be presented with some posts that relate to his kind of account(Accouns are menaged and given by admin)
What admin does is creates those posts and while creating it he says who will have access to seeing that post (e.g checks a user who will see it , or several users or maybe all users will be able to see it)
My problem is , what kind of tables should i create in my database and with what columns. My first plan was to have ofc: 1) table of users 2) table of posts 3) table of permissions table of permission would have fields ([postID], and then fileds like [user1],[user2]....[userN]) and example row in the table would look like 21|true|true|false|true|....|true| which indicates that those users will be able to see the post. And those fields [userN] could be created dinamically as new users are created I'm asking for an opinion on this kind of db, and ofcourse your idea for doing this db.