Page 79 - Computer Software Application TP - Volume 1
P. 79

COMPUTER SOFTWARE APPLICATION - CITS




           EXERCISE 21 : Designing of Tables


            Objectives

            At the end of this exercise you shall be able to
           •  connect the MySQL database server
           •  create database and table
           •  perform insert,select,delete queries

           Requirements

           Tools/Materials
           •   Operating System: Windows 10 or 11 (64-bit)
           •   MySQL Setup Software
           •  Desktop/Laptop will latest configuration

           Procedure

           TASK 1 : Creating Table, Insert values and retrieve data from that table
           Step 1: Open MySQL Command Line:

           Go to the Start menu, find MySQL, and open the MySQL Command Line client.
           Step 2: Login to MySQL Server:
           Enter the following command and press Enter. Replace username with your MySQL username, and you’ll be
           prompted to enter your password.

           mysql -u username –p

























           Step 3: Create a Database:
           If you haven’t created a database yet, create one using the following command. Replace yourdatabase with the
           desired name for your database.
           CREATE DATABASE employeedb;











                                                           64
   74   75   76   77   78   79   80   81   82   83   84