From mboxrd@z Thu Jan 1 00:00:00 1970
Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org)
by nuthatch.gentoo.org with esmtp (Exim 4.43)
id 1E7wXH-0000bn-Bk
for garchives@archives.gentoo.org; Wed, 24 Aug 2005 14:47:27 +0000
Received: from robin.gentoo.org (localhost [127.0.0.1])
by robin.gentoo.org (8.13.4/8.13.4) with SMTP id j7OEkC1D026435;
Wed, 24 Aug 2005 14:46:12 GMT
Received: from smtp.gentoo.org (smtp.gentoo.org [134.68.220.30])
by robin.gentoo.org (8.13.4/8.13.4) with ESMTP id j7OEkBtx018394
for
MySQL is a popular database server that is used in various applications. SQL
stands for (S)tandard (Q)uery (L)anguage, which is what MySQL uses to
-communicate with other programs. On top of that, MySQL has its own expanded
-SQL functions to provide additional functionality to users. In this document,
-we'll look at how to do the initial MySQL installation, setup databases and
-tables and create new users. Let's start out with the installation.
+communicate with other programs. On top of that, MySQL has its own expanded SQL
+functions to provide additional functionality to users. In this document, we'll
+look at how to do the initial MySQL installation, set up databases and tables,
+and create new users. Let's start out with the installation.
-We have logged in and have a mysql prompt displayed. First let's take a look at
+We have logged in and a mysql prompt is displayed. First let's take a look at
the databases we currently have. To do so, we use the
-Despite the fact that a test database is already created, we are going to create
-our own. Databases are created using the
@@ -218,12 +221,12 @@
-Indeed our database has been created. In order to work with creating tables
-for our new gentoo database, we need to select it as our current database.
-To do so, we use the
@@ -244,15 +247,15 @@Working With Tables In MySQL - Creating A Table +Creating a Table In the structure of MySQL, there are databases, tables, records, and fields. Databases hold together tables, tables hold together records, records hold together fields, which contain the actual information. This structure lets -users select how they want to access their information. So far we've dealt -with databases, now let's work with tables. First off, tables can be listed +users select how they want to access their information. So far we've dealt with +databases, now let's work with tables. First off, tables can be listed similiarly to databases using the
@@ -265,8 +268,8 @@SHOW TABLES command. Right now there are no tables in our gentoo database, as running the command will show us:This means we need to create some tables. In order to do so, we use the
CREATE TABLE command. However, this command is quite different from -simpleCREATE DATABASE command. This command takes a list of arguments -you must give it. The form is as follows: +simpleCREATE DATABASE command. This command takes a list of arguments. +The form is as follows:@@ -278,17 +281,17 @@ let's make a table nameddevelopers . This table will contain the developer's name, email and job. field_name will contain the name of the field. We have 3 required names in this case: name, email, and job. The -field_data_type is what type of information will be stored. The different -formats avaliable can be found at thefield_data_type is what type of information will be stored. The +different formats available can be found at the MySQL Column Types Page . For our purposes, we'll use theVARCHAR data type for all of -our fields.VARCHAR is one of the simplest of data types when it comes to -working with strings. size is how much of data a single field will store -of type field_data_type. In this case, we'll use 128 for our size. This -means that the field can haveVARCHAR data that is 128 bits. You can -safely think of this as 128 characters for the time being, though there is a -somewhat more technical explanation that the above site will provide you with. -Now that we know how we are going to create the table, let's do it. +our fields.VARCHAR is one of the simplest of data types when it comes +to working with strings. size is how much of data a single field will +store. In this case, we'll use 128. This means that the field can have +VARCHAR data that is 128 bytes. You can safely think of this as 128 +characters for the time being, though there is a somewhat more technical +explanation that the above site will provide you with. Now that we know how we +are going to create the table, let's do it.@@ -297,8 +300,8 @@-Looks like our table was created ok. Let's check it with the
SHOW -TABLES command: +Looks like our table was created ok. Let's check it with theSHOW TABLES +command:@@ -312,10 +315,10 @@-Yes, there's our table. However, it doesn't seem to have any information on -- gentoo-doc-cvs@gentoo.org mailing list