0

Using MySQL Workbench I reverse engineered phpbb's database to see what the schema would look like.

Well it came up with about 20 tables that were associated with each other through various relationships (no concern there). There are another 50 or so tables sitting independently though without any relationships.

My concern is not that this is a true representation of the database phpbb uses or not. It did bring up some questions that I couldn't find the answers for though (probably due to searching for the wrong terms)

Do databases actually exist and work like this? If so what are they called?

EDIT: For everyone concentrating on the phpbb DB I don't understand why you are since I said that is not a concern. I only referred to it because that is what I was looking at when I came up with these questions.

To try my questions in different words...

If a DB is to have an arbitrary number (say 1/3) of tables that are associated to one another through relationships and then the remaining 2/3's of the tables are independent (i.e. no relationship to other tables) is there a name for this?

Thanks

10
  • 3
    It depends on the database and the schema. Some databases are legitimately built this way. Without details it is impossible to give you an accurate answer. Commented Mar 26, 2011 at 20:18
  • 1
    details? I am not asking you to explain the DB design of phpbb. Commented Mar 26, 2011 at 20:24
  • 4
    You are asking me to tell if you the vague description you provided is normal or not and what to call it. I can't do that with a vague description, I need details. It's one of my many failings. Commented Mar 26, 2011 at 20:33
  • Oded, with all your comments at me that I deleted we are not communicating on the same page as you are proud to point out. No worries that you can't help me out. Thanks Commented Mar 26, 2011 at 20:37
  • @swisscheese huh? Maybe there are deleted comments I don't know about, but as from what I can see, Oded is right. Some databases are legitimately built this way. Without details it is impossible to give you an accurate answer... although this is something that probably only somebody familiar with phpBB can tell fully Commented Mar 26, 2011 at 22:04

2 Answers 2

2

It is perfectly easy to create a database/system without any linked tables...would I do it that way? No, but I have seen plenty.

I suspect that at least some of those 2/3 of those tables are in fact related (in the loose-est sense) to other tables, but that relationship is done through the code, not enforced through the database.

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks for the input. Is there a name that describes such a design?
Not a good name - I think it is more a lack of a complete design than a purposeful design decision.
2

Having tables that aren't linked to others can be reasonable, but I'm not sure that's the case in the PHPBB database.

Check the link below for an attempt at documenting the PHPBB database structure. It includes about 20 tables, which sounds like the linked tables you saw. Can you provide the names of the unlinked tables you're looking at?

http://www.phpbbdoctor.com/doc_tables.php

Table list:

phpbb_auth_access

phpbb_banlist

phpbb_categories

phpbb_config

phpbb_confirm

phpbb_disallow

phpbb_forums

phpbb_forum_prune

phpbb_groups

phpbb_posts

phpbb_posts_text

phpbb_privmsgs

phpbb_privmsgs_text

phpbb_ranks

phpbb_search_results

phpbb_search_wordlist

phpbb_search_wordmatch

phpbb_sessions

phpbb_smilies

phpbb_themes

phpbb_themes_name

phpbb_topics

phpbb_topics_watch

phpbb_users

phpbb_user_group

phpbb_vote_desc

phpbb_vote_results

phpbb_vote_voters

phpbb_words

EDIT - In answer to your question edit, there isn't a specific name for having 1/3 linked tables, and 2/3 unlinked. The main scenario I can think of off the top of my head for unlinked tables is having audit tables tracking the changes that occur over time in particular tables. There would be less audit 'unlinked' tables than linked though.

The reason we're focussing on PHPBB is that's the example you've shown - it may be a quirk of the particular installation of PHPBB that you're looking at, this certainly isn't a normal thing to find.

Can you use your tool with another database and see what results from that?

Also in terms of the database you have run your tool against - is that a custom installation that your organisation has performed? My suspicion is that these unlinked tables that you can see have been added by custom modifications to the base PHPBB install, or are potentially unrelated tables that have been added to the database because it was convenient and available (e.g. the blog table). Your best bet is to ask the person who supports that installation of the database. In terms of your wider question - as mentioned above, its not a particularly normal pattern, but possibly a mix of addons and (mis)use of the database by other things would explain it.

2 Comments

please see my edit. To answer your question "Can you provide the names of the unlinked tables you're looking at?" Here are just a couple blog, privacy_type, php_bookmarks, phpbb_forums_track. Those are just a few, there are about 50 of those "independent" tables.
that was run against a clean load of phpbb. nos provided some information about the reverse engineering tools that could explain why the given result existed as it did. Thanks for the help

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.