The library for a Student Management System coded in C++
This repository provides the library for the code behind the Student Management System. It provides a means for separation of backend implementation from ui implementation. This has been done so the library can be used with any UI, whether it is CLI or GUI, rather than duplicating code
Change directory into the root of project you cloned and open a terminal there and type make. You can then copy the libstudsys.so file to /usr/lib/studsys or in a separate directory and specify the path to it with -L flag
You can copy all the headers into a studsys folder in /usr/include or into a different directory and then include the headers required When compiling the UI code make sure you specify -lstudsys and if necessary -L where path is the location of the libstudsys.so
For the sql files, when setting up the database, you need to set up a user that has full access to the database that will be used. You can then import the sql files using (on linux): mysql -u --password= < .sql See database setup
You need a MySQL server either MySQL or MariaDB Steps: 1. Login to MySQL using mysql -u [user-name] -p (this user must be able to create databases and users) 2. Type CREATE DATABASE ; 3. Exit the MySQL shell 4. Now type mysql -u [user-name] --password=[user-password] [database-name] < [file-name.sql]. You will need to do this with schema.sql, triggers.sql and procedures.sql 5. Log back into the mysql shell and create a user for the system to use and password by typing CREATE USER ''@'localhost' IDENTIFIED BY 'user-password'; 6. Then type GRANT ALL PRIVILEGES ON [database-name].* TO '[user-name]'@'%'; 7. Then type FLUSH PRIVILEGES; and then exit 8. Ensure bind-address in mysql config is set to 0.0.0.0 on the database server machine The MySQL server is now set-up and ready to use with the system
To enable logging, you need to set the environment variable STUD_LOGS with the location of where you want the log file saved.
On linux you can do this with: export STUD_LOGS=<path_to_store_log>
The log is saved in this path as studsys.log
To disable it, unset the environment variable, on Linux: unset STUD_LOGS
To generate documentation you must have doxygen and graphviz installed From the root of the project, run doxygen doxy.cfg