The text provided is a detailed set of instructions and queries for practicing SQL using PostgreSQL 9.4 BETA 2, focusing on creating and querying tables related to students, courses, scores, and teachers. Here’s a summary:
Database Structure The database consists of four tables:
STUDENT: Contains student number (SNO), name (SNAME), gender (SSEX), birthday (SBIRTHDAY), and class (CLASS). COURSE: Includes course number (CNO), name (CNAME), and teacher number (TNO). SCORE: Records student number (SNO), course number (CNO), and degree (DEGREE). TEACHER: Holds teacher number (TNO), name (TNAME), gender (TSEX), birthday (TBIRTHDAY), professional title (PROF), and department (DEPART). Sample Data Students such as Zeng Hua, Kang Ming, and Wang Fang are stored with specific details, including their class and gender. Courses like “Introduction to Computers” and “Operating Systems” are associated with teacher numbers. Scores are recorded for students across various courses. Teachers are described with their professional roles and departments. Query Problems Several SQL queries are suggested for practice, such as:
...