Sie sind auf Seite 1von 4

COMSATS Institute of Information Technology

Department of Computing

CSC271: Database Systems

Lab 01: MySQL and Workbench Environment

Instructor: Dr. Khalid Latif

CSC271: Database Systems Page 1




Introduction
Data is a collection of raw facts and figures, processed to obtain useful information to assist
organization in making decisions. Database is an organized collection of related data. In order to
manage the databases, Database Management Systems (DBMS) or Database Systems offer sets of
program and tools.

Objectives
After performing this lab students should be able to:

1. Load or unload a database in MySQL through MySQL Workbench


2. Explore structure of tables in a database
3. Retrieve data from the tables
4. Change existing data in the database tables

Tools/Software Requirement
MySQL Community Server 5.6
MySQL Workbench 6.1
Sakila Database

Description

1. MySQL Workbench is a unified visual tool for database architects, developers, and
DBAs alike. Both MySQL Community Server and Workbench are already installed on
your workstation. If they are not, download and installed the latest version from the
MySQL Website. MySQL Server usually runs as a service on port 3306 and it starts
automatically. If it is not running, you should manually start it first. Afterwards open the
Workbench. Its landing window
appears as follows.

2. When Workbench first starts, it


presents the Home window,
which lists saved connections to
MySQL Server. See the
highlighted area in the snapshot.
Connections help to manage
and connect with MySQL
Server that actually runs the
database. At any time you may
add a new connection by
selecting the (+) icon.
3. Select an appropriate connection from the list. This opens a database management
window as shown bellow.

CSC271: Database Systems Page 2




4. Expand the Sakila database from the left side of the Workbench window. Among the
listed categories, expand Tables. You will see list of tables in Sakila database.
5. Right click on any table of your choice (e.g. Actors) and select Table Inspector. It
opens a new tab showing the schema, attribute names and other metadata.
6. Afterwards right click on the same table and now select Select Rows. It will open
another tab for navigating through the contents of the database table.
7. The data view supports many different options such as sorting on a column by selecting
its header, searching contents, deleting a row, adding another, or exporting the contents to
an external file. You can play with these options.
8. Dont forget to check the log pan below the query tab. It mentions all errors, warnings,
and messages.

Lab Task
1. Reload the Sakila database ONLY if you have made any changes.
2. Answer questions from the quiz. These questions assume Sakila database hasnt changed.

CSC271: Database Systems Page 3




Deliverable
There is no deliverable for this lab. You only have to attempt a quiz designed around the lab task.

CSC271: Database Systems Page 4

Das könnte Ihnen auch gefallen