0

I have started to look into Symfony CMF, and I must say it looks good! However, I can't get my head around the database Schema! I have read up on the basics of PHPCR, and understand it to an extent. The bit that is confusing me are all the extra tables that Symfony CMF installs. I.E

  • phpcr_binarydata
  • phpcr_internal_index_types
  • phpcr_namespaces
  • phpcr_nodes
  • phpcr_nodes_references
  • phpcr_nodes_weakreferences
  • phpcr_type_childs
  • phpcr_type_nodes
  • phpcr_type_props
  • phpcr_workspaces

What are all these used for? The only table I can make sense of is phpcr_nodes and the XML / property data stored! Some tables have data and are being queried - but I can't see any reference to them in phpcr_nodes!

For example:

Table "phpcr_type_nodes" has data such as

name: phpcr:managed supertype: nt:base

Table "phpcr_type_props" has data such as

name: copyright

Green Acorn
  • 852
  • 2
  • 10
  • 14

1 Answers1

0

When you see this schema, it means you are using Jackalope Doctrine DBAL, which is one possible implementation of the PHPCR API. This implements PHPCR on top of a relational database. Unfortunately, there is not too much documentation available, but all of those tables are used.

If you want to learn more about PHPCR, i recommend to have a look at this PHPCR Tutorial . If you really want to understand the database schema in detail, you will need to dig through the source code of Hackalope Doctrine DBAL.

Note that you can also use doctrine ORM with the CMF. The RoutingBundle already brings mapping for it, for other bundles it would be doable to implement ORM mappings and we would be glad for contributions.

PS: I never figured out how to get notifications after the initial notification on stackoverflow, so best open an issue on the relevant github repository if you need more information.

dbu
  • 1,497
  • 9
  • 8
  • Thanks for the reply. I have experimented further with CMF, and can see tables such as phpcr_binarydata being used to store media via the mediaBundle.. The only thing which is putting me off is the amount of queries going on! With the media bundle there were 70+ queries (I may be doing something wrong though)? However, I believe there were 40 on the default CMF page! I am using CMF now for "simple cms" and the database routing. I have installed ORM which seems to be working fine with CMF! Overall - I have found CMF a great learning curve which is good! – Green Acorn Dec 31 '13 at 19:26
  • We took some effort for version 1.1 of PHPCR-ODM to reduce the number of queries. However, it is still rather intensive if you are using menus. – dbu Feb 11 '14 at 11:59