0% found this document useful (0 votes)
56 views8 pages

Lab 2

Lab Manual for the Subject of Database Management System

Uploaded by

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

Lab 2

Lab Manual for the Subject of Database Management System

Uploaded by

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

Lab # 2

Database management system


Fall 2021

Instructor

Student Name

CMSID

Department

Section
Introduction to Database system and
Lesson Set Tools for Database system and their Installation
2
Purpose 1. To get basic awareness of Database system
2. To understand MySQL workbench and why we are using it
3. To become familiar with the tools used for database and their installation
4. To learn the basics of an editor and compiler and be able to compile and
run sample query
5. To create new database and table from scratch

Procedure 1. Students should read the Pre-lab Reading assignment before coming to lab.
2. Students should complete the Pre-lab Writing assignment before coming to
lab.
3. In the lab, students should complete Labs 2.1 through 2.4 in sequence.
Your instructor will give further instructions as to grading and completion of
the lab.
4. Students should complete the set of lab tasks before the next lab and get
them checked by their lab instructor.

Contents Pre-requisites Completion Page


Time Number

Pre-lab Reading Assignment - 20 min 3

Pre-lab Writing Assignment Pre-lab Reading 10 min 5

Lab 2

Lab 2.1 Pre-lab reading 30 min 6


Installing MySQL for database

Lab 2.2 Awareness of - 8


Lab Tasks Syntax Rules

2|Page
PRE-LAB READING ASSIGNMENT

Database Systems

Database Systems or DBMS is software that caters to the collection of


electronic and digital records to extract useful information and store that
information is known as Database Systems/ Database Management Systems
or DBMS. The purpose of a standard database is to store and retrieve data.
Databases, such as Standard Relational Databases, are specifically designed
to store and process structured data.

Introduction to MySQL Database

MySQL is a fast, easy-to-use RDBMS being used for many small and big
businesses. MySQL is developed, marketed and supported by MySQL AB,
which is a Swedish company. MySQL is becoming so popular because of
many good reasons −
 MySQL is released under an open-source license. So you
have nothing to pay to use it.
 MySQL is a very powerful program in its own right. It handles
a large subset of the functionality of the most expensive and
powerful database packages.
 MySQL uses a standard form of the well-known SQL data
language.
 MySQL works on many operating systems and with many
languages including PHP, PERL, C, C++, JAVA, etc.
 MySQL works very quickly and works well even with large
data sets.
 MySQL is very friendly to PHP, the most appreciated
language for web development.
 MySQL supports large databases, up to 50 million rows or
more in a table. The default file size limit for a table is 4GB,
but you can increase this (if your operating system can handle
it) to a theoretical limit of 8 million terabytes (TB).
 MySQL is customizable. The open-source GPL license allows
programmers to modify the MySQL software to fit their own
specific environments.

Types of Database

Relational:
This database is based on the relational data model, which stores data in the
form of rows(tuple) and columns(attributes), and together forms a
table(relation). A relational database uses SQL for storing, manipulating, as
well as maintaining the data. E.F. Codd invented the database in 1970. Each
table in the database carries a key that makes the data unique from others.

NoSQL:
Non-SQL/Not Only SQL is a type of database that is used for storing a wide
range of data sets. It is not a relational database as it stores data not only in
tabular form but in several different ways. It came into existence when the
demand for building modern applications increased. Thus, NoSQL presented
a wide variety of database technologies in response to the demands.

3|Page
Advantage of MySQL  Cross platform
 Used with multiple languages (PHP, NodeJS, python, C#)
 MySQL software is open source
 MySQL is RDBMS
 The MySQL database server is fast, reliable, scalable and easy to
use
 MySQL sever works client/server or embedded system

Integrated
Environments

An integrated development environment (IDE) is a software package that


bundles an editor (used to write programs), a compiler (that translates
programs) and a run time component into one system. For example, the
figure below shows a screen from the Microsoft Visual C++ integrated
environment. Other systems may have this component separate which makes
the process of running a program a little more difficult. You should also be
aware of which Operating System you are using. An Operating System is
the most important software on your computer. It is the “grand master” of
programs that interfaces the computer with your requests. Your instructor will
explain your particular system and C++ environment so that you will be able
to develop, compile and run C++ programs on it.

4|Page
Pre lab writing assignment

Fill in the blanks 1. The purpose of a standard database is to ______________ data.


2. MySQL works on many _____________ and with many languages
including PHP, PERL, C, C++, JAVA, etc.
3. NoSQL is not a ______________ database
The database types are ____________________
4. RDBMS stand for ____________________________
5. A relational database uses ______________ for storing, manipulating,
as well as maintaining the data

5|Page
Lab 2

Lab 2.1
Installing MySQL for
database

Download the latest MySQL Community server from MySQL official


website. For me, it is 8.0.30, if the version differs you no problem the
installation steps will be the same.
 Double click the .exe file to start the installing process. Once the
installation process it will appear window like this and just select custom
option and then click next.

 Drag the MySQL Server, workbench and shell by selecting through the
drop-down list and then just click the forward arrow icon to move for the
installation. Click next=>next=>next

 Now it’s the time to download the selected options, just click the execute
button below to start downloading. This will take some time, Once all

6|Page
three products downloaded just click the next button to move to
the installation page.

 After the downloading process you will be directed to the next page just
click the execute button to install all three products.
 Once the above process done you just leave everything as default just click
next=>next=>next and so on.

Important: In the configuration page you need to setup password for the
root. By default, there is no password. You need to give password to your root.
The password should be 1234

7|Page
Lab 2.2 Lab Tasks

1. Write SQL statement to create database by your name.

2. Write SQL statement to create table by name courses. It should have two fields, course_id
and course_name. The course_id should be primary key.

3. Write SQL statement to add data into the courses table.

4. Write SQL statement to show all data where course_id is equal to the 3.

8|Page

You might also like