| | |
Coursework submission system
Please support our MySQL advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Mar 2008
Posts: 4
Reputation:
Solved Threads: 0
Attached to this thread is the DB schema I've come up with. I'm trying to do an outer join to join the exercises to the submissions regardless if there's a related record in the submissions table.
Trouble is when a user logs in I want to execute this query and it will show all the exercises. In the status column it should say if he's submitted to that particular exercise and if he can still make a submission. But if you use a where clause on the join it will no longer show the exercises that he hasn't submitted to. Is there a way around this?
My original design was to do it as two queries hence it's like the following
step 1 execute query to get alll exercises
step 2 execute query to get all related records based on userid and exerciseid
But this is inefficient am told
Trouble is when a user logs in I want to execute this query and it will show all the exercises. In the status column it should say if he's submitted to that particular exercise and if he can still make a submission. But if you use a where clause on the join it will no longer show the exercises that he hasn't submitted to. Is there a way around this?
My original design was to do it as two queries hence it's like the following
step 1 execute query to get alll exercises
step 2 execute query to get all related records based on userid and exerciseid
But this is inefficient am told
Last edited by dbdesigner_2008; Mar 12th, 2008 at 8:04 am.
![]() |
Other Threads in the MySQL Forum
- Previous Thread: I am not a developer
- Next Thread: Query syntax not working
Views: 602 | Replies: 0
| Thread Tools | Search this Thread |
Tag cloud for MySQL
"use" 1 agplv3 alfresco amazon api artisticlicense breathalyzer camparingtocolumns changingprices cmg contentmanagement count court crm data database design developer development drupal dui ec2 eliminate email enter enterprise error eudora facebook form foss gartner gnu government gpl greenit groklaw groupware images innerjoins insert ip joebrockmeier join journalism keywords laptop law legal license licensing linux maintenance managing matchingcolumns metron micromanage microsoft microsoftexchange mindtouch montywidenius mozilla multiple music mysql mysqlcolumnupdating mysqldatetimeordermax() mysqlindex mysqlinternalqueries mysqlquery mysqlsearch news open-xchange opendatabasealliance opengovernment opensource operand oracle pdf penelope php priceupdating referencedesign remove reorderingcolumns resultset saas select sharepoint sourcecode spotify sql sugarcrm syntax techsupport thunderbird transparency update virtualization





