0% found this document useful (0 votes)
4 views

SQL REPORT1

SQL

Uploaded by

Herbert gozie
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

SQL REPORT1

SQL

Uploaded by

Herbert gozie
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 13

A REPORT ON

DATABASE MANAGEMENT USING MySQL

BY

GROUP FIVE

DEPARTMENT OF ELECTRICAL AND ELECTRONIC


ENGINEERING

FEDERAL UNIVERSITY OF TECHNOLOGY,


OWERRI

FOR
FILE, DATABASE SYSTEMS AND MANAGEMENT

ECE 407

JULY, 2024
GROUP LEADER:

ASSISTANT GROUP LEADER:

MEMBERS:

NAMES REG. NO.


1. NWOSU NESOCHUKWU DANIEL 20201209183
2. OBIDIEGWU KOSISO COLLINS 20201220103
3. OCHULO CHUKWUEBUKA OBIOMA 20201200453
4. ODOH CHUKWUCHEBEM FRANCIS 20201240113
5. OFOBIKE MICHAEL CHUKWUEMEKA 20201206913
6. OFOMA UCHENNA LAWRENCE 20201231863
7. OGBENE HERBERT CHIGOZIE 20201215413
8. OGBONNAYA DANIEL OBINNA 20201238123
9. OHALEE-NKWOCHA CHIJIOKE CHARLES 20201203593
10. OKEKE DONALD CHISOM 20201208763
CHAPTER 1
INTRODUCTION TO DATABASE MANAGEMENT
SYSTEM
1.1 What is a database management system (DBMS)?
A database management system (DBMS) is a software system for creating and
managing data. A DBMS enables end users to create, protect, read, update and
delete data in a database. It also manages security, data integrity and concurrency
for databases.

DBMS essentially serves as an interface between databases and users or


application programs, ensuring that data is consistently organized and remains
easily accessible.

1.2 What does a DBMS do?

A DBMS manages the data. The database engine enables data to be accessed,
locked and modified and the database schema defines the database's logical
structure. These three foundational data elements help provide concurrency,
security, data integrity and uniform data administration procedures.

The following are common functions that a DBMS performs:

 Administration tasks. A DBMS supports many typical database


administration tasks, including change management, performance
monitoring and tuning, security, and backup and recovery. Most database
management systems are also responsible for automated rollbacks and
restarts as well as logging and auditing of activity in databases and the
applications that access them.

 Storage. A DBMS provides efficient data storage and retrieval by ensuring that
data is stored in tables, rows and columns.

 Concurrency control. In environments where multiple users access and


modify the database simultaneously, a DBMS guarantees controlled transaction
execution to prevent data corruption or inconsistency.

 Centralized view. A DBMS provides a centralized view of data that multiple


users can access from multiple locations in a controlled manner. A DBMS can
limit what data end users see and how they view the data, providing many
views of a single database schema. End users and software programs are free
from having to understand where the data is physically located or on what type
of storage medium it resides because the DBMS handles all requests.

 Data manipulation. A DBMS ensures data integrity and consistency by letting


users insert, update, delete and modify data inside a database.

 Data independence. A DBMS offers both logical and physical data


independence to protect users and applications from having to know where data
is stored or from being concerned about changes to the physical structure of
data. As long as programs use the application programming interface (API) for
the database that the DBMS provides, developers won't have to modify
programs just because changes have been made to the database.

 Backup and recovery. A DBMS facilitates backup and recovery options by


creating backup copies so that data can be restored to a consistent state. This
protects against data loss due to hardware failures, software errors or other
unforeseen events. In a relational database management system (RDBMS) --
the most widely used type of DBMS -- the API is structured query language
(SQL), a standard programming language for defining, protecting and accessing
data.

In a Database Management System (DBMS), a schema is a structured framework


that defines the organization and layout of the database. It specifies how data is
stored, organized, and related within the database. Essentially, a schema is a
blueprint for how the database is constructed and how it will be used.

Types of Schemas

