Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Database Design #16

Open
mstczuo opened this issue Dec 29, 2015 · 6 comments
Open

Database Design #16

mstczuo opened this issue Dec 29, 2015 · 6 comments
Labels

Comments

@mstczuo
Copy link
Collaborator

mstczuo commented Dec 29, 2015

A solution for database design.
add an attribute "last_end_time" stands for the lattest end time of contests which includes this problem, so each time we can find the problems which is visible.

@leasunhy
Copy link
Owner

last end time?
I dont get your idea :-(
you mean the problem should be hidden until the last contest that uses this problem ends?
imho, the problem should become visible as soon as the earliest contest that uses the problem ends...
im getting little confused about this. please enlighten me :-)

@mstczuo
Copy link
Collaborator Author

mstczuo commented Dec 30, 2015

As far as I am concerned, when a contest is running, all the problems should not be found in other place, that is why some problems should be hidden. For example, the teacher wants to start a review contest, all the problems can be found in problem list. Students may find their codes in the OJ system or submit problems outside the contest, which may reduce the number of unsucceesful submission.

@mstczuo
Copy link
Collaborator Author

mstczuo commented Dec 30, 2015

Another issue:
Table "submission" needs a reference to a contest, which is useful in contest standing.

@mstczuo
Copy link
Collaborator Author

mstczuo commented Dec 30, 2015

Add A Standing Table:
In our current design, we have to query the submission table and calculate the standings when a standing page HTML request is detected, which is very slow and not easy to implement.
Shall we create a new table "standing", update when a judge task finished.

@leasunhy
Copy link
Owner

hmm...
IMHO, I think a better solution would be using cache.
I believe it will outperform the add-table method.

@leasunhy
Copy link
Owner

Since applying cache functionalities is not dependent on the implementation details of our view functions, I guess that we should first finish all the modules of our oj before employing caches.

@mstczuo mstczuo added the design label Dec 31, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants