Results 1 to 18 of 18

Thread: 'Big' QT Project for school

  1. #1
    Join Date
    Dec 2006
    Location
    Belgium
    Posts
    8
    Thanks
    1
    Qt products
    Qt3
    Platforms
    Unix/X11

    Question 'Big' QT Project for school

    Hi, I'm a Belgian student in my Final year, and I need to create a Presences and Absences Program that should help teachers to easily mark who's in class and who's not.
    I'm working on it with 1 other guy from my class.
    To start off, teachers should login, and they should only be able to access the classes they teach, but they should be able to view other classes, but not edit/delete.


    The problem is; We don't know where to start, OR how to even do all the things we have in mind.
    We would really appreciate anyone's help, someone to guide us through the whole thing, if possible...

    If there's someone out there that is willing to help, please post and I will provide all details about this project.

    Thanks,

    Mic

  2. #2
    Join Date
    Jan 2006
    Posts
    667
    Thanks
    10
    Thanked 80 Times in 74 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: 'Big' QT Project for school

    You will need a database for this to store all the information about teachers, students, subjects etc.

    I think to start off with you can design the database and decided how the User Interface is going to be like. This database will be installed on the server and will be updated by the teachers.

    If you use Qt then I think u'll need some kind of agent (client application) deployed on all the computers that the teachers will use to Add, Read, Edit or Update the information.

    If you make this web based (no Qt) then teachers can access and edit students information from the browser itself. Teachers will not need to install any application on their system.

    I don't have much experience with databases but would like to help you out.

  3. #3
    Join Date
    Dec 2006
    Posts
    1
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: 'Big' QT Project for school

    Hi,

    I can think about 2 solutions:
    1) Using MySQL server to store data from (Presense Tables). And then using QSqlQueryModel(etc) to work with the tables.
    2) Storing data in XML and using a simple form with a table(where you would have the Presense Table)

    You can see how it's done by going throught examples in Qt dir.


    Good Luck!

    Bond007

  4. #4
    Join Date
    Apr 2006
    Location
    Minsk, Belarus
    Posts
    33
    Thanks
    2
    Thanked 6 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: 'Big' QT Project for school

    I would advice using SQLite database for these purposes. It is included in Qt package and is very simple for usage.

    All data is stored in one file and no additional installation for this database is required. All that you will need is to load sql driver (it is in Qt package)

    All the info could be found in Qt docs

  5. #5
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    52
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: 'Big' QT Project for school

    Quote Originally Posted by Conel View Post
    I would advice using SQLite database for these purposes. It is included in Qt package and is very simple for usage.

    All data is stored in one file and no additional installation for this database is required. All that you will need is to load sql driver (it is in Qt package)

    All the info could be found in Qt docs
    It may be simple. But what about the requirements. I believe the SQLite database is linked to an application. But how would you implement a distributed scenario? From what it sounds like, they have to support multiple instances of the teachers frontend at the same time. Each one looking at the same data. So to me a real client server architecture would be required, if they do not decide to go web based. If they prefer Qt for this, then they would need something like MySQL as was mentioned before, so that they can access the DB over network.

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: 'Big' QT Project for school

    Quote Originally Posted by bond007 View Post
    1) Using MySQL server
    Or PostgreSQL server

  7. #7
    Join Date
    Mar 2006
    Location
    Mountain View, California
    Posts
    489
    Thanks
    3
    Thanked 74 Times in 54 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: 'Big' QT Project for school

    Yes, it depends on the requirements. But since this is a class project, I'll assume it doesn't need to be distributed. In that case sqlite is appropriate. It avoids the whole issue of deployments, which can be intimidating for newbies to the database domain.

  8. #8
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: 'Big' QT Project for school

    Anyway, what class is it? I think we shouldn't interfere with the actual theme of the class, as it is your task to solve the problem. We can give general hints or provide some code snippets that do some things, but the main problem should be solved by you. I'm sure others agree with that opinion...

  9. #9
    Join Date
    Apr 2006
    Location
    San Francisco, CA
    Posts
    186
    Thanks
    55
    Thanked 12 Times in 11 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: 'Big' QT Project for school

    Sounds like you guys should just figure out the design first. Draw up some diagrams or mockups of what you want your application to look like, and how it should function - how you want the teachers to use it, any complex interactions that they should be able to do. Once you start putting some substance behind your project at a tangible level, things should start to look a little more clearer, and a little less daunting, a little less 'Big'.
    Software Engineer



  10. #10
    Join Date
    Dec 2006
    Location
    Belgium
    Posts
    8
    Thanks
    1
    Qt products
    Qt3
    Platforms
    Unix/X11

    Default Re: 'Big' QT Project for school

    Thanks for your replies so far.
    I'm surprised so many people are showing intrest and are willing to help .

    We're trying to keep it simple at first, that way we can always make it better when our 'QT Skills' improve...

    When a teacher logs in, they can select their class, and then all the names of the students show up with tickboxes behind it (unless anyone has a better idea)?
    Then there would be 2 tickboxes behind every name, present and absent.
    There should also be a button 'All present' or something to automatticly tick all present tickboxes.
    Then just a save button to save the changes and the teachers done.
    Ofcourse, people are sometimes late, so there should be an 'arrived late' box too, that you can assign a time to.
    Well, you know what I mean (I think ).

  11. #11
    Join Date
    Jan 2006
    Location
    Kerala
    Posts
    371
    Thanks
    76
    Thanked 37 Times in 32 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: 'Big' QT Project for school

    Would it not be better if you could have a status table which says, Present, Absent, Late arrival, early departure ...


    And In the Attendance table have the status id captured against each student ?
    We can't solve problems by using the same kind of thinking we used when we created them

  12. #12
    Join Date
    Dec 2006
    Location
    Belgium
    Posts
    8
    Thanks
    1
    Qt products
    Qt3
    Platforms
    Unix/X11

    Default Re: 'Big' QT Project for school

    Quote Originally Posted by sunil.thaha View Post
    Would it not be better if you could have a status table which says, Present, Absent, Late arrival, early departure ...


    And In the Attendance table have the status id captured against each student ?
    That does indeed sound way better.
    Do you have any example programs that work that way?

  13. #13
    Join Date
    Feb 2006
    Posts
    157
    Thanks
    12
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4

    Default Re: 'Big' QT Project for school

    This is a small smaple ( not fine tuned ) Database architecture.
    This is just for giving u a clue ( Not in detail )


    Member_type_table
    1. pki_
    2. type_code ( for distingush Teaher or Student ) ( UNIQUE)
    3. remark

    eg; pki_ | type_code
    ----------------------------
    1 | TECH
    2 | STUD


    Status_Table ( for the status like PRESENT/ABSENT/OUT/IN...etc )
    1. pki_
    2. status_name ( should be UNIQUE )

    eg: pki_ | status_name
    ------------------------------
    1 | PRESENT
    2 | ABSENT
    3 | OUT
    4 | IN




    Member_table
    1. pki_ID ( unique code or number given to teahers as well as students )
    2. fki_member_type ( refrence to primary key of Member_type_table )
    3. Member_Name

    eg: pki_ | fki_member_type | member_name
    ---------------------------------------------------------------
    1 | 1 ( ie; TECH ) | Gadies
    2 | 1 | Ros
    3 | 2 ( ie; STUD ) | Tom


    Attendance_Table
    1. pki_attendence
    2. fki_member id ( all teachers + sutdents must have ID ) ( reference to Primary Key of Member_table )
    3. time_
    4. date_
    5. fki_status_id ( for the current status ) ( reference to Primary Key of Status_Table )

    eg : pki_ | fki_member_id | time_ | date_ | fki_status_id
    ----------------------------------------------------------------------
    1 | 1 ( i; Gladies ) | 1/1/06 | 10.00 | 1 ( ie; PRESENT )
    2 | 1 ( i; Gladies ) | 1/1/06 | 12.00 | 3 ( ie; OUT )

    ------
    NB : This Attendance table is not normalised ...U can normalise it as your requirement.


    N:B : pki_ means PRIMARY KEY
    fki_ means FOREIGN KEY

    If u want the attendance in detail split it into different table as u wish.

    Good Luck
    Last edited by joseph; 5th December 2006 at 10:38.

  14. The following user says thank you to joseph for this useful post:

    Sicko (8th December 2006)

  15. #14
    Join Date
    Dec 2006
    Location
    Belgium
    Posts
    8
    Thanks
    1
    Qt products
    Qt3
    Platforms
    Unix/X11

    Default Re: 'Big' QT Project for school

    Thanks joseph.

    We installed eSVN so we can work on our project without screwing up eachothers work.
    More news later..

  16. #15
    Join Date
    Dec 2006
    Location
    Belgium
    Posts
    8
    Thanks
    1
    Qt products
    Qt3
    Platforms
    Unix/X11

    Default Re: 'Big' QT Project for school

    .. bump ..

  17. #16
    Join Date
    Oct 2006
    Posts
    42
    Thanks
    1
    Thanked 8 Times in 8 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: 'Big' QT Project for school

    I recommend that you split this application in two: a server and a client.

    Have the server application listen on a TCP socket for client requests, and handles all the database stuff. You can use SQLite for DB-stuff. Have a look at QTcpServer and QSqlDatabase in the Qt docs. It's not very complicated at all.

    The client application is just a simple GUI that communicates with the server (sending requests and receiving and presenting the response to the user). The server is the guy who actually does all the work.

    Have a look at the Fortune Server example in the Qt docs to see how to use QTcpServer.

    As I said this isn't very complicated, but yet it's close to how it's done for real. You might consider to use a database such as MySql or PostgreSQL, but I'm quite sure SQLite would do just fine for this task. I'd rather spend my time on making this a server/client application than set up MySql or PostgreSql.

    You could also look into making the server multi-threaded.

    And you might want to google for "three-tier architecture".

  18. #17
    Join Date
    Oct 2006
    Posts
    42
    Thanks
    1
    Thanked 8 Times in 8 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: 'Big' QT Project for school

    Quote Originally Posted by Mike View Post
    It may be simple. But what about the requirements. I believe the SQLite database is linked to an application. But how would you implement a distributed scenario? From what it sounds like, they have to support multiple instances of the teachers frontend at the same time. Each one looking at the same data. So to me a real client server architecture would be required, if they do not decide to go web based. If they prefer Qt for this, then they would need something like MySQL as was mentioned before, so that they can access the DB over network.
    SQLite is linked to the application, but it could be part of the server app, right?

    So all they would need is the server app (with a SQLite database) and a client app.

  19. #18
    Join Date
    Jan 2006
    Location
    Kerala
    Posts
    371
    Thanks
    76
    Thanked 37 Times in 32 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: 'Big' QT Project for school

    I second Mike, probably you should use MySql, rather that re-inventing the wheel.

    QSqlDatabase + QSocket + QThread is an overkill, remember that this is a School project.
    We can't solve problems by using the same kind of thinking we used when we created them

Similar Threads

  1. making new project qt4
    By !Ci in forum Qt Programming
    Replies: 1
    Last Post: 18th June 2009, 13:32
  2. Replies: 3
    Last Post: 26th July 2006, 13:23
  3. Replies: 2
    Last Post: 11th July 2006, 14:19
  4. Qt project with mingw & Dev-C++ IDE
    By MarkoSan in forum Installation and Deployment
    Replies: 10
    Last Post: 19th April 2006, 12:42
  5. .h file for each form in QT 3.3.5 project??
    By darpan in forum Qt Programming
    Replies: 1
    Last Post: 23rd March 2006, 11:59

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.