well dear buddies,

i am pretty new to drupal. Just set up a drupal commons

now i 'd like to add some data to my drupal, and i dont really understand the database model/scheme. Can somebody point me to some documentation? For example i need to understand the role of node, vocabulary, and all the tables and what is tid,vid,nid fieds... Then i could add data the sql way.

Of course I don't think complete documentation for Drupal's database schema exists. Well does any body have a very very first attempt:

An ongoing attempt with comments for Drupal 6 can be seen here http://drupal.org/node/79874

An analysis with SchemaSpy i found here http://webdevgeeks.com/schemaspy/index.html

and overview i have seen here. http://upsitesweb.com/sites/upsites.co/files/drupal7_model_0.png

well who can give more hints - i love to hear from you - Again: i want to have some overview on the options i have to extend the group (running on http://www.schulcenter.org - and see here http://schulcenter.org/?q=group/schulen )

How can i configure / extend the groups (/on the database-level)? How can i configure / extend the groups (/on the database-level)?

i wanna creat the following fields - (derived from the following shedule https://scraperwiki.com/scrapers/austrian-schools/ ) see the names of the collumns

  • name
  • adresse
  • schultyp
  • homepage
  • ergänzender schulname
  • beschreibung
  • schwerpunkte

can this be done best in groups !? Can i this set in the groups. Or should i do that in the so called - organic-groups

Note: as you see the site schulcenter.org should give an overview on schools with a certain amount of data from the profile: the adress, the website..

  • a little image (a thumbnail of the website - shown in a block,)
  • a little description (approx 200 characters) what the site /the school does - some special programmes or something like that...

How to achieve this !? Love to hear from you any and all help will greatly be appreciated

love to hear from you zero

3 Answers 3


Check Drupal's Schema API. Here is the link to it. Also the Book "Pro Drupal Development" has an excellent chapter on Working with Databases.You might find that one useful too.

  • hello dear aeozeppelein thx - i do so
    – zero
    Commented Jan 30, 2012 at 18:38

There are two answers to your question.

1) Open up a drupal installation in a file browser. Go to drupal/modules/node. The core node module does two things: a) It implements an entity under the entity API (not to be confused with the Entity API contrib module), and it creates the Node API. Most people trying to create content types in code will use the Node API. Adventurous people will use the Entity API.

So... Look at /drupal/modules/node/node.install. This file implements hook_schema(), which shows an abstracted version of the DB schema used by node, helpfully documented (to some degree anyway). If you want to hack around with nodes in SQL, then this is a good place to start learning the system.

2) Disregard answer #1. Use the Node APIs and Field APIs to manipulate Drupal data. This gives you the benefit of everyone's eyes on bugs, and not needing to update your code (as much) for future updates and upgrades. Poke around node_example, nodeapi_example, and field_example in the Examples project. This gives you good code to emulate/copy/paste.


  • hello dear Paul_m - many many thanks for the great hints and the input. Your help is greatly apprecated - the idea to benefit of everyones eye on bugs is great - i will digg into it and come back and report all my findings - greetings zero
    – zero
    Commented Jan 30, 2012 at 19:26

My favorite resource on Drupal's schema is Padraig O'Sullivan's Digging into Drupal's Schema:


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.