// Information about non-null columns, keys in table descriptions MariaDB [sks]> describe instructor; +-----------+--------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-----------+--------------+------+-----+---------+-------+ | ID | varchar(5) | NO | PRI | NULL | | | name | varchar(20) | NO | | NULL | | | dept_name | varchar(20) | YES | MUL | NULL | | | salary | decimal(8,2) | YES | | NULL | | +-----------+--------------+------+-----+---------+-------+ 4 rows in set (0.004 sec) MariaDB [sks]> describe section; +--------------+--------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +--------------+--------------+------+-----+---------+-------+ | course_id | varchar(8) | NO | PRI | NULL | | | sec_id | varchar(8) | NO | PRI | NULL | | | semester | varchar(6) | NO | PRI | NULL | | | year | decimal(4,0) | NO | PRI | NULL | | | building | varchar(15) | YES | MUL | NULL | | | room_number | varchar(7) | YES | | NULL | | | time_slot_id | varchar(4) | YES | | NULL | | +--------------+--------------+------+-----+---------+-------+ 7 rows in set (0.001 sec) // MariaDB column names are case-insenstive. May not be true in general. MariaDB [sks]> select id from instructor; +-------+ | id | +-------+ | 76766 | | 10101 | | 45565 | | 83821 | | 98345 | | 12121 | | 76543 | | 32343 | | 58583 | | 15151 | | 22222 | | 33456 | +-------+ 12 rows in set (0.003 sec) // courses and student have common column dept_name (natural join example) MariaDB [sks]> describe course; +-----------+--------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-----------+--------------+------+-----+---------+-------+ | course_id | varchar(8) | NO | PRI | NULL | | | title | varchar(50) | YES | | NULL | | | dept_name | varchar(20) | YES | MUL | NULL | | | credits | decimal(2,0) | YES | | NULL | | +-----------+--------------+------+-----+---------+-------+ 4 rows in set (0.001 sec) MariaDB [sks]> describe student; +-----------+--------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-----------+--------------+------+-----+---------+-------+ | ID | varchar(5) | NO | PRI | NULL | | | name | varchar(20) | NO | | NULL | | | dept_name | varchar(20) | YES | MUL | NULL | | | tot_cred | decimal(3,0) | YES | | NULL | | +-----------+--------------+------+-----+---------+-------+ 4 rows in set (0.001 sec) // Creating views MariaDB [sks]> create view instructor_title as (select instructor.name, course.title from instructor, course natural join teaches); Query OK, 0 rows affected (0.006 sec) MariaDB [sks]> select * from instructor_title; +------------+----------------------------+ | name | title | +------------+----------------------------+ | Srinivasan | Intro. to Biology | | Srinivasan | Genetics | | Srinivasan | Intro. to Computer Science | | Srinivasan | Intro. to Computer Science | | Srinivasan | Game Design | | Srinivasan | Game Design | | Srinivasan | Robotics | | Srinivasan | Image Processing | | Srinivasan | Image Processing | | Srinivasan | Database System Concepts | | Srinivasan | Intro. to Digital Systems | | Srinivasan | Investment Banking | | Srinivasan | World History | | Srinivasan | Music Video Production | | Srinivasan | Physical Principles | | Wu | Intro. to Biology | | Wu | Genetics | | Wu | Intro. to Computer Science | | Wu | Intro. to Computer Science | | Wu | Game Design | | Wu | Game Design | | Wu | Robotics | | Wu | Image Processing | | Wu | Image Processing | | Wu | Database System Concepts | | Wu | Intro. to Digital Systems | | Wu | Investment Banking | | Wu | World History | | Wu | Music Video Production | | Wu | Physical Principles | | Mozart | Intro. to Biology | | Mozart | Genetics | | Mozart | Intro. to Computer Science | | Mozart | Intro. to Computer Science | | Mozart | Game Design | | Mozart | Game Design | | Mozart | Robotics | | Mozart | Image Processing | | Mozart | Image Processing | | Mozart | Database System Concepts | | Mozart | Intro. to Digital Systems | | Mozart | Investment Banking | | Mozart | World History | | Mozart | Music Video Production | | Mozart | Physical Principles | | Einstein | Intro. to Biology | | Einstein | Genetics | | Einstein | Intro. to Computer Science | | Einstein | Intro. to Computer Science | | Einstein | Game Design | | Einstein | Game Design | | Einstein | Robotics | | Einstein | Image Processing | | Einstein | Image Processing | | Einstein | Database System Concepts | | Einstein | Intro. to Digital Systems | | Einstein | Investment Banking | | Einstein | World History | | Einstein | Music Video Production | | Einstein | Physical Principles | | El Said | Intro. to Biology | | El Said | Genetics | | El Said | Intro. to Computer Science | | El Said | Intro. to Computer Science | | El Said | Game Design | | El Said | Game Design | | El Said | Robotics | | El Said | Image Processing | | El Said | Image Processing | | El Said | Database System Concepts | | El Said | Intro. to Digital Systems | | El Said | Investment Banking | | El Said | World History | | El Said | Music Video Production | | El Said | Physical Principles | | Gold | Intro. to Biology | | Gold | Genetics | | Gold | Intro. to Computer Science | | Gold | Intro. to Computer Science | | Gold | Game Design | | Gold | Game Design | | Gold | Robotics | | Gold | Image Processing | | Gold | Image Processing | | Gold | Database System Concepts | | Gold | Intro. to Digital Systems | | Gold | Investment Banking | | Gold | World History | | Gold | Music Video Production | | Gold | Physical Principles | | Katz | Intro. to Biology | | Katz | Genetics | | Katz | Intro. to Computer Science | | Katz | Intro. to Computer Science | | Katz | Game Design | | Katz | Game Design | | Katz | Robotics | | Katz | Image Processing | | Katz | Image Processing | | Katz | Database System Concepts | | Katz | Intro. to Digital Systems | | Katz | Investment Banking | | Katz | World History | | Katz | Music Video Production | | Katz | Physical Principles | | Califieri | Intro. to Biology | | Califieri | Genetics | | Califieri | Intro. to Computer Science | | Califieri | Intro. to Computer Science | | Califieri | Game Design | | Califieri | Game Design | | Califieri | Robotics | | Califieri | Image Processing | | Califieri | Image Processing | | Califieri | Database System Concepts | | Califieri | Intro. to Digital Systems | | Califieri | Investment Banking | | Califieri | World History | | Califieri | Music Video Production | | Califieri | Physical Principles | | Singh | Intro. to Biology | | Singh | Genetics | | Singh | Intro. to Computer Science | | Singh | Intro. to Computer Science | | Singh | Game Design | | Singh | Game Design | | Singh | Robotics | | Singh | Image Processing | | Singh | Image Processing | | Singh | Database System Concepts | | Singh | Intro. to Digital Systems | | Singh | Investment Banking | | Singh | World History | | Singh | Music Video Production | | Singh | Physical Principles | | Crick | Intro. to Biology | | Crick | Genetics | | Crick | Intro. to Computer Science | | Crick | Intro. to Computer Science | | Crick | Game Design | | Crick | Game Design | | Crick | Robotics | | Crick | Image Processing | | Crick | Image Processing | | Crick | Database System Concepts | | Crick | Intro. to Digital Systems | | Crick | Investment Banking | | Crick | World History | | Crick | Music Video Production | | Crick | Physical Principles | | Brandt | Intro. to Biology | | Brandt | Genetics | | Brandt | Intro. to Computer Science | | Brandt | Intro. to Computer Science | | Brandt | Game Design | | Brandt | Game Design | | Brandt | Robotics | | Brandt | Image Processing | | Brandt | Image Processing | | Brandt | Database System Concepts | | Brandt | Intro. to Digital Systems | | Brandt | Investment Banking | | Brandt | World History | | Brandt | Music Video Production | | Brandt | Physical Principles | | Kim | Intro. to Biology | | Kim | Genetics | | Kim | Intro. to Computer Science | | Kim | Intro. to Computer Science | | Kim | Game Design | | Kim | Game Design | | Kim | Robotics | | Kim | Image Processing | | Kim | Image Processing | | Kim | Database System Concepts | | Kim | Intro. to Digital Systems | | Kim | Investment Banking | | Kim | World History | | Kim | Music Video Production | | Kim | Physical Principles | +------------+----------------------------+ 180 rows in set (0.004 sec)