0% found this document useful (0 votes)
100 views6 pages

Lab # 12 Server Site Scripting On MY SQL

This document discusses setting up a MySQL database to store login information. It begins with introducing databases and MySQL. Then it explains creating a database called "webapp" in XAMPP, and designing a table with fields for login ID, username, and password. The last part demonstrates inserting records into this table. The overall aim is to understand databases, MySQL, and how to design and populate a table to store login data.

Uploaded by

ghazi members
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)
100 views6 pages

Lab # 12 Server Site Scripting On MY SQL

This document discusses setting up a MySQL database to store login information. It begins with introducing databases and MySQL. Then it explains creating a database called "webapp" in XAMPP, and designing a table with fields for login ID, username, and password. The last part demonstrates inserting records into this table. The overall aim is to understand databases, MySQL, and how to design and populate a table to store login data.

Uploaded by

ghazi members
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/ 6

Lab #12: Server Site Scripting on MY SQL SSUET/QR/114

Lab # 12
Server Site Scripting on MY SQL

Web Development Server Side, Backend Database, MySQL, Database


Creation

Objective:
1. To understand the concept of Database and to get to know about MySQL.
2. To study the relational logical structure and to get an idea of Design and Data Entry
Mode.
3. To design a Database in XAMPP (MySQL) and insert a table that holds fields and records
of Login information.

Theory:
This lab is mainly concerned with the learning of the concept of Database and to get aware of the
Database of XAMPP i.e. MySQL. This lab also deals with the knowledge of relational logical
structure and different modes of backend database. In this lab we will also design a database using
MySQL.

Objective #1:
To understand the concept of Database and to get to know about MySQL.

Database:
Database is regarded as software which is used to store certain kind of information. It follows a
Relational Structure for Data Information Storage. Often abbreviated as DB. Database can be defined
as a collection of information organized in such a way that a computer program can quickly select
desired pieces of data. For e.g. electronic billing system.

Traditional databases are organized by fields, records, and files.

Field: A field is a single piece of information.

Record: A record is one complete set of fields.

File: A file is a collection of records.


SE104 ITSE
Lab #12: Server Site Scripting on MY SQL SSUET/QR/114

Database Management System:

To access information from a database, you need a database management system (DBMS). This is a
collection of programs that enables you to enter, organize, and select data in a database.

Increasingly, the term database is used as shorthand for database management system.

MySQL:
MySQL is the database of XAMPP. Specialized database software, like MySQL, are just programs
that lets you store and retrieve the data as efficiently as possible. MySQL is the most popular
database system used with PHP. MySQL is a database system used on the web and it runs on a
server as well. It is ideal for both small and large applications as it is very fast, reliable, and easy to
use. MySQL supports standard SQL. MySQL compiles on a number of platforms and is free to
download and use. MySQL is developed, distributed, and supported by Oracle Corporation. The data
in MySQL is stored in tables. A table is a collection of related data, and it consists of columns and
rows. Databases are useful when storing information categorically.

Why MySQL:

One great thing about MySQL is that it can be scaled down to support embedded database
applications. Maybe it is because of this many people think that MySQL can only handle small and
medium-sized systems. The truth is that MySQL is the de-facto standard database system for web
sites with HUGE volumes of both data and end users (like Friendster, Yahoo, and Google). PHP
combined with MySQL are cross-platform (you can develop in Windows and serve on a Unix
platform)

Objective #2:
To study the relational logical structure and to get an idea of Design and Data Entry Mode. Since
Databases follow relational structure. A relational structure can be represented by a cylinder:

SE104 ITSE
Lab #12: Server Site Scripting on MY SQL SSUET/QR/114

Relational Logical Structure:

STUDENT1 STUDENT2 STUDENT3

LOGIN EXTRA
ACADEMICS CURRICULAR
INFO
ACTIVITIES

A user can create his database and can make amendments in it. After creating a database, the user can
insert tables for different types of data or information as shown in the above picture. The most
important point in making a database is to avoid redundancy i.e. to avoid multiple existence of same
information that can cause inconsistency. The databases nowadays have the facility to control
redundancy and the software that help in the creation of a database also facilitate the user by
providing direct control over redundancy.

Example of Design Mode:

Database Name: webapp


Table Name: login_info

FIELD 1 FIELD 2 FIELD 3

Login_id uname pwd


Type: INT Type: VARCHAR Type: VARCHAR
Length: 20 Length: 50 Length: 50
Constraint: Primary Key Constraint: Not NULL Unique Constraint: Not NULL
Extras: Auto Increment

Note: Primary Key is inherited with the properties of Not NULL and Unique.

SE104 ITSE
Lab #12: Server Site Scripting on MY SQL SSUET/QR/114

Example Of Data Entry Mode:

login_id uname pwd


1 bushra 1234
2 farah 123

In the table

Columns are regarded as Fields and


Rows are regarded as Records.

Objective #3:
To design a Database in XAMPP (MySQL) and insert a table that holds fields and
records of Login information.

STEPS:

1. Open your browser and type localhost /xampp


Xampp window will appear

SE104 ITSE
Lab #12: Server Site Scripting on MY SQL SSUET/QR/114

2. Now click on phpMyAdmin in Tools on the very left of the page

3. This will open a new window of php MyAdmin for creating a database

4.

Click on Databases to create a database

5. Create a database with name WEBAPP. Now click on webapp from the left of the page

SE104 ITSE
Lab #12: Server Site Scripting on MY SQL SSUET/QR/114

6. This will take you to “Create table” asking for the name of your table a number of
columns. Write the name of table and the number of columns and click on Go.

7.

Fill the fields and click on Save.

Inserting Rows in Table

1. Insert record in the table using the option of Insert from the top menu

2. This will open a new page for filling records in the specified fields. Fill up the fields
and click on Go.

3. Now click on Browse on the top menu to see the output

Conclusion:
 In this lab, we learnt the concept of databases
 Understand the use of MySQL and studied the Relational Logical Structure and the
two modes of structure that are Design Mode and Data Entry Mode
 Learnt to Design a database
 Learnt to insert Fields and Records in Table in the Database

SE104 ITSE

You might also like