Database Ass2
Database Ass2
5 - to store data first table (student details : name, gender, age, date
of birth, nationality ) second table (certificates : previous and current
grades) theired table (contacts : address, telephone number, parents
contact information) fourth (financial side : for how many months,
the amount of payment each month, the amount paid, the remaining
amount, the total amount ) fifth (behaviors : Warnings, behavior,
personal hygiene )
The purpose of the database system is to manage data for the new
school. It stores student details like names, genders, ages, dates of
birth, places of birth, and nationalities. It also manages certificates,
contacts, financial records, and student behaviors. The system is easy
to use, generates reports on behaviors, grading certificates, and
financial status, and provides onscreen navigation and instructions
for easy use. The database system simplifies information
management for the school and registration department. p2+m2
constant 1:
2 validation and verification procedures to be applied to the data
3 comprehensive input and output screen layouts including the main menu
with options to access data entry sub-forms, run queries and view reports.
student table :
id_student primary key
name : not null
gender : not null
age : not null
date_of_birth : null
place_of_birth : null
nationality :
certificates :
id_certificates primary key
id_student : foreign key
previous : not null
current_grades : not null
Contacts :
financial :
id_financial primary key
id_student : foreign key
paid_total : not null
remaining_installment : null
For_how_many_months : null
behaviors :
id_behaviors primary key
id_student : foreign key
Warnings : unique
personal_cleanliness : null
behavior : null
monthly : null
yearly : not null
p2p3m2m3
relation
certificates table (one to many) for example every student has two
certificates in one year and previous certificates and a lot of things.
contact table (one to many) for example every student has a lot of
information like address and phone number and parnest phone
number .
p2+p3+m2+m3
Query for all tables :
CREATE TABLE Student (
StudentID INT PRIMARY KEY,
Name VARCHAR(50),
Gender VARCHAR(10),
Age INT,
DateOfBirth DATE,
PlaceOfBirth VARCHAR(50),
Nationality VARCHAR(50)
);
DELETE Query:
UPDATE Query:
UPDATE Student
SET Name = 'New Name', Gender = 'New Gender', Age = <new_age>,
DateOfBirth = 'YYYY-MM-DD', PlaceOfBirth = 'New Place', Nationality
= 'New Nationality'
WHERE StudentID = <student_id>;
UPDATE Certificate
SET Previous = 'New Previous', Current = 'New Current'
WHERE CertificateID = <certificate_id>;
UPDATE Contacts
SET Address = 'New Address', PhoneNumber = 'New Phone Number',
ParentContactInfo = 'New Parent Contact Info',
Phone_number_parent = 'New Parent Phone Number'
WHERE ContactID = <contact_id>;
UPDATE Financials
SET Paid_Total = 'New Paid Total', remaining_installment = 'New
Remaining Installment', For_how_many_months = 'New For How
Many Months'
WHERE FinancialID = <financial_id>;
UPDATE Behaviors
SET Warnings = 'New Warnings', personal_cleanliness = 'New
Cleanliness', behavior = 'New Behavior', Month = <new_month>,
Year = <new_year>
WHERE BehaviorID = <behavior_id>;
Diagram for all tables :
1 - Student Table:
- The Student table contains general information about students,
such as their ID, name, gender, age, date of birth, place of birth, and
nationality.
- The primary key in this table is the StudentID column.
2 - Certificate Table:
3 - Contacts Table:
4 - Financials Table:
Certificate table :
Student table :
Behavior table :
Finance table :
Contact table :
There is a form for student 1 that I took the information from the
student table and I made a relation between student table and
contact information and I made a sub form for the contact
information of the student.
behavior report for all students , in it the student id (foreign key )
and behavior id and in it the monthly report for all student :
Certificate report for all students , in this report I been put the
student_id and I made relation with certificate table for example :
student 2 have been taken at the previous year M and in the current
:
Finance report for all students , in it I put student id and I made
relation with the finance table for example : student_id 3 he paid at
thes year 3800 and the rest is up is 0 and the
For_how_many_months paid 12 months :
Menu (quick links ) for example if you click at student button it will
go to student report :
sub form, in it the student information from student table and from
certificate for example we took the student information from
student table and certificate information from certificate table .