Part-1 Entity-relationship data model
The aim of any database design process is to create a database that will store data and maintain data effectively. The end result of the design process of a database is an acceptable logical data model. To effectively understand the similarities and differences that exist between normalization and entity relationship modelling, there is need to understand the phases that database design goes through. The four phases that database design goes through are;
- Requirements analysis phase
- Conceptual design phase
- Logical design phase
- Physical design phase.
Entity relationship modelling is also known as top-down approach. This approach of database design focuses on higher-level constructs including collections of entity types, identification of populations and the relationships that exist between the identified populations. The design process using entity relationship diagram starts with a set of higher level requirements for example narratives. From the narrative a process of identification of the types of entities that are needed for data representation as well as the attributes of the entities is done.
The attributes identified will later on become attributes in the database tables. To identify the entities, the database designer tries to develop conceptual models through identification of highly abstracted objects or entities that may exist within the problem domain. This process uses various techniques for example making of observations, conducting interviews and questionnaires, case study review and other requirements gathering techniques. The data model also gets a lot of its inspiration from a thorough analysis of the business rules. Apart from the identification of structural properties for example relationships existing between entities, the cardinalities of relationships is also identified.
Early stages of bottom up approach including drafting of an initial data model that does not have any attributes but only the entities mapped to each other to show the relationships existing between the entities. After achieving a satisfactory data model the database designer shifts his focus on the platform on which the database will be deployed. This stage deals with the development of the logical schema and requires the database designer to put into consideration any mapping issues between the structures of the ER model and the chosen persistent mechanism i.e. (relational or object-relational).
In contrast normalization which is commonly known as bottom-up approach considers designing of a database as proceeding from initially analysing lower-level conceptual units for example functional dependencies and attributes and then moving towards a more acceptable logical data model by grouping associated attributes logically. Normalization approach views the task of population identification as a process of object identify generalization from structural dependencies examples. For bottom-approach inputs required include views of data for example reports or screenshots. Normalization addresses potential deficiencies in a design of a relational schema that are associated with different levels of normal form. Normalizing helps reduce dependency and redundancy 1.1 Business Rules
Part-2 Implementing the database using Microsoft Access
The following business rules were identified from the case study;
- The college offers different courses with each course having a different duration.
- The college has staff who teach different courses. A staff can teach more than one course.
- A course can use none or more than one instrument.
- A student enrolls for one or more instrument courses and the duration and time of the course is recorded.
- A staff can use one or more instruments when teaching a course.
- An enrollment for a course by a student leads to an invoice. The invoice for a course is given a month later.
1.2 Assumptions
The following assumptions were made on the parts of the case study that did not seem clear.
- A student makes only one payment for a course. This payment is based on the invoice generated for that course so the student is supposed to pay the exact amount indicated on the invoice.
- A staff teaches one or more courses using different instruments thus a staff can have expertise on one or more instruments
- A student takes more than one lesson for a course thus every enrollment results into one or more classes depending on the duration of the courses. A lesson has its own specific duration thus the different lessons can have different durations.
2.Relational Database implementation
2.1 Normalization
For the proposed database design of the Australian Institute of Music normalization involves the following steps;
- Normalization of the entities to 1NF- at this level of normalization repeating groups identified in any of the relations were eliminated so that all entities were in 1NF.
- Normalization of the entities to 2NF- At this level of normalization the entities achieved in 1NF were normalized by eliminating the partial dependencies to make sure that all attributes depend on the candidate key and that no combination of attributes form a candidate key.
- Normalization of the entities to 3NF- At this level of normalization the entities achieved in 2NF were normalized by eliminating all transitive dependencies to make sure that all attributes in every relation are determined by the key attribute in that relation and that no attribute determines another attribute.
By using top down approach for the entity relationship diagram and bottom up approach for the normalization the following relations were achieved.
To show the normalization process, the bottom- approach is used. The first step is to identify all relations in their UNF. The relations in UNF are;
- Course (course, cost, time, intruments)
- Staff (staffID, name, family, dob, phone, address, defree, intruments)
- Instruments (name, manufacturerName, quantity)
- Student (StudentName, postalAddress, dob, phone, course, courseDate, courseTime, courseDuration, paymentAmount, paymentDate, paymentStatus, lessonDuration, lessonDate)
- Payment (studentName, amount, course)
After identifying the relations in un-normalized form from the case study, the next step is to apply all the normalization steps to obtain the relations in 3NF.
UNF
Course (course, cost, time, intruments)
1NF
Normalization to 1NF involves removing all the repeating groups from the relation to get a relation in 1NF.
Considering the course relation in UNF there exists a repeating groups because a course uses more than one instrument. After eliminating the repeating groups you remain with;
Course (course, cost, time, instrumentName, manufacturer, quantity)
2NF
Normalization to 2NF involves eliminating all partial dependencies to make sure there is only one candidate key. Considering the relation achieved from normalizing to 1NF there exists partial dependency and to eliminate the partial dependency a candidate key courseID is introduced.
Course (CourseID, course, cost, time, intrumentName, manufacturer, quantity)
3NF
Normalization to 3NF involves eliminating all te transitive dependencies to make sure that the each solution attained after normalization to 3NF has only one key attribute which determines all the other key attributes. Taking the relation attained from normalization to 2NF for course entity there exists transitive dependency because te instrumentName determines the manufacturer and the quantity thus this must be eliminated for the relation to be in 3NF. This will result to the following relation.
Course (CourseID, name, cost)
Intrument (InstrumentName, manufacturer, quantity)
Staff
UNF
Staff (staffID, name, family, dob, phone, address, degree, intruments)
1NF
Taking the relation in UNF, normalization to 1NF will involve eliminating all the repeating groups. There exists repeating groups because a staff can teach more than one instrument thus eliminating this repeating group will result to the following relations.
Staff( staffID, name, family, dob, phone, address, degree, instrumentName, manufacturerName, quantity).
2NF
Take the relations in achieved in normalization to 1NF and eliminate all partial dependencies to make sure that there is only candidate key and that no combination of keys in the relation can form a candidate key. Considering the relation achieved in 1NF above, there exists no partial dependency because there is a candidate key staffID on which all the other attributes depend on.
Normalization process
Staff( staffID, name, family, dob, phone, address, degree, instrumentName, manufacturerName, quantity).
3NF
Normalization to 3NF involves taking the relation achieved in 2NF and then eliminating all the transitive dependencies to make sure there is only one key attribute. Evaluating the relation in 2NF, there exisits transitive dependency because the instrumentName determines the manufacturerName and the quantity thus this can be decomposed to form another relation.
Staff( staffID, name, family, dob, phone, address, degree)
Instrument (instrumentName, manufacturerName, quantity).
UNF
Student (StudentName, postalAddress, dob, phone, course, courseDate, courseTime, courseDuration, paymentAmount, paymentDate, paymentStatus, lessonDuration, lessonDate)
1NF
Taking the relation in UNF above and eliminate all the repeating groups to attain a relation in 1NF. A student can enroll for more than one course so that is a repeating group. An enrollment results one or more payment thus that is a repeating group. And a course can result to more than one lesson thus that is a repeating group. Eliminating his repeating group leads to the following relation
Student (StudentName, postalAddress, dob, phone, course, courseDate, courseTime, courseDuration, paymentAmount, paymentDate, paymentStatus, lessonDuration, lessonDate)
2NF
Normalization to 2NF involves taking the relation in 1NF above and eliminating all the partial dependencies to make sure that only one candidate key exists in the relation. To eliminate partial dependencies will be done by introducing a candidate key studentID. The course and the courseDate determine the courseTIme and courseDUration which can be decomposed to form the enrollment relation. PaymentStatus is depend on paymentDate and paymentAMount so this can be split to form payment relation. The lessonduration depends on the sessonDate thus this can also be split to form a relation.
Student (studentID, StudentName, postalAddress, dob, phone)
Course_enrollment (enrollmentID, studentID, courseID)
Payments (paymentID, courseID, status, datePaid)
Lessons (lessonID, duration, date)
3NF
Normalization to 3NF involves taking the relations obtained in 2NF and eliminating all transitive dependencies to make sure that they key attribute in the relation determines all the other attributes. All the relations in 2NF do not have transitive dependencies so this leaves the relations in 3NF as;
Student (studentID, StudentName, postalAddress, dob, phone)
Course_enrollment (enrollmentID, studentID, courseID)
Payments (paymentID, courseID, status, datePaid)
Lessons (lessonID, duration, date)
Using top-down and bottom-up approaches together the relations in 3NF are;
- Course (courseID, name, cost)
This entity will store all the courses offered at the college and each course will be identified using the courseID
- Students (studentID, name, postalAddress, dob, contactNO)
This relation will store details of all the students with each student identified by a studentID
- Instruments (instrumentID, name, manufacturer_name, quantity)
Integrity constraints
This relation will store details of all instruments with every instrument identified by a unique instrumentID
- Lessons (lessonID, courseid, duration, date)
This relation will store details of all the lessons taken for different courses with each lesson identified using a unique lessonID
- Teaching_staff (staffID, name, family, dob, phone, address, degree)
This relation will store details of all the teaching staff in the school with each teaching staff identified using a unique staffID
- Course_enrollment (enrollmentID, studentID, courseID)
This relation will be used to capture all the enrollment records for different courses by students
- Staff_courses (staffCourseID, staffID, courseID)
This relation will be used to store courses taught by different teaching staff
- Lesson_instruments (lesson_instr_ID, lessonID, instrumentID)
This relation will be used to store details of instruments used for various lessons.
- Payments (paymentID, studentID, couseID, status, datePaid)
The payment entity will be used to store details of payments by students for various courses.
2.2 Functional dependencies
- instruments
( instrumentID ) à ( name, manufacturer_name, quantity )
- Course
( coursed ) à ( name, cost )
- Teaching_staff
( staffID )à( name, family, dob, phone, address, degree )
- Staff_courses
( staffCourseID )à( staffID, courseID )
- Lessons
( lessonID )à( coursed, duration, date )
- Lesson_instruments
( lesson_instr_ID )à ( lessonID, instrumentID )
- students
( studentID )à ( name, postalAddress, dob, contactNO )
- Enrollment
( enrollmentID ) à ( studentID, courseID )
- payments
( paymentID ) à ( studentID, courseID, status, datePaid )
Queries
The queries have been created manually using SQL view.
- List details of students who are under 18 years of age.
Query
SELECT students.[student_name], students.[studentID], students.[student_postal_address], students.[student_dob], students.[student_contact]
FROM students
WHERE Year([student_dob]) = Year(Date()) – 18;
Output
- Show details of lessons coming up in the next 7 days (if any).
Query
SELECT lessons.[lessonID], lessons.[courseID], lessons.[course_duration], lessons.[course_date]
FROM lessons
WHERE Year([course_date])* 53+DatePart(“ww”, [course_date]) = Year(Date())* 53+DatePart(“ww”, Date()) + 1;
Output
- Show a list of students and the total number of lessons they have had. Show the student ID, family name, given name, and the number of lessons.
Query
SELECT students.studentID, students.student_name, COUNT(lessonStudents.ID) AS TotalLessons
FROM students INNER JOIN lessonStudents ON students.studentID=lessonStudents.studentID
GROUP BY students.studentID,students.student_name;
Output
- Show details of any student who has had or will be having a piano lesson.
Query
SELECT students.*
FROM students INNER JOIN course_enrollment ON students.studentID=course_enrollment.studentID
WHERE course_enrollment.courseID=2;
Output
APPENDIX
Generated sql of the database created in access.
DROP DATABASE IF EXISTS `college`;
CREATE DATABASE IF NOT EXISTS `college`;
USE `college`;
#
# Table structure for table ‘course_enrollment’
DROP TABLE IF EXISTS `course_enrollment`;
CREATE TABLE `course_enrollment` (
`enrollmentID` INTEGER NOT NULL AUTO_INCREMENT,
`studentID` INTEGER DEFAULT 0,
`courseID` INTEGER DEFAULT 0,
INDEX (`courseID`),
PRIMARY KEY (`enrollmentID`),
INDEX (`studentID`)
) ENGINE=myisam DEFAULT CHARSET=utf8;
SET autocommit=1;#
# Dumping data for table ‘course_enrollment’
INSERT INTO `course_enrollment` (`enrollmentID`, `studentID`, `courseID`) VALUES (1, 1, 2);
INSERT INTO `course_enrollment` (`enrollmentID`, `studentID`, `courseID`) VALUES (2, 2, 1);
INSERT INTO `course_enrollment` (`enrollmentID`, `studentID`, `courseID`) VALUES (3, 3, 3);
INSERT INTO `course_enrollment` (`enrollmentID`, `studentID`, `courseID`) VALUES (4, 4, 1);
INSERT INTO `course_enrollment` (`enrollmentID`, `studentID`, `courseID`) VALUES (5, 5, 3);
# 5 records#
SQL queries
# Table structure for table ‘courses’
DROP TABLE IF EXISTS `courses`;
CREATE TABLE `courses` (
`courseID` INTEGER NOT NULL AUTO_INCREMENT,
`course_name` VARCHAR(255),
`course_cost` INTEGER DEFAULT 0,
PRIMARY KEY (`courseID`)
) ENGINE=myisam DEFAULT CHARSET=utf8;
SET autocommit=1;#
# Dumping data for table ‘courses’
INSERT INTO `courses` (`courseID`, `course_name`, `course_cost`) VALUES (1, ‘Singing’, 100);
INSERT INTO `courses` (`courseID`, `course_name`, `course_cost`) VALUES (2, ‘Paino’, 75);
INSERT INTO `courses` (`courseID`, `course_name`, `course_cost`) VALUES (3, ‘vialon’, 120);
INSERT INTO `courses` (`courseID`, `course_name`, `course_cost`) VALUES (4, ‘Guitar’, 50);
# 4 records#
# Table structure for table ‘instruments’
DROP TABLE IF EXISTS `instruments`;
CREATE TABLE `instruments` (
`instrumentID` INTEGER NOT NULL AUTO_INCREMENT,
`instrument_name` VARCHAR(255),
`instrument_manufacturer` VARCHAR(255),
`instrument_quantity` INTEGER DEFAULT 0,
PRIMARY KEY (`instrumentID`)
) ENGINE=myisam DEFAULT CHARSET=utf8;
SET autocommit=1;#
# Dumping data for table ‘instruments’
INSERT INTO `instruments` (`instrumentID`, `instrument_name`, `instrument_manufacturer`, `instrument_quantity`) VALUES (1, ‘Guitar’, ‘RockaFella’, 20);
INSERT INTO `instruments` (`instrumentID`, `instrument_name`, `instrument_manufacturer`, `instrument_quantity`) VALUES (2, ‘Violin’, ‘Sony’, 32);
INSERT INTO `instruments` (`instrumentID`, `instrument_name`, `instrument_manufacturer`, `instrument_quantity`) VALUES (3, ‘Piano’, ‘Sony’, 5);
INSERT INTO `instruments` (`instrumentID`, `instrument_name`, `instrument_manufacturer`, `instrument_quantity`) VALUES (4, ‘Flute’, ‘Panasonic’, 40);
INSERT INTO `instruments` (`instrumentID`, `instrument_name`, `instrument_manufacturer`, `instrument_quantity`) VALUES (5, ‘SaxoPhone’, ‘Sony’, 23);
# 5 records#
# Table structure for table ‘invoice’
DROP TABLE IF EXISTS `invoice`;
CREATE TABLE `invoice` (
`invoiceNO` INTEGER NOT NULL AUTO_INCREMENT,
`studentID` INTEGER DEFAULT 0,
`invoice_date` DATETIME NOT NULL,
`amount_due` INTEGER DEFAULT 0,
PRIMARY KEY (`invoiceNO`),
INDEX (`studentID`)
) ENGINE=myisam DEFAULT CHARSET=utf8;
SET autocommit=1;#
# Dumping data for table ‘invoice’
INSERT INTO `invoice` (`invoiceNO`, `studentID`, `invoice_date`, `amount_due`) VALUES (1, 2, ‘2018-05-11 00:00:00’, 300);
INSERT INTO `invoice` (`invoiceNO`, `studentID`, `invoice_date`, `amount_due`) VALUES (2, 1, ‘2018-05-02 00:00:00’, 50);
INSERT INTO `invoice` (`invoiceNO`, `studentID`, `invoice_date`, `amount_due`) VALUES (3, 3, ‘2018-05-03 00:00:00’, 250);
INSERT INTO `invoice` (`invoiceNO`, `studentID`, `invoice_date`, `amount_due`) VALUES (4, 4, ‘2018-02-03 00:00:00’, 50);
# 4 records
#
# Table structure for table ‘lesson_instruments’
DROP TABLE IF EXISTS `lesson_instruments`;
CREATE TABLE `lesson_instruments` (
`lesson_instr_ID` INTEGER NOT NULL AUTO_INCREMENT,
`lessonID` INTEGER DEFAULT 0,
`instrumentID` INTEGER DEFAULT 0,
INDEX (`instrumentID`),
INDEX (`lessonID`),
PRIMARY KEY (`lesson_instr_ID`)
) ENGINE=myisam DEFAULT CHARSET=utf8;
SET autocommit=1;
#
# Dumping data for table ‘lesson_instruments’
INSERT INTO `lesson_instruments` (`lesson_instr_ID`, `lessonID`, `instrumentID`) VALUES (1, 1, 2);
INSERT INTO `lesson_instruments` (`lesson_instr_ID`, `lessonID`, `instrumentID`) VALUES (2, 2, 2);
INSERT INTO `lesson_instruments` (`lesson_instr_ID`, `lessonID`, `instrumentID`) VALUES (3, 3, 1);
INSERT INTO `lesson_instruments` (`lesson_instr_ID`, `lessonID`, `instrumentID`) VALUES (4, 4, 3);
Marking Criteria
INSERT INTO `lesson_instruments` (`lesson_instr_ID`, `lessonID`, `instrumentID`) VALUES (5, 5, 2);
# 5 records#
# Table structure for table ‘lessons’
DROP TABLE IF EXISTS `lessons`;
CREATE TABLE `lessons` (
`lessonID` INTEGER NOT NULL AUTO_INCREMENT,
`courseID` INTEGER DEFAULT 0,
`course_duration` INTEGER DEFAULT 0,
`course_date` DATETIME,
INDEX (`courseID`),
PRIMARY KEY (`lessonID`)
) ENGINE=myisam DEFAULT CHARSET=utf8;
SET autocommit=1;#
# Dumping data for table ‘lessons’
INSERT INTO `lessons` (`lessonID`, `courseID`, `course_duration`, `course_date`) VALUES (1, 1, 30, ‘2018-06-05 00:00:00’);
INSERT INTO `lessons` (`lessonID`, `courseID`, `course_duration`, `course_date`) VALUES (2, 2, 60, ‘2018-05-14 00:00:00’);
INSERT INTO `lessons` (`lessonID`, `courseID`, `course_duration`, `course_date`) VALUES (3, 3, 30, ‘2018-04-12 00:00:00’);
INSERT INTO `lessons` (`lessonID`, `courseID`, `course_duration`, `course_date`) VALUES (4, 4, 60, ‘2018-05-05 00:00:00’);
INSERT INTO `lessons` (`lessonID`, `courseID`, `course_duration`, `course_date`) VALUES (5, 1, 30, ‘2018-06-05 00:00:00’);
# 5 records#
# Table structure for table ‘lessonStudents’
DROP TABLE IF EXISTS `lessonStudents`;
CREATE TABLE `lessonStudents` (
`ID` INTEGER NOT NULL AUTO_INCREMENT,
`lessonID` INTEGER DEFAULT 0,
`studentID` INTEGER DEFAULT 0,
INDEX (`lessonID`),
PRIMARY KEY (`ID`),
INDEX (`studentID`)
) ENGINE=myisam DEFAULT CHARSET=utf8;
SET autocommit=1;
#
# Dumping data for table ‘lessonStudents’
INSERT INTO `lessonStudents` (`ID`, `lessonID`, `studentID`) VALUES (1, 1, 2);
INSERT INTO `lessonStudents` (`ID`, `lessonID`, `studentID`) VALUES (2, 1, 1);
INSERT INTO `lessonStudents` (`ID`, `lessonID`, `studentID`) VALUES (3, 1, 2);
INSERT INTO `lessonStudents` (`ID`, `lessonID`, `studentID`) VALUES (4, 2, 3);
INSERT INTO `lessonStudents` (`ID`, `lessonID`, `studentID`) VALUES (5, 2, 1);
INSERT INTO `lessonStudents` (`ID`, `lessonID`, `studentID`) VALUES (6, 3, 1);
INSERT INTO `lessonStudents` (`ID`, `lessonID`, `studentID`) VALUES (7, 3, 3);
INSERT INTO `lessonStudents` (`ID`, `lessonID`, `studentID`) VALUES (8, 4, 4);
INSERT INTO `lessonStudents` (`ID`, `lessonID`, `studentID`) VALUES (9, 4, 1);
INSERT INTO `lessonStudents` (`ID`, `lessonID`, `studentID`) VALUES (10, 5, 5);
# 10 records
#
# Table structure for table ‘payments’
DROP TABLE IF EXISTS `payments`;
CREATE TABLE `payments` (
`paymentID` INTEGER NOT NULL AUTO_INCREMENT,
`studentID` INTEGER DEFAULT 0,
`courseID` INTEGER DEFAULT 0,
`payment_status` TINYINT(1) DEFAULT 0,
`date_paid` DATETIME NOT NULL,
`amount` INTEGER DEFAULT 0,
INDEX (`courseID`),
INDEX (`date_paid`),
PRIMARY KEY (`paymentID`),
INDEX (`studentID`)
) ENGINE=myisam DEFAULT CHARSET=utf8;
SET autocommit=1;
#
# Dumping data for table ‘payments’
INSERT INTO `payments` (`paymentID`, `studentID`, `courseID`, `payment_status`, `date_paid`, `amount`) VALUES (1, 1, 1, 1, ‘2018-01-21 00:00:00’, NULL);
INSERT INTO `payments` (`paymentID`, `studentID`, `courseID`, `payment_status`, `date_paid`, `amount`) VALUES (2, 2, 1, 0, ‘2018-02-05 00:00:00’, NULL);
INSERT INTO `payments` (`paymentID`, `studentID`, `courseID`, `payment_status`, `date_paid`, `amount`) VALUES (3, 3, 2, 1, ‘2018-03-05 00:00:00’, NULL);
INSERT INTO `payments` (`paymentID`, `studentID`, `courseID`, `payment_status`, `date_paid`, `amount`) VALUES (4, 4, 4, 0, ‘2018-04-05 00:00:00’, NULL);
INSERT INTO `payments` (`paymentID`, `studentID`, `courseID`, `payment_status`, `date_paid`, `amount`) VALUES (5, 5, 3, 1, ‘2018-01-05 00:00:00’, NULL);
# 5 records
#
# Table structure for table ‘staff_courses’
DROP TABLE IF EXISTS `staff_courses`;
CREATE TABLE `staff_courses` (
`staff_course_ID` INTEGER NOT NULL AUTO_INCREMENT,
`staffID` INTEGER DEFAULT 0,
`courseID` INTEGER DEFAULT 0,
INDEX (`courseID`),
PRIMARY KEY (`staff_course_ID`),
INDEX (`staffID`)
) ENGINE=myisam DEFAULT CHARSET=utf8;
SET autocommit=1;
# Dumping data for table ‘staff_courses’
INSERT INTO `staff_courses` (`staff_course_ID`, `staffID`, `courseID`) VALUES (1, 1, 2);
INSERT INTO `staff_courses` (`staff_course_ID`, `staffID`, `courseID`) VALUES (2, 1, 3);
INSERT INTO `staff_courses` (`staff_course_ID`, `staffID`, `courseID`) VALUES (3, 3, 1);
INSERT INTO `staff_courses` (`staff_course_ID`, `staffID`, `courseID`) VALUES (4, 3, 2);
INSERT INTO `staff_courses` (`staff_course_ID`, `staffID`, `courseID`) VALUES (5, 4, 4);
INSERT INTO `staff_courses` (`staff_course_ID`, `staffID`, `courseID`) VALUES (6, 4, 3);
# 6 records#
# Table structure for table ‘students’
DROP TABLE IF EXISTS `students`;
CREATE TABLE `students` (
`studentID` INTEGER NOT NULL AUTO_INCREMENT,
`student_name` VARCHAR(255),
`student_postal_address` VARCHAR(255),
`student_dob` DATETIME,
`student_contact` INTEGER DEFAULT 0,
PRIMARY KEY (`studentID`)
) ENGINE=myisam DEFAULT CHARSET=utf8;
SET autocommit=1;
#
# Dumping data for table ‘students’
INSERT INTO `students` (`studentID`, `student_name`, `student_postal_address`, `student_dob`, `student_contact`) VALUES (1, ‘Cleveland Brown’, ‘123-RT-23’, ‘1999-12-01 00:00:00’, 4342340);
INSERT INTO `students` (`studentID`, `student_name`, `student_postal_address`, `student_dob`, `student_contact`) VALUES (2, ‘Cleveland Junior’, ‘3t 3df’, ‘2000-03-12 00:00:00’, 34432340);
INSERT INTO `students` (`studentID`, `student_name`, `student_postal_address`, `student_dob`, `student_contact`) VALUES (3, ‘Roberta Tubbs’, ’23-dsf-3′, ‘2008-02-05 00:00:00’, 435440);
INSERT INTO `students` (`studentID`, `student_name`, `student_postal_address`, `student_dob`, `student_contact`) VALUES (4, ‘Dona Tubbs’, ‘df4 23’, ‘2009-12-12 00:00:00’, 5442340);
INSERT INTO `students` (`studentID`, `student_name`, `student_postal_address`, `student_dob`, `student_contact`) VALUES (5, ‘Rallo Tubbs’, ‘dfdf 32’, ‘2000-11-10 00:00:00’, 443240);
# 5 records
# Table structure for table ‘teaching_staff’
DROP TABLE IF EXISTS `teaching_staff`;
CREATE TABLE `teaching_staff` (
`staffID` INTEGER NOT NULL AUTO_INCREMENT,
`staff_name` VARCHAR(255),
`staff_family` VARCHAR(255),
`staff_dob` VARCHAR(255),
`staff_phone` VARCHAR(255),
`staff_address` VARCHAR(255),
`staff_degree` VARCHAR(255),
PRIMARY KEY (`staffID`)
) ENGINE=myisam DEFAULT CHARSET=utf8;
SET autocommit=1;#
# Dumping data for table ‘teaching_staff’
INSERT INTO `teaching_staff` (`staffID`, `staff_name`, `staff_family`, `staff_dob`, `staff_phone`, `staff_address`, `staff_degree`) VALUES (1, ‘Peter Griffin’, ‘The Griffins’, ’12/10/1985′, ‘34324565324’, ’34 dfr 4′, ‘Bachelors of Arts Music’);
INSERT INTO `teaching_staff` (`staffID`, `staff_name`, `staff_family`, `staff_dob`, `staff_phone`, `staff_address`, `staff_degree`) VALUES (2, ‘Lois Griffin’, ‘The Griffins’, ’10/07/1990′, ‘3246324124’, ’35tth boulervard’, ‘Bachelor of arts Music’);
INSERT INTO `teaching_staff` (`staffID`, `staff_name`, `staff_family`, `staff_dob`, `staff_phone`, `staff_address`, `staff_degree`) VALUES (3, ‘Stewie Griffin’, ‘The griffins’, ’03/12/1995′, ‘3245678644’, ‘1st Street 320A’, ‘Bachelor of Arts’);
INSERT INTO `teaching_staff` (`staffID`, `staff_name`, `staff_family`, `staff_dob`, `staff_phone`, `staff_address`, `staff_degree`) VALUES (4, ‘Meg Griffin’, ‘The griffins’, ’01/04/1993′, ‘3443234234’, ’20th street 340B’, ‘Bachelor of Arts Education’);
INSERT INTO `teaching_staff` (`staffID`, `staff_name`, `staff_family`, `staff_dob`, `staff_phone`, `staff_address`, `staff_degree`) VALUES (5, ‘Chris Griffin’, ‘The Griffins’, ’02/05/1996′, ‘3478973420’, ’19th Boulevard H12′, ‘Bachelor of arts Music’);