HOW TO CREAT A SIMPLE DATA BASE
Hi everyone welcome to my blog on how to creat a data base.
I will teach you on how to create simple data base . If its hard for you to undertand and learn in creating simple data based will i can help you for that by posting here in my blog.
Lets creat a data base , we usually need just a single data base for one project (one website).
In phpMyadmin, we will click the data based on the top.
In database we name items using just English alphabet in lowercase and we separate words with underscores .
This step has almost always been already done buy our web hosting provider and often get just one database named as our account (mywebsite) we have everything set up to learn the SQL.
THE SQL LANGUAGE
SQL reffers to Structured Query Language. Its a declarative language, while the imperative languages,we actually tell the computer what to do, step by step, in declarative language we just specify what result we need, and no longer interested in how the computer achieve this results. Thats why database quiries are simplified to something like “select 10 user orders by ranking”. The database understand such a query , convert it to some of ots own instructions , and then process it.
SQL was originally named SEQUEL (structured english query language) and was developed IBM’s laboratories to creat a simplified English language
To communicate the data base.
Creating database using the phpmyadmin’s interface resulted in SQL code being generated and executed. A new database has been created by it. The code looks like this:
You probably understand the CREATE DATABASE part. CHARACTER SET is a set of all the characters that a database can contain.
In SQL, we usually write commands in uppercase letter, because that way is better distinguished from the rest of the query or from our application code (example in PHP). We write table names, columns name and identifiers in lowercase.
EXECUTING SQL QUERIES
now, well creat a database once again,but instead of clicking it, we submit sql query to do it. In the top bar . Click on the SQL item, a window opens, were we can write SQL queries directly . We’ll insert our query to creat a database.
The next thing to do is we should write our database name in columns and we should choose how many columns . So our table eventually going to have 5 columns name it user.
Next is click GO so you may go to the next step
By this we’ve set the user id column us a primary key of the table .
VARCHAR type, we also define the number of characters. Finally we set user id’s the primary key of table.
And this is the SQL looks like.
HOPE YOU HAVE LEARNED SOME IDEAS IN MY BLOG. THANKYOU