This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes if table has reference ,then could i put refered table with refering table seperately Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "if table has reference ,then could i put refered table with refering table seperately" Watch "if table has reference ,then could i put refered table with refering table seperately" New topic
Author

if table has reference ,then could i put refered table with refering table seperately

walter wang
Ranch Hand

Joined: Jun 02, 2001
Posts: 150
Dear All
Questions is from here
One Table called product is refering to another
table called Category by foregin key catId.
I think this kind of reference is just a logical
binding. so althoug there is relation ship between
them, but i could put them seperately, even on different machine.
but sql file for creating Product table has
one sentence (references category (catid))
if i dont build category table, will i not be able
to create product table?
or if i remove this sql sentence(references category (catid)) to create Product table
will it cause problem for this reference between
product table and category table ?
create table product (
productid char(10) not null,
category char(10) not null,
name varchar(80) null,
image varchar(255) null,
descn varchar(255) null,
constraint pk_product primary key (productid),
constraint fk_product_1 foreign key (category)
references category (catid)
)


public class Walter { public boolean is_Working_Now (boolean is_boss_Coming) { return is_boss_Coming; }
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: if table has reference ,then could i put refered table with refering table seperately
 
Similar Threads
Hibernate is driving me crazy !
Restore problem
Pet Store in UML
Glassfish + jdbcrealm
Couldn't persist OneToMany JoinColumn/JoinTable (Unidir) using TopLink JPA