Relation Attributes Attribute Data Type: Teachers

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 5

Relation Attributes Attribute Data Type

Teachers ID number Character


this table will store information Title Character
relating to all the teachers in Name Character
the school, their personal Department Enum(“sciences”,
details and the classes they are “commercials”,”arts”)
teaching Level Enum(“zjc”,”olevel”, “alevel”
Students ID number Character
This table will store all the First Name Character
students s personal details and Last Name Character
their classes Date of Birth Date
Gender Enum(“m”,”f”)
Class Character
Department Subject Character
This table will store information Name of Teacher Character
relating to each of the subjects Number of students Integer
offered at the school, grouped Level (form) Enum(“sciences”,
in their various departments “commercials”,”arts”)
Room Number Integer
Accounts(Students) Student ID number Character
This table will store information Student Name Character
relating to fees and any funds Class Character
supposed to be paid and paid by Fees amount Currency
the students Amount Owing Currency
Accounts (staff) Teacher ID number Character
This table shows information Name Character
relating to teachers s salaries Salary Currency
and their bank details Bank Character
Bank number Character

Question 2

CREATE TABLE

Teachers (

id CHAR(6) PRIMARY KEY, UNIQUE NOT NULL

title CHAR(15)

Name CHAR(30)

Department CHAR(30)

Classes INT(2)

CREATE TABLE
Students (

Id CHAR(6) PRIMARY KEY, UNIQUE ,

First name CHAR(30),

Last Name CHAR(30),

Gender ENAM(“m”, “f”),

Date of birth DATE,

Class CHAR(10),

);

CREATE TABLE
Departmet(

Subject CHAR(30),

Name of Teacher CHAR(30),

Number of Students INT(3),

Level ENAM(“sciences”, “commercials”,”arts”),

Room Number INT (4),

);

); CREATE TABLE

Accounts: Students)

Id CHAR(6) PRIMARY KEY, UNIQUE, NOT NULL

First name CHAR(30),

Last Name CHAR(30),

Fees Amount CUR,

Amount owing CUR,

); CREATE TABLE

Accounts: staff)

Id CHAR(6) PRIMARY KEY, UNIQUE, NOT NULL,


Teachers name CHAR(30),

Salary amount CUR,

Bank CHAR(30),

Bank Number CHAR(12) ,UNIQUE,

);

Question 3

Students – 50

Teachers -15

Departments-15

Accounts (students)-50

Accounts(teachers)-15

Question 4.

INSERT INTO tariff (type, cost, intfee, forfee) VALUES

('standard',’35’, 7, 15),

('delux',’48’, 6,10 ),

('suite',’60’, 5, 7);

UPDATE admin SET username= ‘ruevo’, password= ‘rumbivon’ WHERE id = ‘3’

DELETE FROM student WHERE studentid = 4;

Question 5)

The source of your data: we have cooked up the data. We will transform data from the html or web
forms into the database using php language.one internet reference we have is
{https://www.lifewire.com/definition-of-a-schema-in-a-database-1019262}

Question 6
.TEACHERS TABLE

ID NUMBER TITLE NAME DEPARTMENT Level(form)


H1704F Miss Jonga Sciences ZJC
H1755Z Mrs Johnson Sciences O Level
H1778E Mr Doba Arts O Level
H1708I Miss Nasho Commercials O Level
H1755T Mrs Naisson Commercials A level
H1745T Mr Mathews Commercials ZJC
H1709J Mr Mutambarika Sciences A level

ACCOUNTS; STAFF TABLE

ID NUMBER NAME SALARY AMOUNT($) BANK BANK NUMBER


H1704F Jonga 900 ZB 188837399034670
H1755Z Johnson 1200 NMB 415627389109219
H1778E Doba 1200 Steward 236398375485407
H1708I Nasho 1200 ZB 356769568780999
H1755T Naisson 1300 Cabs 455767809045756
H1745T Mathews 900 ZB 345678984567789
H1709J Mutambarika 1500 Cabs 435678456780945

DEPARTMENTS TABLE

DEPARTMENT SUBJECT NAME OF NUMBER OF LEVEL ROOM


TEACHER STUENTS NUMBER
Sciences Biology Jonga 40 ZJC 23
Sciences Chemistry Johnson 60 O Level 12
Arts Literature Doba 60 O Level 19
Commercials Accounting Nasho 50 O Level 23
Commercials Computing Naisson 20 A level 5
Commercials Economics Mathews 46 ZJC 17
Sciences Physics Mutambarika 34 A level 9

Students

IDNUMBER FIRSTNAME LASTNAME DATE OF GENDER CLASS


BIRTH
H1756Z Grace Wilson 12/03/99 f U6 Comm
H1776X William Smith 23/05/99 m U6 Scie
H1734D Chido Chikwava 11/01/98 f U6 Comm
H1709C Mary Hoza 09/12/97 f U6 Arts
H1798Z Lawrence Basilio 11/07/99 m U6 Arts

Accounts; students

STUDENT STUDENT NAME CLASS FEES AMOUNT FEES OWING


IDNUMBER
H1754X S.Choga L6 Comm $450 $ 150

H1765H B.Aaron L6 Scien $450 $ 100


H1745C A.Matingo L6 Scien $450 $ 50

H1776X D.Matanga L6 Arts $450 $ 140


H1734Z J.Wilson L6 Comm $450 $ 190

H1723Z H.Hwarimba L6 Comm $450 $ 60


H1712Z C.Jordan L6 Arts $450 $ 80

You might also like