MY CODE >> Art Course Database
CREATE DATABASE ART_COURSE_DATABASE;

USE ART_COURSE_DATABASE;

CREATE TABLE CUSTOMER
    (
    CustomerNumber      Int         NOT NULL    AUTO_INCREMENT,
    CustomerLastName    Char(25)    NOT NULL,
    CustomerFirstName   Char(25)    NOT NULL,
    Phone               Char(12)    NULL,
    
    CONSTRAINT          DEPARTMENT_PK   PRIMARY KEY (CustomerNumber)
    );
    
CREATE TABLE COURSE 
    (
    CourseNumber        Int         NOT NULL    AUTO_INCREMENT,
    Course              Char(50)    NOT NULL,
    CourseDate          Date        NOT NULL,
    Fee                 Numeric(10,2) NOT NULL,
    
    CONSTRAINT          COURSE_PK   PRIMARY KEY (CourseNumber)
    );

CREATE TABLE ENROLLMENT
    (
    CustomerNumber      Int         NOT NULL,
    CourseNumber        Int         NOT NULL,
    AmountPaid          Numeric(10,2) NULL,
    
    CONSTRAINT          ENROLLMENT_PK   PRIMARY KEY (CustomerNumber, CourseNumber),
    CONSTRAINT          ENROLL_CUST_FK  FOREIGN KEY (CustomerNumber)
                        REFERENCES      CUSTOMER (CustomerNumber)
                        ON UPDATE RESTRICT
                        ON DELETE RESTRICT,
    CONSTRAINT          ENROLL_COUR_FK  FOREIGN KEY (CourseNumber)
                        REFERENCES      COURSE (CourseNumber)
                        ON UPDATE RESTRICT
                        ON DELETE CASCADE
    );
USE ART_COURSE_DATABASE;

# Insert into CUSTOMER table
INSERT INTO CUSTOMER (CustomerLastName, CustomerFirstName, Phone) VALUES
    ( 'Johnson', 'Ariel', '206-567-1234');

INSERT INTO CUSTOMER (CustomerLastName, CustomerFirstName, Phone) VALUES
    ( 'Green', 'Robin', '425-678-8765');
    
INSERT INTO CUSTOMER (CustomerLastName, CustomerFirstName, Phone) VALUES
    ( 'Jackson', 'Charles', '360-789-3456');

INSERT INTO CUSTOMER (CustomerLastName, CustomerFirstName, Phone) VALUES
    ( 'Pearson', 'Jeffrey', '206-567-2345');

INSERT INTO CUSTOMER (CustomerLastName, CustomerFirstName, Phone) VALUES
    ( 'Sears', 'Miguel', '360-789-4567');

INSERT INTO CUSTOMER (CustomerLastName, CustomerFirstName, Phone) VALUES
    ( 'Kyle', 'Leah', '425-678-7654');
    
INSERT INTO CUSTOMER (CustomerLastName, CustomerFirstName, Phone) VALUES
    ( 'Myers', 'Lynda', '360-789-5678');

# Insert into COURSE table
INSERT INTO COURSE (Course, CourseDate, Fee) VALUES
    ( 'Adv Pastels', '2011-10-01', 500.00);
    
INSERT INTO COURSE (Course, CourseDate, Fee) VALUES
    ( 'Beg Oils', '2011-09-15', 350.00);
    
INSERT INTO COURSE (Course, CourseDate, Fee) VALUES
    ( 'Int Pastels', '2011-03-15', 350.00);
    
INSERT INTO COURSE (Course, CourseDate, Fee) VALUES
    ( 'Beg Oils', '2011-10-15', 350.00);
    
INSERT INTO COURSE (Course, CourseDate, Fee) VALUES
    ( 'Adv Pastels', '2011-11-15', 500.00);

# Insert into ENROLLMENT table   
INSERT INTO ENROLLMENT (CustomerNumber, CourseNumber, AmountPaid) VALUES
    ( 1, 1, 250.00);
    
INSERT INTO ENROLLMENT (CustomerNumber, CourseNumber, AmountPaid) VALUES
    ( 1, 3, 350.00);
    
INSERT INTO ENROLLMENT (CustomerNumber, CourseNumber, AmountPaid) VALUES
    ( 2, 2, 350.00);
    
INSERT INTO ENROLLMENT (CustomerNumber, CourseNumber, AmountPaid) VALUES
    ( 3, 1, 500.00);
    
INSERT INTO ENROLLMENT (CustomerNumber, CourseNumber, AmountPaid) VALUES
    ( 4, 1, 500.00);
    
INSERT INTO ENROLLMENT (CustomerNumber, CourseNumber, AmountPaid) VALUES
    ( 5, 2, 350.00);
    
INSERT INTO ENROLLMENT (CustomerNumber, CourseNumber, AmountPaid) VALUES
    ( 6, 5, 250.00);
    
INSERT INTO ENROLLMENT (CustomerNumber, CourseNumber, AmountPaid) VALUES
    ( 7, 4, 0.00);
/* Query 1 */
SELECT CU.CustomerNumber, CustomerLastName, CustomerFirstName, 
        Phone, CO.CourseNumber, AmountPaid
FROM ENROLLMENT AS EN, CUSTOMER AS CU, COURSE AS CO
WHERE EN.CourseNumber = CO.CourseNumber
    AND
    EN.CustomerNumber = CU.CustomerNumber
ORDER BY CU.CustomerNumber, CU.CustomerLastName, CU.CustomerFirstName, 
            CU.Phone, CO.CourseNumber, EN.AmountPaid;
            
SELECT Course, CourseDate, CustomerLastName, CustomerFirstName,
            Phone, Fee, AmountPaid
FROM ENROLLMENT AS EN JOIN CUSTOMER AS CU
ON   EN.CustomerNumber = CU.CustomerNumber 
    JOIN COURSE AS CO
    ON  EN.CourseNumber = CO.CourseNumber
    
ORDER BY CU.CustomerLastName, CU.CustomerFirstName, CU.Phone, 
            CO.Course, CO.CourseDate, CO.Fee, EN.AmountPaid
/* Query 2 */
USE ART_COURSE_DATABASE;

ALTER TABLE ENROLLMENT
    ADD CONSTRAINT ENROLL_FEE
        CHECK (FullFeePaid = 'Yes' OR
               FullFeePaid = 'no');