I'm evaluating drupal, and I have been surprised to find it so linear and clean.
I'd like to use it for my next work, but this work requires a lot of data in different related tables.
To hold this data I had a look on flexinodes and it seems to be a very easy (and integrated) solution but ... I can't immagine 100.000 records of 25 fiedls each stored on flexinode tables (and the related tables as well, and a "join like" query on this structure).
On the other hand the simple add of my tables to the drupal db, would be easy, but not integrated (e.g. with taxonomy).
Maybe it's too a general question, but: what are the best (or most used) options to answer to this need to integrate an external data structure to drupal structure?

Comments

brick’s picture

but it seems that the flexinode solution is no longer everyone's favorite. at http://drupal.org/node/17302 there's a discussion of alternate structures which dates from february. i am also in the position of adapting complex content to a drupal system, and my impression is that we have to use flexinodes until this "CCK" effort is finished. there's quite a lot on it at http://jonbob.drupaldevs.org/cck but this site is down at the moment so i had to read it out of the google cache.

best,
aaron.

styro’s picture

I don't have any solutions for you, but maybe if you describe what the data is representing and how you'd like it to work, we might have some better ideas about how to integrate it all :)

kbahey’s picture

If you are a PHP programmer, you can create a new module that implements a new node type for the data you want.

You need to create a table (or tables) to hold the extra data for you.

This will have less overhead than flexinode, since there is no indirection (looking up field names, types, ...etc.).

This new node type will have as much features from base Drupal as you want it to have (author, taxonomy, comments, publishing options, ...etc.)

I have created modules that do similar things before, and it is a bit hard at first, but certainly doable.

--
Drupal development and customization: 2bits.com
Personal: Baheyeldin.com

--
Drupal performance tuning and optimization, hosting, development, and consulting: 2bits.com, Inc. and Twitter at: @2bits
Personal blog: Ba

brick’s picture

thanks for that observation, khalid. that does seem a convenient way to get around some of flexinode's limitations with a more ad-hoc solution. i also thought of exploiting the taxonomic namespace with all the attributes but that seems more than a little messy.

i do wish someone would chime in with news or more pointers on the above efforts at reform. but i am already somewhat resigned to doing it one way now, and again later.

thanks folks,
aaron.

kbahey’s picture

CCK will not be in 4.7. So don't count on it to be in a stable release for at least 4-6 months, possibly more.

To see how to create a node, look at the two node types in Job Search as well as the basic event module.

All you need is to populate your own tables with your own data, and delete on delete, update on update, ..etc.

--
Drupal development and customization: 2bits.com
Personal: Baheyeldin.com

--
Drupal performance tuning and optimization, hosting, development, and consulting: 2bits.com, Inc. and Twitter at: @2bits
Personal blog: Ba

Anonymous’s picture

This may or may not work that well, depending on what you want... The problem lies in the fact that for your data in your own tables to get the default drupal node functionality, you need a corresponding entry in the node table for each row. So you'd have to create all of those with a title and node id... This doesn't work great if you have say 100,000 existing rows of data...

What I do is to create a new module and just use custom pages for everything. The module developer's handbook addresses this. This makes for a little bit more work, but not a lot more. The biggest downside is that you lose out on some of the drupal functionality, for example you can't create taxonomy (ok you probably can but it's not automatic like nodes), you have to manage your own access control, etc. You'll probably run into some gotchas.

On the plus side, this gives you added flexibility in creating each page exactly how you want. I've done this for a module that gets all of it's data for LDAP, basically a company wide people database on the web. Obviously since everything is in ldap, no nodes are used. You just have to set up your menus so that paths call your custom page generation functions, and then roll it all yourself. Make sure to scour the API's though, the functions for form generation/validation, form errors, db queries, etc are still very useful.

sghi’s picture

Thanks for the comments to my post.
Since I've already checked the flexynode option, and can't wait for CCK, i'll try to use separate tables and write a separate module to deal with them...