I have been working with Drupal for a wile and was a big pleasure.

Finally I found the project and time to build a multisite installation but when I started to reflect about what tables to share, except of http://drupal.org/node/22754 I didn't find much information about drupal's tables so I did my own documentation.

It's not very much precise, but hopefully enough to get an idea of the whole picture.

I will post it as .ods or .xls files (easier to sort) as soon as I finish reinstalling my testing server, but until then, here you have an standard CSV that you can import in your favorite spreadsheet application:

"TABLE","MODULE","CORE","DESCRIPTION","MULTISITE (if you want different sites with same/shared...)","If shared, requires to share the following “packs”... (underconstruction)","Scenario 1: Single sign on","Scenario 2: Content base","Scenario 3: Multilang interface","Scenario 4:
My research groups","x = shared
o = optional
NEVER... is NEVER :-)"
"access","user","x","User's access privileges","Users",,"x",,,,"access"
"accesslog","statistics","x","User's access registering","Statistics",,,,,,"accesslog"
"actions","actions",,"Node related actions","Actions",,,,,"x","actions"
"actions_registry","actions",,"Node related actions registering","Watchdog",,,,,"x","actions_registry"
"aggregator_category","aggregator","x","Categories for feeds aggregator blocks","Aggregator's categories",,,"x",,"x","aggregator_category"
"aggregator_category_feed","aggregator","x","Relation between feeds and categories on feeds","Aggregator's categories",,,"x",,"x","aggregator_category_feed"
"aggregator_category_item","aggregator","x","Relation between items and categories on feeds","Aggregator's categories",,,"x",,"x","aggregator_category_item"
"aggregator_item","aggregator","x","Content of the feeds' items","Feeds content",,,"x",,"x","aggregator_item"
"authmap","user","x","Module access privileges","Privileges (on modules)",,"x",,,,"authmap"
"biblio","biblio",,"Bibliography's content (biblio nodes)","Bibliography content",,,"x",,,"biblio"
"biblio_author_index","biblio",,"Bibliography's index of authors","Bibliography content",,,"x",,,"biblio_author_index"
"biblio_fields","biblio",,"Bibliography's fields extensions","Bibliography types",,,"x",,"x","biblio_fields"
"biblio_type","biblio",,"Bibliography's node types","Bibliography types",,,"x",,"x","biblio_type"
"biblio_type_details","biblio",,"Bibliography's node details","Bibliography types",,,"x",,"x","biblio_type_details"
"blocks","block","x","Blocks information (module, theme, region, pages, title, status...)","Blocks",,,,,,"blocks"
"blocks_roles","block","x","Relations between roles and modules on blocks","Blocks",,,,,,"blocks_roles"
"book","book","x","Books hierarchy of nodes","Book's hierarchy","Book's nodes/content",,"x",,,"book"
"boxes","drupal","x","User defined custom blocks",,,,,,,"boxes"
"cache","drupal","x","Caches rendered nodes","NOT SHARABLE",,"NEVER","NEVER","NEVER","NEVER","cache"
"cache_filter","filter","x","Caches filtered rendered nodes?","NOT SHARABLE",,"NEVER","NEVER","NEVER","NEVER","cache_filter"
"cache_menu","drupal","x","Caches rendered menus","NOT SHARABLE",,"NEVER","NEVER","NEVER","NEVER","cache_menu"
"cache_page","drupal","x","Caches rendered pages","NOT SHARABLE",,"NEVER","NEVER","NEVER","NEVER","cache_page"
"cache_views","views",,"Caches rendered views","NOT SHARABLE",,"NEVER","NEVER","NEVER","NEVER","cache_views"
"client","drupal","x","? (from Pro Drupal Development, but don't appear in my 5.1)",,,,,,,"client"
"client_system","drupal","x","? (from Pro Drupal Development, but don't appear in my 5.1)",,,,,,,"client_system"
"comments","comment","x","Content and metadata of every node comment","Comments","Content",,"x",,,"comments"
"contact","contact","x","User's contact form","Users (contact)","Users",,,,,"contact"
"content_field_*","cck",,"Stores multivalue cck fields' content","Content types (content)",,,"x",,"o","content_field_*"
"content_type_*","cck",,"Stores extra data added to cck created nodes","Content types (content)","content_field_*, node",,"x",,"o","content_type_*"
"devel_queries","devel",,"Stores information about drupal internal queries","Watchdog (developers)",,,,,,"devel_queries"
"devel_times","devel",,"Stores queries execution times","Watchdog (developers)",,,,,,"devel_times"
"file_revisions","upload","x","References formerly upload but “overwriten” documents","File space",,,"x",,,"file_revisions"
"files","upload","x","References to uploaded document (including path)","File space",,,"x",,,"files"
"filter_formats","filter","x","Relation between filters and roles","Filters",,"x","x","x","x","filter_formats"
"filters","filter","x","Relation between filters and modules","Filters",,"x","x","x","x","filters"
"flood","contact","x","?",,,,,,,"flood"
"forum","forum","x","Relations between nodes and versions on forums","Forum",,,"x",,,"forum"
"history","node","x","Node authorship and modification time","Content",,,"x",,,"history"
"i18n_blocks","i18n",,"Multilingual block name and delta","Content translation (on blocks)",,,,,,"i18n_blocks"
"i18n_blocks_i18n","i18n",,"Multilingual block references to “normal” blocks depending on languages","Content translation (on blocks)",,,,,,"i18n_blocks_i18n"
"i18n_node","i18n",,"Relation between nodes and node-translations depending on languages","Content translation",,,,,,"i18n_node"
"i18n_profile_fields","i18n",,"Translation of profile fields","Interface translation",,,,"x","x","i18n_profile_fields"
"i18n_strings","i18n",,"Content type translations","Interface translation",,,,,"x","i18n_strings"
"i18n_variable","i18n",,"Translation of drupal's variables","Interface/Content translation",,"never?","never?","never?","never?","i18n_variable"
"locales_meta","locale","x","Detailed list of “interface strings” that need to be translated ","Interface translation",,,,"x","x","locales_meta"
"locales_source","locale","x","Reference to the .po files of each language","Interface translation",,,,"x","x","locales_source"
"locales_target","locale","x","List of translated strings for each language","Interface translation content",,,,"x","x","locales_target"
"menu","menu","x","Menu content, weight and paths","Menu content",,,"x",,,"menu"
"menu_stp_roles","menu_stp","x","Relation between roles and menu items","Menu",,,,,,"menu_stp_roles"
"node","node","x","Node essential data (id, type, title, status...)","Content",,,"x",,,"node"
"node_access","node","x","Node access privileges (gid, realm, grant_*)","Privileges (on nodes)",,,,,,"node_access"
"node_comment_statistics","comment","x","Last comment and comment's counter by node","Statistics",,,"x",,,"node_comment_statistics"
"node_counter","statistics","x","Statistics about node access","Statistics",,,"x",,,"node_counter"
"node_field","cck?",,"?",,,,,,"?","node_field"
"node_field_instance","cck?",,"?",,,,,,"?","node_field_instance"
"node_group","cck?",,"?",,,,,,"?","node_group"
"node_group_fields","cck?",,"?",,,,,,"?","node_group_fields"
"node_revisions","node","x","Archive old versions of modified nodes","Revisions","Content",,"x",,,"node_revisions"
"node_type","node","x","Node content types","Content types",,,"x",,,"node_type"
"permission","user","x","Relation between user's permissions and realms","Privileges",,,,,,"permission"
"poll","poll","x","Status and duration time of a poll","Poll",,,,,,"poll"
"poll_choices","poll","x","Choices of a poll","Poll content","Poll",,,,,"poll_choices"
"poll_votes","poll","x","Votes of user's in a poll","Poll content","Poll",,,,,"poll_votes"
"profile_fields","profile","x","Data associated with a profile field, that is related with users","Users (profiles)",,"o",,"x","x","profile_fields"
"profile_values","profile","x","Values if any profile field is added","Users (profiles)","Users","o",," ",,"profile_values"
"role","user","x","Role names and id","Users (roles)",,"x",,,"x","role"
"search_dataset","search","x","Searchable terms of each node","Search content","Content",,"x",,,"search_dataset"
"search_index","search","x","Search index of terms","Search content","Content",,"x",,,"search_index"
"search_total","search","x","Word counting for the searcher","Search","Content",,"x",,,"search_total"
"sequences","drupal","x","?",,,"x",,,,"sequences"
"sessions","drupal","x","Stores user's sessions between logins","Users",,"o",,,,"sessions"
"system","drupal","x","Drupal's internal table about it's files status, throttle, versioning...","Drupal",,,,,,"system"
"term_data","taxonomy","x","List of terms in a taxonomy","Taxonomy content",,,"x",,"o","term_data"
"term_hierarchy","taxonomy","x","Taxonomy hierarchy between terms","Taxonomy","Taxonomy",,"x",,"o","term_hierarchy"
"term_node","taxonomy","x","Relation between terms and nodes","Taxonomy","Taxonomy",,"x",,"o","term_node"
"term_relation","taxonomy","x","Relation between related terms","Taxonomy","Taxonomy",,"x",,"o","term_relation"
"term_synonym","taxonomy","x","Synonyms of terms","Taxonomy","Taxonomy",,"x",,"o","term_synonym"
"tinymce_role","tinymce",,"Relation between tinymce settings name and a role","Tinymce",,,,,"x","tinymce_role"
"tinymce_settings","tinymce",,"Set of buttons and features packed under a settings' name","Tinymce",,,,,"x","tinymce_settings"
"url_alias","path","x","List of path and alias","Path",,,"x",,,"url_alias"
"users","user","x","User's data (username, pass, mail, status, picture...)","Users","Users","x",,,,"users"
"users_roles","user","x","Relation between user's and roles","Users (roles)","Users","x",,,,"users_roles"
"variable","drupal","x","Drupal's internal variables (theme, modules, ...)","NOT SHARABLE",,"NEVER","NEVER","NEVER","NEVER","variable"
"view_argument","views",,"List of arguments of a view","Views",,,,,"x","view_argument"
"view_exposed_filter","views",,"List of fields that will be “searchables” in a view","Views",,,,,"x","view_exposed_filter"
"view_filter","views",,"List of fields that will “filter” a view","Views",,,,,"x","view_filter"
"view_sort","views",,"List of fields that will “sort” a view","Views",,,,,"x","view_sort"
"view_tablefield","views",,"List of fields that will head a “table view”","Views",,,,,"x","view_tablefield"
"view_view","views",,"Main table in views, with details about how to show a list of nodes","Views",,,,,"x","view_view"
"vocabulary","taxonomy","x","Taxonomy description (name, type, multiple, required...)","Taxonomy content",,,"x",,"o","vocabulary"
"vocabulary_node_types","taxonomy","x","List of types of taxonomies (forum, event, weblinks...)","Taxonomy","Taxonomy",,"x",,"o","vocabulary_node_types"
"watchdog","watchdog","x","Detailed log of your drupal","Watchdog",,,,,,"watchdog"

