Click here to Skip to main content
15,881,559 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
I Wanna Do a Sample Screen that Can Generate The Time Table of Classes in School (this Time table randomly "Dynamic when i clicked Generate")
this time table weakly
if this time table accepted
will click to button save to save time table in sql DB
any one can help me for examples or steps
to solve my problem ??

the main question "How can i get time table dynamical and random in sql server DB"

thanks for all readers
best regards
Posted

1 solution

Don't.
Do the random part in C# - it's a lot better at it - and let SQL handle what it's god at: storing the data before (classes and how long each needs per period, and per week) and after (when each class is going to start, the room it's in, and how many periods it occupies) you have generated the actual timetable.

Do bear in mind that this can be a horribly complex task if you are doing it properly: you will have many lessons going on simultaneously, and you can't have a student that is doing both subjects in two places at the one time! Generally, random allocation won't work: you need some much better algorithms!
This[^] may give you some pointers! :laugh:
 
Share this answer
 
Comments
Mohamed-Hmy 24-May-15 8:59am    
can you help me .. this algorithms make it in sql or c# ??
can you get me examples of this algorithms or search about what ??
i wanna make select query in sql server to get schedule (time table) from DB Randomly ?? is this correct and how can i do it without repeat in returned data from Query
thanks for your effort
OriginalGriff 24-May-15 9:46am    
Did you follow the link at all?

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