Hi, I'd say you got it pretty much pinned till the part where judges come in. As I understand it, you want to make a link between judge type and criteria, so I'd suggest either of the following:
a) you introduce a 'type' table, and have both judges and criteria relate to this. Then, you could show criteria with the same type_id as the judge. Drawback is that you get a 1-on-1 mapping (so project judge <> project criteria) and no possibility to extend (for example, general judge <> all criteria, project judge <> project criteria) b) extend a by adding an m:n relation between type and judge. Then you can set multiple criterion-types to a judge. That way, you should be able to gather most information through queries. One more suggestion: CakePHP plays bad with composite primary keys, so you may want to add an ID field to events_teams so that you can use that to refer to from the scores table. Hth On 8 jan, 00:35, Ivan <[email protected]> wrote: > Hi every one, > I am working in a project, that is basicaly, a competition manager, > where organizers can register, and then have access to those things: > - Include Teams from a database > - Register new teams in database > - View only the events created by himself > - Include in each event, criteria, like: Project score, Building > score, Practice score... > > Judges, would have access to: > - Post scores to the existing criteria created by the organizer > - Give comments to the teams, so that a team can have many comments in > one participating event > > Scores would never be deleted, the "right" one would be the newer one > > After doing that i want to make something like this: > Judge can only give scores to the criteria set to it`s user, so a > Project judge, can only give scores to the Project score.(don`t know > how to make that in db) > > The thing, is that each event has many criterias, and that each > criteria have many scores with its type, but they are also linked with > the teams participating in the event. I`m VERY confused at this.. > Here is what i have done, with the database in MySQL > Workbench:http://cl.ly/2r3F25232u1d303x2D2u > > I apreciate, if anyone could tell me, if i`m in the right direction, > and if not, what can i do to make it work good. > > Thanks everyone, > Ivan -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php
