CAN'T CONNECT?

nodes and databases

about nodes and databases
The main building block
of Drupal is a node. The word 'node' might suggest it is a part of some
network. I think that is misleading. To begin with you can better think
of a node as a single post on a Drupal site by one of the users. You
can have a post in a forum, a blog or a book and many more. So a node
has a type. It also has a node ID, a title, a body, a creation date, an
author and some other properties. But it is stored together with all
other nodes in one big shoebox. The shoebox is what is called a table
in a database.

Drupal has many tables, I think the core has some 50 of them. You
may want to explore them on your own site to get a better idea.

Users have their own table too, and some of them are authors of
nodes. So nodes do have relations. The only way to find those relations
is by searching the whole table till you find all matching items.
Luckily the database server is very fast.

Each node can have an unlimited number of comments. Comments are
stored in a separate table. To find all comments on one node the server
will search the entire comments table.

Look at the adress bar of your browser. It probably says
"http://drupal.org/node/19828". This is the drupal way of saying "Load
all pertinent information for node 19828, including whatever relations
(comments, users etc.) are to be shown". This is called a database
query.

Most queries in Drupal are hard-coded in modules. /tracker searches all nodes and sorts the result by date. This also works for your site, as long as you enabled the tracker module.

When you hover over the menu and meanwhile read the links in the
statusbar you get a quick idea of possible queries. Because Drupal
mimics a directory structure you maybe didn't know it was a query until
now!

Drupal modules perform a lot of operation on the data. For instance
when you open a page which you have written yourself you see a
view/edit tab on top of the page. This tab is not shown on other pages.
This is automated behaviour defined by the user privilege settings.

Last updated by admin on 01/24/2007