Scenarios:

Scenario 1:“Single sign on”
Share only user accounts and logins, but not the permissions nor the content.
Suggested by sime at: http://drupal.org/node/22267
An extended suggestion: http://drupal.org/node/2622",,,,,,

Scenario 2:“Content base”
Share content (nodes, feeds, taxonomies) but not users, permissions or interface.
Share the user account and all permissions, but not content"
Comment: Not tested on real site.

Scenario 3:“Multi language interface”
Share interface translations, but not users or content
Comment: Not tested on real site yet.

Scenario 4:“My research groups”
Share interface, taxonomies, and an specific cck content type, but not users and “classic” nodes.
Tested at this moment at: http://psicologiasocial.uab.es/dehisi

References:

“Pro Drupal Development” 2007, John K.Vandyk and Westgate, Apress.
"Database dictionary" at http://drupal.org/node/22754 (Comment: sorry, for the differences, but I found this link when I finished mine.)
"Share tables across instances" at http://drupal.org/node/22267
"Drupal Multisite Configurations and Hosts" at http://www.contractwebdevelopment.com/drupal-multisite-configurations-an...
"Define shared variables for all sites" at http://drupal.org/node/70472

Further reading and ideas:

"Multi-site use with only one contentbase" at http://drupal.org/node/127121
"How to: Multi-site with Views, all tables shared" at http://drupal.org/node/131036
"Playing with mysql5 views to separate content" at http://drupal.org/node/59309
"HOWTO: Write an installation profile for the Drupal installer" at http://drupal.org/node/67921

