Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to Web programming

Similar presentations


Presentation on theme: "Introduction to Web programming"— Presentation transcript:

1 Introduction to Web programming 0731213

2 Lecture 1 Working with Database – PhpMyAdmin (1)

3 What is MySQL? MySQL is one of the most widely used relational database management system (RDBMS) and most widely used open-source RDBMS MySQL is a database system used on the web MySQL is a database system that runs on a server MySQL is ideal for both small and large applications MySQL is very fast, reliable, and easy to use MySQL uses standard SQL MySQL compiles on a number of platforms MySQL is free to download and use MySQL is developed, distributed, and supported by Oracle Corporation MySQL is named after co-founder Monty Widenius's daughter: My

4 What is MySQL? The data in a MySQL database are stored in tables. A table is a collection of related data, and it consists of columns and rows. Databases are useful for storing information categorically. A company may have a database with the following tables: Employees Products Customers Orders

5 What is MySQL? MySQL GUI Tools
phpMyAdmin – Included in the LAMP stack, and MAMP, XAMPP and WAMP software bundle installers MySQL Workbench MYDB Studio Adminer Database Workbench DBEdit SQLyog HeidiSQL LibreOffice Base And more ….

6 What is PhpMyAdmin? PhpMyAdmin is one of the most popular applications for MySQL databases management. It is a free tool written in PHP. Through this software you can create, alter, drop, delete, import and export MySQL database tables. You can run MySQL queries, optimize, repair and check tables, change collation and execute other database management commands. We will use PhpMyAdmin to manage MySQL databases through it.

7 How to start with PhpMyAdmin
Click on the MySQL administrative link in the XAMPP Control Panel.

8 PhpMyAdmin Administration
Once you enter your PhpMyAdmin application, you will see different areas.

9 Databases In the Databases tab you will find a list with all the databases which can be managed through the cPanel user. Once you click on a chosen database, you can start its management.

10 Database Management The main functionality of the PhpMyAdmin tool is to manage your databases. Click on the Databases link. Pick the preferred database which you want to manage and click on its name.

11 Database Management In the new screen you will see a list with the database tables, the allowed actions with them, the number of the records, the storage engine, the collation, the tables' sizes and the overhead.

12 Lecture 2 Working with Database – PhpMyAdmin (2)

13 How to Create a MySQL Database?
You can easily create a new database from your cPanel->MySQL Databases. Navigate to the Create New Database box. Enter the database name in the New Database text field and click on the Create Database button.

14 How to Add MySQL Database Tables?
Navigate to your cPanel->PhpMyAdmin tool and open the newly create database. It is empty and there are no tables. Enter the table name and the number of fields. Click on the Go button to create the table.

15 How to Add MySQL Database Tables?
On the next screen you should enter the fields' names and the corresponding properties. Some of the properties are: Type: Pick the type of the data, which will be stored in the corresponding field Length/Values: Enter the length of the field Null: Define whether the field value can be NULL Default: Allows you to set the default value for the field.

16 How to Add MySQL Database Tables?
If you want to add more fields you should specify their number and click on the Go button instead of Save.

17 How to Add MySQL Database Tables?
The database table will be created and you will see the corresponding MySQL query.

18 Database Management The possible actions which you can perform to a chosen table are: Browse Structure Search Insert Empty Drop And more ….

19 Browse Only the tables with existing records can be browsed. Once you click on the Browse icon a new window with the records list will be opened. By clicking on the Pen icon you can edit the chosen record. You will see the record structure and you can alter the values of the records.

20 Structure The next option is named Structure. In the Structure screen you will see the database's table structure. You will see the fields' names, their types, collations, attributes, additional extra information, the default values and whether the fields' values can be NULL.

21 Insert Using the Insert action you can insert records in your database table. Once you fill in the corresponding values click on the Go button and the new record will be inserted.

22 How to Backup a Database?
In the Export section you can export your database tables content in different formats (CSV, SQL, PDF, Microsoft Excel, Microsoft Word, XML, and many more). You can select all the database tables or just pick some of them. You can decide whether to export just the database structure, the data or both of them.

23 How to Restore a Database Backup?
You can import your database tables from a file, saved on your local computer.

24 Self Study How to run MySQL query with PhpMyAdmin ( PhpMyAdmin Operations ( Repair and Optimize Database ( htm) Run MySQL Query (

25 References https://www.w3schools.com/
Robin Nixon, Learning PHP, MySQL, JavaScript, and CSS, 2013 Mike McGrath, PHP & My SQL in easy steps, 2012.

26 The End


Download ppt "Introduction to Web programming"

Similar presentations


Ads by Google