Skip to content
Snippets Groups Projects
Commit 1068e723 authored by Finlay White's avatar Finlay White :speech_balloon:
Browse files

badges added

parent 5eb357ac
No related branches found
No related tags found
No related merge requests found
DROP SCHEMA IF EXISTS `SuperGeeks`;
CREATE SCHEMA `SuperGeeks`;
USE `SuperGeeks`;
DROP TABLE IF EXISTS `Parents`;
CREATE TABLE `Parents`(
parentID int(20) not null,
primary key (parentID),
fname varchar(35),
lname varchar(35),
email varchar(320),
-- maximum size of an email address should be able to store absolutely all possible email addresses
-- unable to view payment info from any select functions it is also encrypted for customer safety
paymentinfo varchar(50),
subscribed bool,
phonenum int);
DROP TABLE IF EXISTS `Students`;
CREATE TABLE `Students`(
studentID int primary key,
fname varchar(35),
lname varchar(35),
-- The UK Government Data Standards Catalogue reccomends 35 characters for each the first name and last name
bday date,
dayjoined date ,
parentsID int(20),
FOREIGN KEY (parentsID) REFERENCES Parents(parentID)
-- parent ID is stored in student rather than the parents table so that one parent can have many children
-- and not one child can have many parents. A child may have multiple parents irl but they would share an
-- account
);
DROP TABLE IF EXISTS `Volunteers`;
CREATE TABLE `Volunteers`(
VolunteerID int(20),
primary key(VolunteerID),
fname varchar(35),
lname varchar(35),
hoursworked int(8),
DBSlastchecked date,
SGlastchecked date,
emergencycontact varchar(20)
);
DROP TABLE IF EXISTS `Session`;
CREATE TABLE `Session`(
sessionID int(20),
primary key (sessionID),
leaderID int(20),
location varchar(55),
duration int(10),
FOREIGN KEY (leaderID) REFERENCES Volunteers(VolunteerID),
maxAttendees int(10),
Nohelpers int(10));
DROP TABLE IF EXISTS `Badge`;
CREATE TABLE `Badge`(
BadgeID int(20),
badgeName varchar(35),
requirementID int(20)
);
DROP TABLE IF EXISTS `BadgeAwarded`;
CREATE TABLE `BadgeAwarded`(
studentID int(20),
awardedby int(20),
BadgeID int(20),
dateAwarded date
);
select * from Session;
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment