I know Jekyll is all about "don't use database, use static files instead", but
if I would like to implement rating on my static
site, just to be able to
store how many stars each of my pupils rated some composition, and then show
an average, and with 'sqlite' being a file-based database, would it be
possible to write/read from that sqlite file, using some javascript api
?
You can give a try to firebase or cloudbase.io they both offers free plans and javascript API.
Firebase has a very good documentation.