1. Physical Schema:

- Definition: Describes the physical storage of data on hardware. It involves details


about the data files, indexes, and access methods.

- Focus: Storage efficiency, performance, and hardware specifics.

2. Logical Schema:

- Definition: Represents the abstract design of the database, focusing on the


logical structure rather than the physical details. It defines tables, columns,
relationships, and constraints.

- Focus: Data organization, relationships, and constraints without concern for


how it is physically stored.

3. View Schema (or External Schema):

- Definition: Defines how data is presented to users and applications. It includes


different views or perspectives of the database tailored to different user
requirements.
- Focus: User-specific views and access, providing data security and user
convenience.

CHAPTER 2

INTRODUCTION TO SQL
2.1 Brief Introduction to SQL

Structured Query Language (SQL) refers to a standard programming language


referred to as a database language that can execute activities on databases that
consist of tables made up of rows and columns.

SQL plays a crucial role in retrieving relevant data from databases, which can later
be used by transactions simultaneously where large volumes of data are written
concurrently.

SQL is an American National Standards Institute (ANSI) standard that operates via
multiple by relational databases such as My SQL, SQL Server, Oracle
PostgreSQL, and others.

Top companies owned by Meta Inc., such as Facebook, WhatsApp and Instagram
all rely on SQL for data processing and backend storage.
2.2 Installation

MySQL Workbench installed on my PC using MySQL community installer


software. The installation comprises of the setup of local SQL sever which will be
used to host the database, and for this a user will be created and assigned a
password. This is to achieve a level of database security, as it will only be possible
for only the selected user to have access to edit the contents of the database in the
selected server.

Fig 1: MySQL Server Configurator


Fig 2: MySQL Server Configuration Completed

After performing the following setup, we are now ready to use the software for
different purposes.

Fig 3: MySQL Workbench Workspace

2.3 Creating a New database


In the left navigation panel, locate the “SCHEMAS” tab.

Fig 4: Creation of Database in MySQL Using Schema

2.4 Creating a table


Expand the database when you want to create the table.

Define Table Properties:

At the top of the table editor, enter a meaningful name for your table (e.g., “EEE
407”) as shown in Fig 5.

For each column, specify:

Column Name: Give a descriptive name (e.g., “Student Name”).

Data Type: Choose the appropriate data type (e.g., INT, VARCHAR, DATE).

Constraints: Set any constraints (e.g., PRIMARY KEY, NOT NULL).


Fig 5: Creating a table in MySQL

Apply Changes:

Once you’ve defined all columns and properties, click the “Apply” button.

MySQL Workbench will generate the SQL script to create the table.

Review the script, and if everything looks correct, execute it to create the table in
your database as shown in Fig 6 & 7.
Fig 6: MySQL script for table creation

Fig 7: A table in MySQL Database


In a database, a table is a fundamental structure used to store data in a
structured format. It consists of rows and columns, where:

- Columns: Define the attributes or fields of the data. Each


column has a specific data type (such as integer, varchar,
date, etc.) and represents a particular characteristic of the
data.

- Rows: Represent individual records or entries in the table.


Each row contains a unique instance of data that corresponds
to the columns defined in the table.

For example, a table named ECE 407 GRP PROJECT has columns for
STUDENT NAME, REGISTRATION NUMBER, GENDER, SERIAL
NUMBER and HEIGHT, and each row would contain data for a specific
student, such as Nwosu Nesochukwu , 20201209183, M, 41 and 185 .

Tables are crucial for organizing and managing data efficiently within a
relational database system.
Conclusion
Throughout this project, we have demonstrated the process of
setting up a MySQL database, designing and normalizing tables,
and implementing them using MySQL Workbench.
By leveraging the graphical interface of MySQL Workbench,
we have simplified the complexities involved in database design
and management, making it accessible even to those with
minimal coding experience. The project has underscored the
crucial role that well-structured databases play in supporting the
data needs of modern applications, providing a robust
foundation for future development and scalability.

You might also like