DROP DATABASE IF EXISTS Activity3_2;

CREATE DATABASE IF NOT EXISTS Activity3_2;
USE Activity3_2;

CREATE TABLE Employee_Table (
 	Employee_Id INT PRIMARY KEY,
 	Dept_Code ENUM("A","B","C"),
 	FName CHAR(50),
 	LName CHAR(50),
	INDEX employfname (FName)
) ENGINE= MyIsam;

CREATE TABLE Dependant_Table (
	emp_Id INT PRIMARY KEY,
	Depend_FName CHAR(30),
	Depend_LName CHAR(30)
) ENGINE= MyIsam;

CREATE TABLE Manager_Table (
 	Manager_Id INT PRIMARY KEY AUTO_INCREMENT,
   	Manager_Name CHAR(50)
) ENGINE= MyIsam;

CREATE TABLE Department_Table (
	Dept_Id INT PRIMARY KEY AUTO_INCREMENT,
  	Dept_Code ENUM("A","B","C"),
  	Dept_Name CHAR(50),
  	Dept_Sector ENUM("7G","8G")
) ENGINE= MyIsam;


########################################
##TYPE YOUR ALTER TABLE STATEMENTS BELOW: ##

######### Manager Table changes: ###########
## 1. Add a column called 'Last Name':


## 2. Change the name of the Manager Name column to 'First Name':  


## 3. Add a timestamp column called 'lastupdate' after the Manager Id column:


## 4. Add an index that uses the Last Name column:


## 5. Change the name of the table to 'Managers':


## 6. Change table type to InnoDB:


######### Employee Table changes: ###########

## 7. Remove the index status from the Fname column: 


## 8. Remove the primary key status from the Employee_Id column:


## 9. Change table type to InnoDB:


######### Dependant Table changes: ###########
## 10. Delete the table: 


######### Department Table changes: ###########

## 11. Delete the primary key column:


## 12. In one statement, make the Dept Code column be the last column in the table, and make it the Primary Key with a numeric datatype: 


## 13. Change the Dept Sector column to only allow the values 'First Floor' and 'Second Floor':


## 14. Change the name of the table to Depts:


## 15. Switch the placement of Dept_Name and Dept_Sector columns:


## 16. Rename the Dept Code column to D_Code with auto_increment:


#########DISPLAYS###########
## Display the table status:
## Then show a simple list of all tables:
## Then show the column information for each table:
## Then show indexes for each table:

