Click here to Skip to main content
15,886,519 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello people,

I have a question about linked lists.

If i have a table with projects. Lets say 100 projects.
And i have a table tasks. Lets say 1000 tasks.

Now i can define the table:

projectTasks
columns projectid, taskId

or define the table:

taskProjects
columns taskId, projectId

does it matter?
for example in search speed?
Is there best practice?

thanks.
Posted

1 solution

No, it does not matter in which order you reference both outer tables (performance wise). What will be of importance for performance matter is whether you place indices on your foreign keys or not.

And, as a side note, this has nothing to do with linked lists. This is called a many-to-many relationship.
 
Share this answer
 
Comments
borchef 6-Oct-15 7:42am    
thanks very much.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900