May be the best support for this information is a wiki where everybody could comment and modify... but I don't know about any official drupal wiki and books are not much collaborative, so feel free to modify to improve answering this post or just suggest a better method to collaborate.

The part I think could be more interesting to share is the one I called "Scenarios". Would be nice to know what combination of tables you need to share if you like to develop a multisite with shared content, shared users or whatever.

As soon as it will be reviewed by experts quite I'm sure could be a valuable resource for everybody interested in drupal multisites or just for thus that are trying to understand what happens behind the curtains.

Comments

najibx’s picture

I admit there are many ways of implementing multisite.

I would say the scenario defination has to be elaborated more. I have been playing around with various options, but with my requirement, things are not that easy. I would like to implement :

1. Single codebase, individual sites can choose which module to turn on/off
2. share users but not necessarily the permission. A user can be a higher permission in one site but maynot be on others.
3. share contents but content can be CREATED and DISPLAYED from the respective site. Then content can be selectively displayed at Mainsite/othersite. mysql5 views can't be used here (viewing only).
4. Each site has own domain (or subdomain). OG just don't make it. OG_sites yes, but still not working for me.
5. Each site has own blocks
6. Each site has own menus
7. Each site has own theme/frontpage
8. main site can aggreate all content from all sites for all users.

After defining these requirements ...which is the best way to implement?

-najibx-