I don’t know if i should ask this question here, but it’s related to database development/programming.
I am developing a project management application, everything seems to work fine, There’s a projects table for projects and staffs table for staffs and so on.
Right now i am using PHP + MySQL, this is for the beta version, later i will be using NoSQL databases.
The problem i am facing is how will i add multiple staffs to the project, Should i do like this i..e add a field in projects database which will have list of all staffs like staffs = 1,2,34,2 or staffs = 'user1, user2, emailaddress
If i do like this, how would i display the list of projects staffs are assigned to.., when staffs login, I mean i could do this, but it wont be very straightforward.., and the idea i have in mind on to do this is just horrible, i..e like as soon as the staffs log in check every project’s staffs field and if they are in that list display that project to them.
Do you guys have any idea in mind on how to go about this, if so please let me know.
Building your application with a relational database, and when it’s done – you switch to a NoSQL Database? Don’t! NoSQL is a different approach, and it will cost you a lot of time!
Besides that, I think you want a table to link your projects to your staffs. This table will contain a project id and a staff id (this will also be the primary key).
Selecting projects for the staff can be as easy as: