I have a database of more than 30 000 quotes and sayings. It works separately in subdomain, but some of the quotes, c. 300, are used in another part of the site - they are present in view files as text (until recently in plain html file, no PHP framework).
Now I wish to modernize the solution and source the quotes from the large database - so that I could list quotes related to a blog post (several out of the pool of 300) and get a link to the view of the quote in subdomain.
Problem: If I generate views and parse the 32 000 records each time a page is generated, it might influence performance.
What would be best or second-best solution to go easy on the database... - maybe creating in PHPMyAdmin a view with a selected collection of quotes? - maybe a new table in which one column would be a foreign key identyfiyng the quote in the BIG table?
I am just a beginner, can't think of a good way to do it.
Thx!
Edit: I use a simple shared hosting - this is my personal collection of wise sayings. I just wish to use good practices and minimize the risk that I exceed my server quota. libmysql - 5.5.25a phpMyAdmin 3.5.8.1
Someone helped me a few years ago and he did these two tables:
Table quotations
category_id
, author_id
, orig_language_id
, source_id
, year
, notes
, deepness
, created
, project
Table quotation_texts
quotation_id
, language_id
, text
, created
This way the quotes can be translated into many languages, which was the collection's target capability.
THE DESIRED FUNCTIONALITY/PROBLEM TO SOLVE: Within the site there are many blog posts within which I wish to use quotes IN RANDOM PLACES.
Now they work as plain text generated inside view files. I want to
invoke the quotes from database In similar way works the NEXTGEN Gallery in Wordpress - individual photos are invoked by command [singlepic=2415,420,300] where the first number is the ID of a photo.
make a view with all quotes invoked in all posts (the list would be updated automatically as I publish new posts, of course)
The only solution I came up with is to make another table - post_quotes. And in one column put the quotation text copied from the existing table.