in Search
ATTENTION: I've decided to put the upgrade on hold due to a compatibility issue of our server environment with the latest CS installer package. CS 2008 now requires SQL Server 2005 as the backend DB but our database server currenlty has SQL Server 2000 installed on it. I'll resume the upgrade once I figure out when Telligent is releasing a patch to the schema compatibility issue. For now, we will continue to use the old version of CS while waiting for the said patch. If you have any questions about this process, please don't hesitate to post them on our forums and I'll answer them as soon as I can. Thanks for your patience and support guys! I'll let you know as soon as this is resolved. - Keith Rull
Latest post 05-01-2008 11:38 PM by X-Crusader. 7 replies.
Page 1 of 1 (8 items)
Sort Posts: Previous Next
  • 04-30-2008 10:52 PM

    • marl
    • Top 10 Contributor
    • Joined on 12-15-2007
    • Long Beach, CA
    • Posts 319
    • Points 3,995

    Data Modeling

     Keith or any DB guru,

    This is the first in series of questions:

    Question # 1 

    I have two tables with One-to-Many Relationships: Project (One) & Task (Many)

    Rule:  One Project has one or more tasks.

    Any suggestions on the structure?

    devpinoy sig
    • Post Points: 35
  • 05-01-2008 7:58 AM In reply to

    • keithrull
    • Top 10 Contributor
    • Joined on 08-08-2005
    • San Diego, CA
    • Posts 1,956
    • Points 39,165

    Re: Data Modeling

    Hi Marl,

    I think you already answered your question since you already know your expected schema.

    Here is a sample schema that you can use as a base:

    Projects
    -------------
    ProjectID
    Name
    Description
    DateCreated
    DateDeleted

    Tasks
    -------------
    TaskID
    ProjectID
    Description
    StatusID
    DateCreated
    DateDeleted

    Status
    -------------
    StatusID
    Description

    The sample schema is not deemed to be complete but it should give you a good overview on how to build your succeeding tables. Also, since this is Issue/Project tracker type of thingy I would like to suggest you take a look at at some existing samples

    http://www.asp.net/downloads/archived/starter-kits/issue-tracker/ 

    http://asp.net/downloads/starter-kits/time-tracker/

    This will give a good idea on how to build your tables.

    HTH

    - Keith

    devpinoy sig

    • Post Points: 20
  • 05-01-2008 8:07 AM In reply to

    • jop
    • Top 25 Contributor
    • Joined on 08-08-2006
    • Singapore
    • Posts 187
    • Points 3,170

    Re: Data Modeling

    create table project
    (
    	id integer primary key,
    	name varchar(100)
    	-- the rest of your project columns
    );
    
    create table task
    (
    	id integer primary key,
    	project_id integer references project(id),
    	name varchar(100)
    	-- the rest of your task columns
    );
    

    [jop]

    • Post Points: 5
  • 05-01-2008 9:38 AM In reply to

    • marl
    • Top 10 Contributor
    • Joined on 12-15-2007
    • Long Beach, CA
    • Posts 319
    • Points 3,995

    Re: Data Modeling

    keithrull:
    ...since this is Issue/Project tracker type of thingy...

    No. Although it also serves the functions of a tracker in another aspect, it is a project estimator. There will be pre-defined tasks/processes a particular project will go through. Say, Project1 goes through task1, task2, task3, and task4. But projects will not always be like that. Like, Project2 only goes through task2 and task3. Project3 goes task1, task3 and task4...etc. But I don't think it's a good idea to have separate columns for Task1, Task2, Task3, etc. Any idea?

     

    devpinoy sig
    • Post Points: 35
  • 05-01-2008 10:04 AM In reply to

    • jop
    • Top 25 Contributor
    • Joined on 08-08-2006
    • Singapore
    • Posts 187
    • Points 3,170

    Re: Data Modeling

    marl:

    keithrull:
    ...since this is Issue/Project tracker type of thingy...

    No. Although it also serves the functions of a tracker in another aspect, it is a project estimator. There will be pre-defined tasks/processes a particular project will go through. Say, Project1 goes through task1, task2, task3, and task4. But projects will not always be like that. Like, Project2 only goes through task2 and task3. Project3 goes task1, task3 and task4...etc. But I don't think it's a good idea to have separate columns for Task1, Task2, Task3, etc. Any idea?

     

    Stick to the project/task schema that both keith and I suggested. Handle the task per project/task restrictions somewhere else - maybe that logic is code in the application itself or there are supporting tables that define that rules to apply.

    [jop]

    • Post Points: 20
  • 05-01-2008 10:50 AM In reply to

    • marl
    • Top 10 Contributor
    • Joined on 12-15-2007
    • Long Beach, CA
    • Posts 319
    • Points 3,995

    Re: Data Modeling

    jop:
    Stick to the project/task schema that both keith and I suggested. Handle the task per project/task restrictions somewhere else - maybe that logic is code in the application itself or there are supporting tables that define that rules to apply.

    Hell, yeah. I didn't realize this is quite similar to the Instructor-Student-Class scenario.

    Maybe I could find what I am looking for in one of these: http://msdn.microsoft.com/en-us/express/bb403186.aspx#2  

    I'll look into these and expect more question from me...

    devpinoy sig
    • Post Points: 5
  • 05-01-2008 3:34 PM In reply to

    • marl
    • Top 10 Contributor
    • Joined on 12-15-2007
    • Long Beach, CA
    • Posts 319
    • Points 3,995

    Re: Data Modeling

    So, like what Jop said, the best way I can do this is to handle the "Task-Project" relation, maybe in the form (checkbox, List, etc). Then on the DB side, this is how to be captured (same as Keith's Model but with the addtional of "bridge" table):

    Project
    ProjectId
    ProjectTaskId
    Company
    Domain
     

    Project_Task
    ProjectTaskId
    ProjectId
    TaskId

    Task
    TaskId
    Tasks
    Desc

    Any comments?

    devpinoy sig
    • Post Points: 5
  • 05-01-2008 11:38 PM In reply to

    Re: Data Modeling

    marl:
    No. Although it also serves the functions of a tracker in another aspect, it is a project estimator. There will be pre-defined tasks/processes a particular project will go through. Say, Project1 goes through task1, task2, task3, and task4. But projects will not always be like that. Like, Project2 only goes through task2 and task3. Project3 goes task1, task3 and task4...etc. But I don't think it's a good idea to have separate columns for Task1, Task2, Task3, etc. Any idea?
     

    keith's and jop's suggestions serve as the foundation for this. It's the same basic pricinple you can use for a parameter-based workflow management where each project or task goes through a pre-defined process (milestones). You can also use this principle for KPI (Key Performance Indicator) project as well, where you measure the time elapse between tasks (from start to finish).

    You will require to have a Master table for the Project definition, a Detail table for the task definition of each Project. Then a transaction table for the project tasks.

    X-Crusader
    • Post Points: 5
Page 1 of 1 (8 items)