Discuss Scratch

jonascj
New Scratcher
2 posts

Database connectivity from Scratch?

Dear everyone,

I am looking for some way to interact with a database from Scratch, so far my search haven't yielded any results apart from Scratch Modifications (Mods).

Anyone doing database stuff from Scratch and if yes, how so? Ideally I would like to connect to a local SQLite (single file) database, but it could also be a remote database.

Scratch Modifications might very well serve for what I am trying to do since they can contain arbitrary javascript or python code, I'm just asking because it seems like something someone might already have accomplished.

Best regards
/ Jonas

TheGameBuilder
Scratcher
100+ posts

Database connectivity from Scratch?

It would be possible using cloud variables, as they can be modified from external servers. I heard somewhere that this practice(of externally changing cloud variables) is not allowed anymore, though.
jonascj
New Scratcher
2 posts

Database connectivity from Scratch?

Thank you for your reply TheGameBuilder.

https://wiki.scratch.mit.edu/wiki/Cloud_Data

Cloud variables seem interesting for some things, but not playing with SQL since they are just global (across all instances of a scratch project running) variables, not a database that can be queried.
333222111q
Scratcher
4 posts

Database connectivity from Scratch?

I made a project about this. This is the link: https://scratch.mit.edu/projects/382229798/editor/
badatprogrammingibe
Scratcher
500+ posts

Database connectivity from Scratch?

jonascj wrote:

Dear everyone,

I am looking for some way to interact with a database from Scratch, so far my search haven't yielded any results apart from Scratch Modifications (Mods).

Anyone doing database stuff from Scratch and if yes, how so? Ideally I would like to connect to a local SQLite (single file) database, but it could also be a remote database.

Scratch Modifications might very well serve for what I am trying to do since they can contain arbitrary javascript or python code, I'm just asking because it seems like something someone might already have accomplished.

Best regards
/ Jonas

There used to be an easy way to use arbitrary javascript in scratch 2.0, using extensions. (One example being: https://scratch.mit.edu/discuss/topic/147934/)

However this is no longer possible with scratch 3.0.
Perhaps you could use ScratchX (a fork of Scratch 2.0 which still supports extensions), or SNAP!, a derivative of scratch that has procedures for running arbitrary javascript.
mrcringekidyt
Scratcher
48 posts

Database connectivity from Scratch?

333222111q wrote:

I made a project about this. This is the link: https://scratch.mit.edu/projects/382229798/editor/
What.
PrimeMinister2
Scratcher
23 posts

Database connectivity from Scratch?

Respected Scratchteam,
It would be really great if a database would be connected to scratch. We can make elements like
  • Mail
  • Chat
  • Accounts
  • Sharing Community
  • Shops
  • feedbacks
and much more.
I tried it using lists,
But I realised that when we reload or open a project, the list stores only the the items added by the creator.
Cloud Variables help but they support only numbers. But a proper database stores everything and we can use the data to open data from the database.
Cloud Variables aren't helping much.
If scratch could be connected to a database, we could also make good android apps, websites, chatting tools, etc.
I request scratchteam to make a database extension so that we can do mach more cool stuff.
Scratch has the capability even to make an operating system but scratch cannot do it without a database.

Thank You,
PrimeMinister2!
Wettining
Scratcher
500+ posts

Database connectivity from Scratch?

PrimeMinister2 wrote:

Respected Scratchteam,
It would be really great if a database would be connected to scratch. We can make elements like
  • Mail
  • Chat
  • Accounts
  • Sharing Community
  • Shops
  • feedbacks
and much more.
I tried it using lists,
But I realised that when we reload or open a project, the list stores only the the items added by the creator.
Cloud Variables help but they support only numbers. But a proper database stores everything and we can use the data to open data from the database.
Cloud Variables aren't helping much.
If scratch could be connected to a database, we could also make good android apps, websites, chatting tools, etc.
I request scratchteam to make a database extension so that we can do mach more cool stuff.
Scratch has the capability even to make an operating system but scratch cannot do it without a database.

Thank You,
PrimeMinister2!
They're against all of what you just listed, pretty much, for liability reasons
PrimeMinister2
Scratcher
23 posts

Database connectivity from Scratch?

They're against all of what you just listed, pretty much, for liability reasons
I am working on android apps that can be easily made on scratch but without a database I cannot do it.
Other languages like C++ and Java are complicated and we need to be typing, typing and typing.
Progressive Web Applications need internet to run, but scratch will be easy a useful.

Last edited by PrimeMinister2 (July 30, 2020 06:47:26)

Jeffalo
Scratcher
1000+ posts

Database connectivity from Scratch?

PrimeMinister2 wrote:

They're against all of what you just listed, pretty much, for liability reasons
I am working on android apps that can be easily made on scratch but without a database I cannot do it.
Other languages like C++ and Java are complicated and we need to be typing, typing and typing.
Progressive Web Applications need internet to run, but scratch will be easy a useful.
i dont think scratch is designed for things like that.

theres gotta be a reason those other languages are complicated
Maximouse
Scratcher
1000+ posts

Database connectivity from Scratch?

PrimeMinister2 wrote:

Progressive Web Applications need internet to run
No, they don't.
herohamp
Scratcher
1000+ posts

Database connectivity from Scratch?

Maximouse wrote:

PrimeMinister2 wrote:

Progressive Web Applications need internet to run
No, they don't.
Isn't that the whole point of a PWA that you can install it as an app and run it locally if needed

Last edited by herohamp (July 30, 2020 15:46:52)

Maximouse
Scratcher
1000+ posts

Database connectivity from Scratch?

herohamp wrote:

Isn't that the whole point of a PWA that you can install it as an app and run it locally if needed
Probably.
prestoawesome
Scratcher
4 posts

Database connectivity from Scratch?

Honestly, if you want simplicity and a database, you are going to have to move into more advanced topics such as the following languages: html, css, and even javascript for front-end, and a serverside language such as php or python for backend parts like the database (although I highly recommend python, it is an amazing language and is super simplistic), and a database management system such as sqlite or mysql (mysql is a thousand times better).

Last edited by prestoawesome (Oct. 15, 2020 23:20:54)

PrimeMinister2
Scratcher
23 posts

Database connectivity from Scratch?

More than a Database, we need a storage system. As I know, scratch projects are saved in an archive “.sb3” files. If we use and “database.json” or “storage.json” and use filesystem to read, edit and overwrite it using the “set” and “get” methods, that will be well-sufficient for our Scratch Projects.
MrNinjakidyyt
Scratcher
3 posts

Database connectivity from Scratch?

Database will be a good update so we can play online with our friends
MrNinjakidyyt
Scratcher
3 posts

Database connectivity from Scratch?

i am with this
NFlex23
Scratcher
1000+ posts

Database connectivity from Scratch?

MrNinjakidyyt wrote:

Database will be a good update so we can play online with our friends
Please don't necropost. By the way, you can already make online games with cloud variables.

Powered by DjangoBB