I am a sys-admin who also does occasional web-db development for my organization. In the past I built web apps by hand-coding PHP/MySQL. I am about to change to Drupal and have read the introductory and getting-started material at Drupal.org. I am starting to get my head around the Drupal way and terminology, but have three specific questions.
I am used to planning the objects needed, then designing object-tables and relationships (one-to-many, etc), then normalizing the schema.
[1] In Drupal, is it easy to create objects (such as people; pets)?
[2] In Drupal, can I generate a dump of the application tables (excluding Drupal core tables) so I can study the application schema?
[3] Does the Drupal framework impose any database design limits? With hand coding I feel like: if I build a valid schema, I can build the app – no mater how complex the data retrieval request. Is this true in Drupal? Does Drupal impose any limits on schema complexity?
Thanks for your patience…
David R
Comments
Some answers
for #1 see http://drupal.org/project/cck
for #2, I am not sure what the difference between core and application tables are, but once you install Drupal you should be able to dump the database, and see the schema.
for #3, Not that I am aware of.
1) There has been a
1) There has been a tradition with using arrays, although object are used in several case. Generally, not much special care is taken by Drupal for handling objects, besides what PHP supports. There is this document about OOP's place in Drupal:
http://api.drupal.org/api/file/developer/topics/oop.html/6
also:
http://drupal.org/node/19964 (a discussion of the above)
http://groups.drupal.org/object-oriented-programming-and-design (an OOP discussion group)
http://drupal.org/project/droopal (a module)
http://drupal.org/node/304775 (documentation for that module)
2) Most Drupal applications are tightly connected with the core tables (for nodes, users, permissions etc). This is reflected a lot in Drupal's APIs (http://api.drupal.org).
There is a Schema API (http://api.drupal.org/api/group/schemaapi/6). And of course you can always use the general MySQL or PostgreSQL tools.
3) No imposed limitations that I know of, although people tend to follow the usual optimizations for real web servers, for example, less joins even if that means staying at 3rd normal form... etc. But that is just a choice of the developer.
Also note that drupal has a
Also note that drupal has a nice functionality for interfacing with non-drupal dbs as well as a handy api for database functions, see: How to connect to multiple databases within Drupal
===
"Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime." - Lao Tzu
"God helps those who help themselves." - Ben Franklin
"Search is your best friend." - Worldfallz