Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <! CREATION TABLE LANGUAGE !>
- mysql> CREATE TABLE language(
- -> id INT PRIMARY KEY NOT NULL AUTO_INCREMENT,
- -> french BIT(1) NULL DEFAULT 1,
- -> deutsch BIT(1) NULL DEFAULT 0,
- -> english BIT(1) NULL DEFAULT 0);
- Query OK, 0 rows affected (0.06 sec)
- +---------+--------+------+-----+---------+----------------+
- | Field | Type | Null | Key | Default | Extra |
- +---------+--------+------+-----+---------+----------------+
- | id | int | NO | PRI | NULL | auto_increment |
- | french | bit(1) | YES | | b'1' | |
- | deutsch | bit(1) | YES | | b'0' | |
- | english | bit(1) | YES | | b'0' | |
- +---------+--------+------+-----+---------+----------------+
- 4 rows in set (0.00 sec)
- [============================================================]
- <! CREATION TABLE pages !>
- mysql> CREATE TABLE pages(
- -> id INT PRIMARY KEY NOT NULL AUTO_INCREMENT,
- -> name_pages VARCHAR(50) NULL DEFAULT NULL,
- -> fk_sections INT NOT NULL);
- Query OK, 0 rows affected (0.07 sec)
- mysql> DESCRIBE pages;
- +-------------+-------------+------+-----+---------+----------------+
- | Field | Type | Null | Key | Default | Extra |
- +-------------+-------------+------+-----+---------+----------------+
- | id | int | NO | PRI | NULL | auto_increment |
- | name_pages | varchar(50) | YES | | NULL | |
- | fk_sections | int | NO | | NULL | |
- +-------------+-------------+------+-----+---------+----------------+
- 3 rows in set (0.00 sec)
- [============================================================]
- <! CREATION TABLE sections !>
- mysql> CREATE TABLE sections (
- -> id INT PRIMARY KEY NOT NULL AUTO_INCREMENT,
- -> name_sections VARCHAR(50) NULL DEFAULT NULL);
- Query OK, 0 rows affected (0.06 sec)
- mysql> DESCRIBE sections;
- +---------------+-------------+------+-----+---------+----------------+
- | Field | Type | Null | Key | Default | Extra |
- +---------------+-------------+------+-----+---------+----------------+
- | id | int | NO | PRI | NULL | auto_increment |
- | name_sections | varchar(50) | YES | | NULL | |
- +---------------+-------------+------+-----+---------+----------------+
- 2 rows in set (0.00 sec)
- mysql>
- [============================================================]
- <! CREATION TABLE JONCTION pages_sections !>
- mysql> CREATE TABLE pages_sections(
- -> id INT PRIMARY KEY NOT NULL AUTO_INCREMENT,
- -> pages_id INT NOT NULL,
- -> sections_id INT NOT NULL);
- Query OK, 0 rows affected (0.04 sec)
- mysql> DESCRIBE pages_sections;
- +-------------+------+------+-----+---------+----------------+
- | Field | Type | Null | Key | Default | Extra |
- +-------------+------+------+-----+---------+----------------+
- | id | int | NO | PRI | NULL | auto_increment |
- | pages_id | int | NO | | NULL | |
- | sections_id | int | NO | | NULL | |
- +-------------+------+------+-----+---------+----------------+
- 3 rows in set (0.00 sec)
- mysql>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement