Hello and welcome to the golems programming language course.
In this session, we want to create a database called person and then create a table inside it called
A-student, which contains the fields of IED name and age, then connect go blank to my school database
and be able to perform current operations through its.
Creating a database.
Before doing anything, we need to create a database so that we can install our tables in the Create
database, that statement is used to create a new school database.
Now you can see the syntax.
It's time to go to my school database to do crack operations using different queries.
Opened the MySchool database, click on my school connection and enter your passport.
In the left side, the window in Navigator section, you can see the Eskimos database, for example,
using my database like contact and my project.
Now we go to define menu and select New Query tab for creating our queries.
Find New Query Tap.
First, we want to create a database which the name person.
So we write query statement.
Create database person.
Now press conference in order to execute our query or press execute button for run query.
In the Navigator panel, right click and select Refresh on.
Then we will see the created database in the person name.
Now we were able to create first query in the MySchool database.
Go to his lines and continue.
Create Table, a database table is a structure that organizes data into rows and columns forming agreed.
Creating a basic table involves naming the table and defining its columns and its columns, data type
tables are similar to evoke sheets in spreadsheet applications.
The creative in a statement is used to create a new table in a database.
Now you can see the syntax.
Column name.
Name of the party cooler, Colin, with any space.
Column type, data, type of the column data type depends upon the data of the reference column data
time can be cad vodka and float and etc. constraints in order to get restrictions to a particular column,
countries are used.
Countries can be not known primary key, foreign key and et cetera.
These are the key laws which give set up restrictions to the particular column.
Now go to MySchool database to create a new query.
First, clear the last query.
We want to create the table in person database with the name A-student, so people write the new query.
Select database by the common use database name, so write clearly.
Statement use person.
And go to the next line.
It's time to create a student table.
We want this student table to contain I'd feel of type integer name filled by the variety and age feel
of integer type.
So we write query for create a student table by these attributes.
Create Table.
A student opened prances this.
Field name, I.D. And it's time, is it I.D. in and visit the car's right name, not known, which indicates
that this field cannot have an end to value?
No, it's not.
And auto increment, which indicates that if we don't enter the I devalue, the database will automatically
generate its value sequentially.
Auto increments, said Karma.
Next, see here is the name attribute and its top is viajar and sit 50 characters for it.
Name that chair
and sit 15th.
It represents the string and set.
Not small constraints.
Not.
Said sitcom and Nick's food is age and its time is end.
A.
Paint and sit, come on.
And finally, we defined the IED field as the primary key in the table by the primary key constraints.
So we ride primary key and in open and close prone to this IED.
And Close prompted this and said a semicolon.
Now a press conference in order to execute our query.
In the navigation panel, right click and select Refresh on.
Then we select person database and go to Table Salt menu, and we can see the create table named student.
So we could create a table named students in order not to prolong the time of decision.
We will finish it and we will continue the content in the next session.
Goodbye.