School Management system in Java using oracle database
Most of the peoples are familiar with the School Management System(SMS). SMS can be developed as a web application or a desktop application. I developed this project as desktop application to complete my database assignment. This project is now in alpha version and has many bugs. But it can help novice students to complete their database assignment and also get knolege about
- How to connect Oracle 1og express database with java.
- How Store in database, fetch from database, process and manipulate those data using Java.
- How to configure Oracle 1og express database with NetBeans IDE 6.8.
- How to add any .jar file with any project using NetBeans IDE.
SMS is developed in Java using database Oracle 10g express in NetBeans IDE. Workable Features of this project is given bellow:
- Add, edit, remove student
- Students profile
- Add or remove class
- Add or remove section
- Marks entry
- Generate mark-sheet
- Advance search option which is able to search by student name, class, section, exam marks.
- Changeable theams
How to configure School Management System
- First step is download ORACLE DATABASE 10g EXPRESS, then install it on your pc.
- Create a user with Username: sms & Password: sms.
- download this project from the given link in this post.
- Now open this project in NetBeans IDE. This time SMS project have some reference problem. To solve this problem we have to add few .jar files with this project SMS. this .jar files are located at lib folder of the project folder. Now add lib\ojdbc6.jar for database, then lib\JTattoo.jar and lib\liquidlnf.jar for look and feel. The reference problem should be resolved.
- In database there is no schema named sms. To create the schema you should run schoolmanagementsystem\Initializetion.java file. After running Initializetion.java schema named sms should be created automatically. Now the database schema is ready to store data.
- Now run this project you should see (Figure 1) view. There should be four options. This options are not workable so that you can choose any one from those options ie. Admin.
- After choosing one option you should view Login face (figure 2). there is no user name and password and no authorization process. this Login button is dam-mi so you can just click Login button to view the home page.
- Now you can see the Home page (figure 3).
How to connect database
Function connectdba() of SelectAndInsertData.java is responsible for connecting database. I used
- database URL : jdbc:oracle:thin:@localhost:1521:XE
- username : sms
- password : sms
connection URL description should be found oracle tutorial.
String url = "jdbc:oracle:thin:@localhost:1521:XE"; con = DriverManager.getConnection(url, "sms", "sms");
Source Code Description
- Main.java is the starting point of this project.
- MainFrame.java play important role. All events is handled in this class and manipulate different portion of UI.
- Others classes hold UI layout and design.
- SelectAndInsertData.java is responsible to interact with database. All data transactions between UI and database are coded in this class.
In this project I used Regular Expression query function in normal search and advance search option to simplify the query string. But it does not work properly for every environment. I dont know why this problem occured and how to solve it. Still now i cant resolve this problem. So if this search query does not work properly you should change the query string without using regular expression query function.