Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
linux_wiki:create_a_simple_database_schema [2016/09/11 00:05] billdozor created |
linux_wiki:create_a_simple_database_schema [2019/05/25 23:50] (current) |
||
---|---|---|---|
Line 4: | Line 4: | ||
Creating a simple database in MariaDB. | Creating a simple database in MariaDB. | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ====== Lab Setup ====== | ||
+ | |||
+ | The following virtual machines will be used: | ||
+ | * server2.example.com (192.168.1.151) -> Database here | ||
+ | |||
+ | **Previous Section Completed** | ||
+ | * [[linux_wiki: | ||
---- | ---- | ||
Line 63: | Line 73: | ||
Create a new table in the emails database | Create a new table in the emails database | ||
<code bash> | <code bash> | ||
- | MariaDB [emails]> | + | MariaDB [emails]> |
</ | </ | ||
* When you create a table, you must define the names of the columns and the type of data they should contain | * When you create a table, you must define the names of the columns and the type of data they should contain | ||
- | * userID INT -> Named userID and of type integer | + | |
- | * userFirstName char(25) -> Named userFirstName and of type characters up to 25 long | + | |
+ | * AUTO_INCREMENT -> Auto increment the entries in this column | ||
+ | * PRIMARY KEY -> The userid column is the primary sorting key | ||
+ | | ||
+ | * Table Options | ||
+ | * AUTO_INCREMENT = 100 -> Start userid at 100 | ||
\\ | \\ |