0

Hope this question isn't too vague.

I was wondering if there was any documentation or guidance on the database(s) underpinning Craft?

I am going to be working on a website with a fair amount of data and, crucially, the need to pull quite a lot of pieces of data frequently.

You can see a version of it here: http://unlockinglovelocks.co.uk

At the moment, using the dropdowns, you can navigate to a large picture which is mapped, so that clicking on each padlock will bring up its details. Eventually, my friend who requested the site expects to catalog a large number of these (potentially several large images, each featuring dozens of locks, related to just one site --- multiple sites per area --- multiple areas)

Am looking for a setup that won't end up being slow or inefficient. Basically want to understand a bit more about how the data storage with Craft works, so I can try and do it right :p

Any recommended resources would be welcome - I have had a google, and a browse of the Craft docs, without much luck.

3
  • Sorry, but I'm not 100% sure of what you're looking for. Are you looking on advice on how you might architect the database tables in a plugin for that particular site?
    – Brad Bell
    Oct 26 '16 at 17:45
  • I guess I'm not sure - I read somewhere that Craft just sticks everything in one big table? In which case, should I create a plugin or something to allow me to separate them out into different tables? Oct 28 '16 at 15:41
  • 1
    Hi Feathers, this question is far to broad for the Stack Exchange format. I recommend joining the Craft Slack channel instead... there are tons of friendly people who can help you get a better understanding of Craft's inner workings!
    – Lindsey D
    Oct 28 '16 at 18:49
3

It's difficult to answer this without specifics on what you're looking for and what your plugin is trying to do, but I'd recommend following the plugin development docs, which includes working with databases.

I'd also recommend using somethign like https://pluginfactory.io to generate the plugin boilerplate code for the plugin components you might need.

Not the answer you're looking for? Browse other questions tagged or ask your own question.