This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

complex table column type

 
sunny joshi
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Suppose I want to create 2 tables -- Department, Student

Student {
name,
id,
address
}

Department {
Dept_name,
Students[] student,
}

in which "department" table contains a group of "student".

How to do the "create table" statement for "department" ? Please help.
 
Mustafa Alauddien
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In your case it is prefarable to create the tables like :

Create table Dept(
Dept_id number,
Dept_name varchar2(20),
CONSTRAINT DEPT_DEPTID_PK PRIMARY KEY (DEPT_ID));

Create table Student(
stud_Id number,
Stud_Name Varchar2(50),
...
Dept_id Number,
CONSTRAINT STUDENT_STUDID_PK PRIMARY KEY (STUD_ID),
CONSTRAINT STUDENT_DEPTID_FK FOREIGN KEY (DEPT_ID)REFERENCES Dept(Dept_id)
);
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic