CREATE DATABASE IF NOT EXISTS viber_hostel_management;
USE viber_hostel_management;

CREATE TABLE students(
id INT AUTO_INCREMENT PRIMARY KEY,
full_name VARCHAR(200),
phone VARCHAR(50),
gender VARCHAR(20),
hostel_type VARCHAR(100)
);

CREATE TABLE payments(
id INT AUTO_INCREMENT PRIMARY KEY,
student_id INT,
fee_type VARCHAR(200),
amount DECIMAL(10,2),
status VARCHAR(50)
);

CREATE TABLE results(
id INT AUTO_INCREMENT PRIMARY KEY,
student_id INT,
subject_name VARCHAR(200),
marks_obtained INT,
grade VARCHAR(20)
);