Skip to main content
edited tags
Link
Laxman13
  • 6.8k
  • 3
  • 30
  • 39
Post Migrated Here from stackoverflow.com (revisions)
Source Link

Connecting different content types/tables in Drupal with primary/foreign keys

I am using Drupal 7 and I want to create tables which have primary key and foreign keys using content types. Each table would be created using content types. Let's say, when I create Fruit content type, it should create a table for it, right? Then, I may have Price table, hence, I create a Price content type. Now, the Fruit id(primary key) should be connected with Fruit id in the Price table (content type). How's this possible? I don't know how to code the tables/content type schema.

Thanks for your help.