title: concrete5 database workflow
body: <p>I'm in the planning stages for a web-based project management/collaboration app similar to Copper Project or PHP Collab, using concrete5 as my framework.</p>
  
  <p>There are a couple of features I want to integrate, but I'm not entirely sure how to accomplish this, looking at how DB tables are generated with blocks.</p>
  
  <p>The functionality I have in mind is as follows:
  1) When a new client is created by an account manager or project manager, they have to assign a three-character prefix for the client. Example: if (by some wild stroke of luck) I add Diesel as a client, I would want to assign them the prefix DSL.</p>
  
  <p>2) When an account manager or project manager creates a new project, the project ID should be directly related to the client, and not to the total number of projects for all clients. In other words, the project ID for Diesel's first project with me should be DSL001, and not DSL016, because there were fifteen other projects for other clients before this one (c.f. both Copper and PHP Collab, which follow the global project ID logic, as opposed to the per-client project ID logic). This project ID would be visible on the front-end project page that's been created by the AM/PM, and would also be used as a reference ID for things like cost estimates, invoices and so on.</p>
  
  <p>So this is where I run into a problem from a workflow planning point of view. My understanding of MySQL is such that if I want to follow my own project ID logic, a new table would have to be created for each and every client, to contain all of the data concerning their projects, so that the DB could correctly output the unique ID number.</p>
  
  <p>However, my understanding of C5 is that if, for example, in the course of creating this app, I decide to create the project form as a block to be inserted in a front-end template, the db.xml file would create a generic project data table in the DB for all clients, not one per client.</p>
  
  <p>Any suggestions how I can accomplish what I'm looking to do in the context of C5's framework?</p>
  
  <p>If something's unclear, I can show some mock-ups of how a project page would look.</p>
  
  <p>Thanks! </p>