tables and class

  • Thread starter Claudio Penasio Junior
  • Start date
C

Claudio Penasio Junior

Hello all...


I have the follow data model
Tables: Project and Task
The Task table represent the any tasks of Project. This in a Database is so simple:

------------ -------------
|Project | | Task |
|----------| |-----------|
|cod_proj |----------| cod_proj |
|name_proj | | cod_task |
|... | | descript |
------------ | .... |
 
R

Ryan Stewart

Claudio Penasio Junior said:
Hello all...


I have the follow data model
Tables: Project and Task
The Task table represent the any tasks of Project. This in a Database is so simple:

------------ -------------
|Project | | Task |
|----------| |-----------|
|cod_proj |----------| cod_proj |
|name_proj | | cod_task |
|... | | descript |
------------ | .... |

Seems to me that should be a many to many relationship, but if that works
for you then okay. Your object model would go something like this:

public class Project {
String name;
// Other stuff
Vector tasks;
}

public class Task {
String description;
// Other stuff
Project project;
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,189
Latest member
CryptoTaxSoftware

Latest Threads

Top