This is a C# Windows Forms application that connects to a Microsoft SQL Server database to manage and retrieve school-related information. The system stores data about school boards, students, teachers, and dependents, and allows users to run various SQL queries to view specific information from the database. The application leverages SQL JOIN operations to retrieve and display structured data in a user-friendly interface.
- Database Connection: Establishes a connection to a Microsoft SQL Server database using a connection string.
- SQL Queries: Supports various SQL queries to retrieve data from multiple tables (e.g.,
schoolBoard,students,members,teachers, etc.). - Data Display: Displays query results in a
DataGridViewcontrol. - Query Information: Each query is explained through informative message boxes that describe the SQL operations.
- Data Filtering: Filters and groups data based on conditions such as student age, salary, and pay scale.
- C#: The application is built using C# in a Windows Forms environment.
- SQL Server: The backend database is powered by Microsoft SQL Server.
- Windows Forms: Used for the graphical user interface (GUI) to interact with the database.
-
Clone the repository:
git clone https://github.com/HeetPatel07/DataBase-Group-Project-.git
-
Install Visual Studio: Make sure you have Visual Studio installed with support for C# and Windows Forms applications.
-
Database Connection:
- Ensure you have access to the Microsoft SQL Server database with the necessary credentials.
- Update the connection string in the
connect()method inForm1.csto match your database server details.string connectionString = "Data Source=your_server;Initial Catalog=cs3380;User=your_username;Password=your_password;";
-
Run the Application:
- Open the project in Visual Studio.
- Build and run the application. The form will display, and you can click on the buttons to execute various SQL queries and view the results.
- Retrieve School Board Information: View details like board number, phone number, name, email, and address.
- Retrieve Student Information: View student details such as name, grade, DOB, gender, and admission date.
- Filter Students by Age: Retrieve student details for students older than 12 years and sort by age and admission grade.
- View Teacher Information: View teacher details such as name, school email, and faculty department.
- Query 1: Retrieves school board information along with the corresponding address.
- Query 2: Retrieves student and member details sorted by the first name of the member.
- Query 3: Retrieves student and member details for students over the age of 12, grouped and ordered by age and admission grade.
- Query 4: Retrieves dependent information for non-academic staff and teachers based on salary/pay scale.
- Query 5: Retrieves teacher details including their name, school email, and faculty department.