1 00:00:14,730 --> 00:00:18,900 Hello and welcome to the golems programming language course. 2 00:00:24,000 --> 00:00:31,560 In this session, we want to create a database called person and then create a table inside it called 3 00:00:31,560 --> 00:00:40,290 A-student, which contains the fields of IED name and age, then connect go blank to my school database 4 00:00:40,290 --> 00:00:43,950 and be able to perform current operations through its. 5 00:00:46,820 --> 00:00:48,470 Creating a database. 6 00:00:51,280 --> 00:01:00,070 Before doing anything, we need to create a database so that we can install our tables in the Create 7 00:01:00,080 --> 00:01:04,570 database, that statement is used to create a new school database. 8 00:01:05,110 --> 00:01:07,480 Now you can see the syntax. 9 00:01:10,040 --> 00:01:16,580 It's time to go to my school database to do crack operations using different queries. 10 00:01:19,510 --> 00:01:26,920 Opened the MySchool database, click on my school connection and enter your passport. 11 00:01:33,610 --> 00:01:39,400 In the left side, the window in Navigator section, you can see the Eskimos database, for example, 12 00:01:39,430 --> 00:01:43,000 using my database like contact and my project. 13 00:01:44,110 --> 00:01:50,230 Now we go to define menu and select New Query tab for creating our queries. 14 00:01:50,800 --> 00:01:53,410 Find New Query Tap. 15 00:01:54,520 --> 00:01:58,900 First, we want to create a database which the name person. 16 00:01:59,200 --> 00:02:01,060 So we write query statement. 17 00:02:01,390 --> 00:02:07,360 Create database person. 18 00:02:10,390 --> 00:02:16,900 Now press conference in order to execute our query or press execute button for run query. 19 00:02:20,690 --> 00:02:24,860 In the Navigator panel, right click and select Refresh on. 20 00:02:27,810 --> 00:02:31,770 Then we will see the created database in the person name. 21 00:02:33,520 --> 00:02:37,810 Now we were able to create first query in the MySchool database. 22 00:02:39,320 --> 00:02:41,300 Go to his lines and continue. 23 00:02:47,940 --> 00:02:57,150 Create Table, a database table is a structure that organizes data into rows and columns forming agreed. 24 00:02:58,390 --> 00:03:05,920 Creating a basic table involves naming the table and defining its columns and its columns, data type 25 00:03:06,940 --> 00:03:12,130 tables are similar to evoke sheets in spreadsheet applications. 26 00:03:12,970 --> 00:03:17,890 The creative in a statement is used to create a new table in a database. 27 00:03:19,060 --> 00:03:21,340 Now you can see the syntax. 28 00:03:24,150 --> 00:03:24,980 Column name. 29 00:03:25,290 --> 00:03:28,500 Name of the party cooler, Colin, with any space. 30 00:03:30,240 --> 00:03:38,580 Column type, data, type of the column data type depends upon the data of the reference column data 31 00:03:38,580 --> 00:03:49,170 time can be cad vodka and float and etc. constraints in order to get restrictions to a particular column, 32 00:03:49,170 --> 00:03:50,700 countries are used. 33 00:03:51,060 --> 00:03:56,190 Countries can be not known primary key, foreign key and et cetera. 34 00:03:56,310 --> 00:04:00,960 These are the key laws which give set up restrictions to the particular column. 35 00:04:02,430 --> 00:04:05,790 Now go to MySchool database to create a new query. 36 00:04:07,500 --> 00:04:09,210 First, clear the last query. 37 00:04:11,580 --> 00:04:18,360 We want to create the table in person database with the name A-student, so people write the new query. 38 00:04:18,480 --> 00:04:23,310 Select database by the common use database name, so write clearly. 39 00:04:23,310 --> 00:04:27,780 Statement use person. 40 00:04:31,140 --> 00:04:32,730 And go to the next line. 41 00:04:34,910 --> 00:04:37,460 It's time to create a student table. 42 00:04:37,820 --> 00:04:46,730 We want this student table to contain I'd feel of type integer name filled by the variety and age feel 43 00:04:46,970 --> 00:04:48,260 of integer type. 44 00:04:48,620 --> 00:04:52,970 So we write query for create a student table by these attributes. 45 00:04:54,620 --> 00:04:57,650 Create Table. 46 00:04:59,950 --> 00:05:04,150 A student opened prances this. 47 00:05:08,060 --> 00:05:20,750 Field name, I.D. And it's time, is it I.D. in and visit the car's right name, not known, which indicates 48 00:05:20,750 --> 00:05:23,780 that this field cannot have an end to value? 49 00:05:24,620 --> 00:05:26,840 No, it's not. 50 00:05:28,530 --> 00:05:34,770 And auto increment, which indicates that if we don't enter the I devalue, the database will automatically 51 00:05:34,770 --> 00:05:37,140 generate its value sequentially. 52 00:05:38,640 --> 00:05:43,310 Auto increments, said Karma. 53 00:05:43,830 --> 00:05:51,290 Next, see here is the name attribute and its top is viajar and sit 50 characters for it. 54 00:05:53,150 --> 00:05:56,040 Name that chair 55 00:05:59,550 --> 00:06:00,770 and sit 15th. 56 00:06:04,260 --> 00:06:07,440 It represents the string and set. 57 00:06:07,440 --> 00:06:09,090 Not small constraints. 58 00:06:11,430 --> 00:06:11,930 Not. 59 00:06:14,540 --> 00:06:21,740 Said sitcom and Nick's food is age and its time is end. 60 00:06:23,090 --> 00:06:23,730 A. 61 00:06:26,730 --> 00:06:29,010 Paint and sit, come on. 62 00:06:31,860 --> 00:06:40,020 And finally, we defined the IED field as the primary key in the table by the primary key constraints. 63 00:06:40,230 --> 00:06:50,100 So we ride primary key and in open and close prone to this IED. 64 00:06:53,690 --> 00:06:57,710 And Close prompted this and said a semicolon. 65 00:06:59,540 --> 00:07:02,810 Now a press conference in order to execute our query. 66 00:07:05,640 --> 00:07:09,450 In the navigation panel, right click and select Refresh on. 67 00:07:12,830 --> 00:07:20,390 Then we select person database and go to Table Salt menu, and we can see the create table named student. 68 00:07:24,150 --> 00:07:30,480 So we could create a table named students in order not to prolong the time of decision. 69 00:07:30,660 --> 00:07:34,830 We will finish it and we will continue the content in the next session. 70 00:07:34,980 --> 00:07:35,520 Goodbye.