agree!
Student(name, Student_ID(primary key))
belongsto(Student_ID,Class_ID) primary key(Student_ID + Class_ID)
class(Class_ID(primary key),address)

解决方案 »

  1.   

    tab1-->学生信息(xuesheng_id,……)
    tab2-->班级信息(banji_id,……)
    tab3-->班级-学生关系表(banji_id,xuesheng_id)
      

  2.   

    sorry! miss something!
    Student(name, Student_ID(primary key))
    belongsto(Student_ID,Class_ID) 
    primary key(Student_ID + Class_ID)
    foreign key 1. Student_ID
                2. Class_ID
    class(Class_ID(primary key),address)
      

  3.   

    谢谢,同时在问一个问题,设置缺省值的语法函数是什么?
    和T-SQL是否一样?还是和外键约束一样,需要另外说明?
    请推荐一本有关的SQL语法书籍!
      

  4.   

    DEFAULT ...
    e-book,tell me if u want,ftp to u
      

  5.   

    哦,对了,Oracle9i中不支持Boolean数据类型了?
    在看Oracle 8 PL/SQL 时候,好像说支持布尔类型的嘛!
      

  6.   

    http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96540/sql_elements2a.htm#45443