0% found this document useful (0 votes)
6 views1 page

PHP Tables

Uploaded by

gichobiraylee
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views1 page

PHP Tables

Uploaded by

gichobiraylee
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

-- Create Lecturer Table

CREATE TABLE Lecturer (

lecturer_id INT PRIMARY KEY AUTO_INCREMENT,

lecturer_name VARCHAR(100) NOT NULL,

lecturer_email VARCHAR(100) UNIQUE NOT NULL

);

-- Create Course Table

CREATE TABLE Course (

course_id INT PRIMARY KEY AUTO_INCREMENT,

course_name VARCHAR(100) NOT NULL,

course_code VARCHAR(50) UNIQUE NOT NULL,

lecturer_id INT,

FOREIGN KEY (lecturer_id) REFERENCES Lecturer(lecturer_id) ON DELETE SET NULL

);

-- Create Assignment Table

CREATE TABLE Assignment (

assignment_id INT PRIMARY KEY AUTO_INCREMENT,

assignment_title VARCHAR(100) NOT NULL,

assignment_description TEXT,

due_date DATE,

course_id INT,

FOREIGN KEY (course_id) REFERENCES Course(course_id) ON DELETE CASCADE

);

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy