0% found this document useful (0 votes)
52 views5 pages

Lab Sheet 05

The document provides instructions for a MySQL database and tables practical. It outlines creating a "Students" database, using the database, creating tables to store student and department information, and inserting data into the tables. The goals are to gain experience with MySQL fundamentals like data types and working with databases and tables. Learners are guided through commands to create the database and tables and insert sample data.

Uploaded by

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

Lab Sheet 05

The document provides instructions for a MySQL database and tables practical. It outlines creating a "Students" database, using the database, creating tables to store student and department information, and inserting data into the tables. The goals are to gain experience with MySQL fundamentals like data types and working with databases and tables. Learners are guided through commands to create the database and tables and insert sample data.

Uploaded by

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

SEU/IS/18/ICT/005

Practical Recording.

Date: 13th August 2020.


Practical Number: 05.
Title: Introduction to MySQL databases and tables.
Aims:
• Getting knowledge with the fundamentals of MySQL and data types.
• Getting practice to work databases and tables in MySQL.
Task:
1. Creating a database.
2. Using a database.
3. Data types in MySQL.
4. Creating a table.
5. Describing tables.
6. Insert data into a table.

Exercise:
1. Create a database named “Students”.
• The CREATE TABLE statement is used to create a table in MYSQL.

Open my SQL console.



Type mysql>SHOW DATABASE;

Then type mysql> CREATE DATABASE Students;

Then your database will be created.

Page 1 of 5
SEU/IS/18/ICT/005

2. Use the database “Students”.


• USE command does not need a semi colon and must be given in a single line.

Type mysql> USE Students



Then your screen will be appeared like this.

de

3. Create the table Studentinfo in the database Students.

4. Describe your table to view the structure of your table.


Type mysql> desc Studentinfo;

Page 2 of 5
SEU/IS/18/ICT/005

5. Insert the following data into table Studentinfo.

6. Insert the following data into table Studentinfo.

7. Create a table Department in the same database as follows.

Page 3 of 5
SEU/IS/18/ICT/005

8. Describe your table to view the structure of your table.

9. Insert the following data into table Department.

10. Find out the available table in this database Student (Show tables).

Page 4 of 5
SEU/IS/18/ICT/005

Discussion:
• Getting practice to add database, add tables, and insert data to the table.
• Getting practice to use commands properly.

Page 5 of 5

You might also like