Posts

Showing posts from October, 2021

Working with phpmyadmin tool

Image
Working with PhpMyAdmin in XAMPP What is PhpMyAdmin in PHP PhpMyAdmin is a GUI(Graphical User Interface) tool for MySQL Database. This is bundled with Xampp, no need to install separately. Why we Use it  Database management. Tables structure management     How to Open PhpMyAdmin First open XMPP control panel Start Apache server next Start the MySQL server and click on the admin button of MySQL server. Or you can open with the link: http://localhost/phpmyadmin/ Creating Databases Click on Databases Tab  In create database box, enter the name of the database and click create button         Creating Table Click on Database " usersdb". In the bottom in create table box, enter table name and number of columns and click on Go. In the next window provide all the field names, field datatype, field size and click on Save. Specifying Field names, Data Types and sizes For table register field details are as given below   id                INT(11) username VARCHAR(50) password VARCH

Learn SQL Queries Part2

Image
    Learn SQL Queries using  MySQL Database Part-2 ←Part-1 In a previous blog, we have gone through the introduction of RDBMS and SQL Language . This article lets you know how to work with databases using different types of  SQL Queries.  As  we discussed  earlier, SQL Queries are grouped into 3 categories. In this tutorial, we are going to learn each of them in detail.    Table of contents  DDL Queries   CREATE     ALTER   DROP  DML Queries   SELECT Statement    INSERT Statement   UPDATE Statement   DELETE Statement  DCL Queries   GRANT  REVOKE   1. DDL Queries   1. Creating command:  Used to create database and tables   CREATE Database < Database - name > CREATE Database SampleDB syntax:     CREATE TABLE < Table - name > ( col1 data_type (size), col2 data_type (size), col3 data_type (size) ); example:     CREATE TABLE employees ( empno int , empname varchar ( 50 ), dept varchar ( 50 ), salary int ); Executing Queries: To run the queries, use PhpMyAdmin Tool

Learn SQL Queries Part1

Image
  SQL Queries using MySQL Database Part-1 Part-2 Understanding an RDBMS Relational Database Management System(RDBMs), stores all information/data  in the form of Tables.   Understanding a Relational Database A single database can contain many tables, and they can be linked together. When the tables are linked together, it's said to be a relational database.   Understanding Tables, Records and Fields in RDBMS Table : Collection of rows and columns Row :  Collection of inter related columns. Field :  A piece of information of particular entity.   Table structure/design:  example: FieldName               D atatype Id                                  Number First_Name             Text Last_Name             Text Address                  Text Understanding Primary and Foreign Keys   Primary key: Identifies each record in table with unique id. example: account_no roll_no customer_no emp_no..etc Foriegnkey: A foreign key is a field (or fields) that points to the primary key of ano