In this lecture we will Create, Alter, Drop database tables using MySQL Workbench. I’ve opened MySQL Workbench and logged in in my MySQL database server using ‘root’ username and password. Create a new database by right clicking the ‘schemas’ area and selecting ‘Create Schema’ menu. In new schema window screen enter the new database name. In my case I’ll use “mytestdb” and use default collation. Click apply button, “apply” and finish. Under ‘schema’ menu, select the newly created database. in my case ‘mytestdb’, double click the database name, it will display the submenu under the database. The submenu contains, the tables, views, stored procedures and functions. At this moment we’ve just created the database so there are no tables or other information stored in it. Select ‘Tables’ submenu, right click on it and select ‘create table’ option, We can also click this ‘create new table’ icon to create a new table under the selected database. On the ‘new table’ screen, enter table name I’ll use “students”, use default collation and engine. Click inside the middle window and type column name. Lets create the students table here which we saw in practical examples. In column name, type ‘studentid’, data type INT, select this ‘PK’ checkbox to make the column ‘Primary Key’. Remember ‘Primary Key’ don’t store NULL values, so MySQL workbench will automatically check ‘NN’ means not null option. Select ‘UNIQUE’ checkbox to store only unique values. This ‘B’ checkbox is used to store only binary values that is the values containing only 1 or 0s. ‘UN’ checkbox means ‘Unsigned’ data type, this option is only used for number which store either positive or negative value. We will be storing all the positive values in our ‘studentid’ column, so we will select ‘unsinged’ option. ‘ZF’ means ‘Zero Fill’ the column with 0 vlaues. ‘AI’ option for ‘Auto Increment’. We are not going to manually enter each ‘studentid’, so we will let the system auto increment the ‘studentid’s and store the unique values by selecting the auto_increment option. This ‘G’ option is for ‘Generated Columns’ used for advanced use like expression caching, provide join index for non-relational data. etc. In the ‘default or expression’ option, we can store a default value for the data column. Enter second column name ‘firstname’, data type VARCHAR(20), ‘NN’ for not null, Enter another column name ‘lasttname’, data type VARCHAR(20), ‘NN’ for not null, Enter new column name ‘class’, data type VARCHAR(10), ‘NN’ for not null, and finally ‘age’ column which will be an unsigned INTEGER. Select INT and UN for unsigned. Click apply button to save the changes, it opens ‘SQL statement’ window, and click ‘apply’ button to execute the statement and finish to save the changes. Now under schemas menu, under the selected database, the ‘Tables’ link will contain the newly created table. We can select the table name to open the table details screen. On this screen, we can modify the table, we can select the table to open the table detail screen. We can modify the column name, data type and other table setting from here. To delete the table, simply select the table name, right click on it, and select ‘drop table’ option. Select ‘drop now’ option to instantly delete the table from the database.