This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.
  • Index
  •  » Suggestions
  •  » Databases (TECH WARNING, COMPLICATED TOPIC) (simple version included)

#1 2012-01-09 11:53:49

P110
Scratcher
Registered: 2011-04-12
Posts: 500+

Databases (TECH WARNING, COMPLICATED TOPIC) (simple version included)

THIS IS OUTDATED PLEASE READ THESE VERSIONS THEN THE NEW VERSIONS BELOW!

(TECHY VERSION)

(This could be added to the variables section and it could be called saveable variabe, so it is easy for new scratchers)

Hey there,
Now if Scratch had SQL database functionality, wouldn't it be allot better because say somebody wanted a login you wouldn't have to recode it every time!

It would be good if scratch hosted the SQL database but if they couldn't there are a load of free services on the net (Not mentioning any names so that this doesn't get kicked off by moderators)


You could have a little code category saying database and there could be blocks such as save to database, check database, delete from database and amend in database and the check block would be useful because you could do a sign-up page and it could check if there was already that username being used!

Thanks for reading  smile

P110
--------------------------------------
Head of Monkey Banana

Anyhoo it does say simple version up there so here goes!
(SIMPLE VERSION)

(This could be added to the variables section and it could be called saveable variabe, so it is easy for new scratchers)


Hey there,
Now this is quite techy but I will try to make it a bit simpler.

(Comment from scimonster: It is a list stored online somewhere)

If we could store text into a database which is a thing that can hold lots of information and is used allot for usernames and passwords.

People could use it for logins storing usernames and passwords in it, it could be used on a signup project page so that is checks if the username is in use and it could store the username and password so you don't have to recode a project every time somebody requests a username and password

Thanks for reading  smile

P110
------------------------------------
Head of Monkey Banana

(NEW VERSION)
Ok now it's gone from, databases to cloud variables, but they could still work.

It's all explained, mostly in pages 1,2 and 4

So have a look!

please visit my new comment on page 4

Last edited by P110 (2012-03-20 12:36:46)


Me live on 2.0 now  sad

Offline

 

#2 2012-01-09 13:47:11

Zeusking19
Scratcher
Registered: 2011-07-10
Posts: 1000+

Re: Databases (TECH WARNING, COMPLICATED TOPIC) (simple version included)

Great idea. Remember this is not only to the ST`s ability, but also what squeak can do.

It will be in flash in 2.0, so it could happen.


http://i49.tinypic.com/2w7e1jm.pnghttp://dragcave.net/image/eFGFz.gifhttp://dragcave.net/image/9hE5q.gif

Offline

 

#3 2012-01-10 15:23:52

P110
Scratcher
Registered: 2011-04-12
Posts: 500+

Re: Databases (TECH WARNING, COMPLICATED TOPIC) (simple version included)

Zeusking19 wrote:

Great idea. Remember this is not only to the ST`s ability, but also what squeak can do.

It will be in flash in 2.0, so it could happen.

Yes but even if they kept it in java due to some un-forseen problem they could program a small python code to manipulate the java applet and connect it up to an sql server.

Thanks for your feedback  smile  O O (meant to be a monkey)
                                            . .
                                            _

please visit my new comment on page 4

Last edited by P110 (2012-03-20 12:37:04)


Me live on 2.0 now  sad

Offline

 

#4 2012-01-10 22:56:29

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: Databases (TECH WARNING, COMPLICATED TOPIC) (simple version included)

Try simplifying it by saying that a database is like a list, but it's online somewhere.  smile
The problem is that, people might put real passwords and information in, and not know it's being added to a database. Also, how would you make sure you're not taking the wrong data?
If it could be implemented with no security loopholes, that would be great, but otherwise, I don't think so.

Offline

 

#5 2012-01-11 16:15:45

P110
Scratcher
Registered: 2011-04-12
Posts: 500+

Re: Databases (TECH WARNING, COMPLICATED TOPIC) (simple version included)

scimonster wrote:

Try simplifying it by saying that a database is like a list, but it's online somewhere.  smile
The problem is that, people might put real passwords and information in, and not know it's being added to a database. Also, how would you make sure you're not taking the wrong data?
If it could be implemented with no security loopholes, that would be great, but otherwise, I don't think so.

There are free services that will host a SECURE database that way being secure and people could enter real passwords.


You could have the database used for a sign-up script, something like this.

when gf clicked
ask [please enter username]
set[username v]to(answer)
then repeat it for a password it would work therefor being no security loopholes.

please visit my new comment on page 4

Last edited by P110 (2012-03-20 12:36:25)


Me live on 2.0 now  sad

Offline

 

#6 2012-01-12 07:20:45

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: Databases (TECH WARNING, COMPLICATED TOPIC) (simple version included)

P110 wrote:

scimonster wrote:

Try simplifying it by saying that a database is like a list, but it's online somewhere.  smile
The problem is that, people might put real passwords and information in, and not know it's being added to a database. Also, how would you make sure you're not taking the wrong data?
If it could be implemented with no security loopholes, that would be great, but otherwise, I don't think so.

There are free services that will host a SECURE database that way being secure and people could enter real passwords.


You could have the database used for a sign-up script, something like this.
<when green flag clicked>
(sorry no ask block)
<say[  please enter username  )>
<set{  database  }to(  answer
then repeat it for a password it would work therefor being no security loopholes

I mean, how would you get the info out of the database? Then, people could take someone else's data.

Offline

 

#7 2012-01-14 03:27:01

P110
Scratcher
Registered: 2011-04-12
Posts: 500+

Re: Databases (TECH WARNING, COMPLICATED TOPIC) (simple version included)

scimonster wrote:

P110 wrote:

scimonster wrote:

Try simplifying it by saying that a database is like a list, but it's online somewhere.  smile
The problem is that, people might put real passwords and information in, and not know it's being added to a database. Also, how would you make sure you're not taking the wrong data?
If it could be implemented with no security loopholes, that would be great, but otherwise, I don't think so.

There are free services that will host a SECURE database that way being secure and people could enter real passwords.


You could have the database used for a sign-up script, something like this.

when gf clicked
ask [please enter username]
set[username v]to(answer)
then repeat it for a password it would work therefor being no security loopholes

I mean, how would you get the info out of the database? Then, people could take someone else's data.

Oh, sorry,

It would just simply check if the data existed, and I would bypass the scratch website so it was only on my website and not here, so the project was not downloadable.

please visit my new comment on page 4

Last edited by P110 (2012-03-20 12:36:02)


Me live on 2.0 now  sad

Offline

 

#8 2012-01-14 07:35:35

bobbybee
Scratcher
Registered: 2009-10-18
Posts: 1000+

Re: Databases (TECH WARNING, COMPLICATED TOPIC) (simple version included)

Last time I checked, it takes absolutely no work to get the sb file, no matter if there is a download link or not.


I support the Free Software Foundation. Protect our digital rights!

Offline

 

#9 2012-01-14 19:21:24

Dinoclor
Scratcher
Registered: 2010-06-10
Posts: 1000+

Re: Databases (TECH WARNING, COMPLICATED TOPIC) (simple version included)

I don't think so. It would be easy to find out where the DB was and get the info out of it. Not that I would, but I probably could. (I HAVE NOT HACKED ANYTHING REAL. JUST HACKTHISSITE CHALLENGES.)

And if I could, others could too.
So you'd need good security and very good encryption.

I'm just raising a point- it probably would not be very secure, as anyone with programming knowledge can just go into the source code and find where the information was going. Also, if you're using PHP, PHP is prone to injection if you don't remember to safeguard everything.

So, if you want to do this, you're probably going to have to explain how you are going to make it secure.

However, this could be useful, especially for making OSes, savegames, etc.


This is a temporary signature. It will exist until I think of something witty.

Offline

 

#10 2012-01-25 16:13:54

prototype47
Scratcher
Registered: 2010-02-25
Posts: 98

Re: Databases (TECH WARNING, COMPLICATED TOPIC) (simple version included)

I agree with Dinoclor.  I've been working on an extremely advanced database for several weeks now.  I want to make it as user-friendly as possible. I have also been wondering how to safely backup files online.  So far, I've been kinda stumped.


SED is temporarily abandoned while I move onto new areas, such as AI with pathfinding, individual reactions, and group communication.  More complex projects are also brewing.
http://dl.dropbox.com/u/41930734/newsig.png

Offline

 

#11 2012-01-26 06:24:21

rdococ
Scratcher
Registered: 2009-10-11
Posts: 1000+

Re: Databases (TECH WARNING, COMPLICATED TOPIC) (simple version included)

I agree with the idea. However, as people have said on this topic, you'd need to check the database for data.

I think we should have "inputs" like items of an online, multiplayer list.
I propose these blocks for the idea: (you must [use database] to connect)
[use database]
[add input "text" to database]
[replace input (1) of database with "text"]
[remove input (1) of database]
(input (1) of database)
<"text" is in database?>

Offline

 

#12 2012-01-27 11:19:25

P110
Scratcher
Registered: 2011-04-12
Posts: 500+

Re: Databases (TECH WARNING, COMPLICATED TOPIC) (simple version included)

After all of your comments, I have revised how it would work, firstly it would have a password to access the data and it would be hidden in the download of the project, and the database name would also be hidden, as for people looking for it outside of scratch it would be protected there aswell, as most databases are.

please visit my new comment on page 4

Last edited by P110 (2012-03-20 12:37:32)


Me live on 2.0 now  sad

Offline

 

#13 2012-01-29 13:11:13

prototype47
Scratcher
Registered: 2010-02-25
Posts: 98

Re: Databases (TECH WARNING, COMPLICATED TOPIC) (simple version included)

P110 wrote:

After all of your comments, I have revised how it would work, firstly it would have a password to access the data and it would be hidden in the download of the project, and the database name would also be hidden, as for people looking for it outside of scratch it would be protected there aswell, as most databases are.

But how would you hide the database url? Assuming your scratch project parsed it into a .txt file, it would still probably have a block like
[save (database) at (URL]

So anyone could theoretically open the project, copy the url, download the .txt file, and read anyone's data.  Which isn't necessarily *bad*, as long as no one uploads personal info or their actual passwords.  Maybe look into the scripting for Magnie's chat?


SED is temporarily abandoned while I move onto new areas, such as AI with pathfinding, individual reactions, and group communication.  More complex projects are also brewing.
http://dl.dropbox.com/u/41930734/newsig.png

Offline

 

#14 2012-02-03 15:55:50

lallaway12
Scratcher
Registered: 2012-01-04
Posts: 500+

Re: Databases (TECH WARNING, COMPLICATED TOPIC) (simple version included)

P110 wrote:

(TECHY VERSION)

(This could be added to the variables section and it could be called saveable variabe, so it is easy for new scratchers)

Hey there,
Now if Scratch had SQL database functionality, wouldn't it be allot better because say somebody wanted a login you wouldn't have to recode it every time!

It would be good if scratch hosted the SQL database but if they couldn't there are a load of free services on the net (Not mentioning any names so that this doesn't get kicked off by moderators)


You could have a little code category saying database and there could be blocks such as save to database, check database, delete from database and amend in database and the check block would be useful because you could do a sign-up page and it could check if there was already that username being used!

Thanks for reading  smile

P110
--------------------------------------
Head of Monkey Banana

Anyhoo it does say simple version up there so here goes!
(SIMPLE VERSION)

(This could be added to the variables section and it could be called saveable variabe, so it is easy for new scratchers)


Hey there,
Now this is quite techy but I will try to make it a bit simpler.

(Comment from scimonster: It is a list stored online somewhere)

If we could store text into a database which is a thing that can hold lots of information and is used allot for usernames and passwords.

People could use it for logins storing usernames and passwords in it, it could be used on a signup project page so that is checks if the username is in use and it could store the username and password so you don't have to recode a project every time somebody requests a username and password

Thanks for reading  smile

P110
------------------------------------
Head of Monkey Banana

good but a logon needed so you need to make a block that just looks at the pass you put to login to scratch

__________________________________
no need for the owner to look at it scratch will make a datebace place and just make your datebace and it will give you a code In maybe beetwen 3 to 8 days and make a thingy and make it simple and easy


P.S. I sorpport you  smile


http://i49.tinypic.com/2re4ied.png

Offline

 

#15 2012-02-03 16:24:40

bobbybee
Scratcher
Registered: 2009-10-18
Posts: 1000+

Re: Databases (TECH WARNING, COMPLICATED TOPIC) (simple version included)

Encrypt the data using a password/key that is unique to each computer.


I support the Free Software Foundation. Protect our digital rights!

Offline

 

#16 2012-02-04 04:49:41

P110
Scratcher
Registered: 2011-04-12
Posts: 500+

Re: Databases (TECH WARNING, COMPLICATED TOPIC) (simple version included)

REVISED, again

Ok here is how it would work, the database url, username and password would be hidden when project downloaded.

The scratch project file can be easily hidden by hosting it on your own server after importing the other file necessary.

Any more problems here? Add them below!  smile

please visit my new comment on page 4

Last edited by P110 (2012-03-20 12:38:03)


Me live on 2.0 now  sad

Offline

 

#17 2012-02-04 23:35:41

prototype47
Scratcher
Registered: 2010-02-25
Posts: 98

Re: Databases (TECH WARNING, COMPLICATED TOPIC) (simple version included)

P110 wrote:

REVISED, again

Ok here is how it would work, the database url, username and password would be hidden when project downloaded.

The scratch project file can be easily hidden by hosting it on your own server after importing the other file necessary.

Any more problems here? Add them below!  smile

It would be somewhat complicated, but I guess that could work.  I would just make a simple command interpreter that carries out certain encryption methods, then have the project download an encryption key from that. Unless scratch team made a special block specifically for use only by the original project creator...
Has anyone submitted this thread to the scratch team?
These are some great ideas; they should definitely see them.

Last edited by prototype47 (2012-02-04 23:41:39)


SED is temporarily abandoned while I move onto new areas, such as AI with pathfinding, individual reactions, and group communication.  More complex projects are also brewing.
http://dl.dropbox.com/u/41930734/newsig.png

Offline

 

#18 2012-02-06 12:46:14

P110
Scratcher
Registered: 2011-04-12
Posts: 500+

Re: Databases (TECH WARNING, COMPLICATED TOPIC) (simple version included)

prototype47 wrote:

P110 wrote:

REVISED, again

Ok here is how it would work, the database url, username and password would be hidden when project downloaded.

The scratch project file can be easily hidden by hosting it on your own server after importing the other file necessary.

Any more problems here? Add them below!  smile

It would be somewhat complicated, but I guess that could work.  I would just make a simple command interpreter that carries out certain encryption methods, then have the project download an encryption key from that. Unless scratch team made a special block specifically for use only by the original project creator...
Has anyone submitted this thread to the scratch team?
These are some great ideas; they should definitely see them.

I don't think anyone has?

Maybe we should, I'll post when I have.

Mabe we could get a petition on my website?

please visit my new comment on page 4

Last edited by P110 (2012-03-20 12:38:26)


Me live on 2.0 now  sad

Offline

 

#19 2012-02-06 12:50:33

P110
Scratcher
Registered: 2011-04-12
Posts: 500+

Re: Databases (TECH WARNING, COMPLICATED TOPIC) (simple version included)

Ok ST have been notified of it's existence, ao hopefully it will be in scratch 2.0 but no promises, I will give there answer here soon.

please visit my new comment on page 4

Last edited by P110 (2012-03-20 12:38:57)


Me live on 2.0 now  sad

Offline

 

#20 2012-02-06 15:22:21

sdg1
Scratch Team
Registered: 2010-07-06
Posts: 41

Re: Databases (TECH WARNING, COMPLICATED TOPIC) (simple version included)

Hi P110 and others.

[short version] We are working on this [/short version]  smile

[long version]
We have decided to split the problem into two different parts. One part deals with storing data online. The other part deals with data-sets, and operations on data-sets like filtering/searching.

For the first part, we are currently testing an idea where we have special variables called cloud variables. When you set a value of cloud variables in the online player, even if you leave the project, when you come back later, you'll get back the values you originally stored. So for storing high scores in a Scratch game, your code can look like:

if <(current score) > (☁ high score)>
  set [☁ high score v] to (current score)
With this code, once the [☁ high score] variable is set, the next person who accesses the project online will have to beat the high score set previously.

We are doing cloud lists too, where values set for lists will be stored online.


For more database-y stuff, we are still trying to finalize what the blocks would look like, but the idea is to allow for Scratch projects to connect to online data-sets, and do query/search. I'll post more information on this as we make more progress on this.

Offline

 

#21 2012-02-06 16:44:07

bobbybee
Scratcher
Registered: 2009-10-18
Posts: 1000+

Re: Databases (TECH WARNING, COMPLICATED TOPIC) (simple version included)

How would you know if I used a block that said "set cloud high score to 999999999999"?


I support the Free Software Foundation. Protect our digital rights!

Offline

 

#22 2012-02-06 17:35:54

sdg1
Scratch Team
Registered: 2010-07-06
Posts: 41

Re: Databases (TECH WARNING, COMPLICATED TOPIC) (simple version included)

bobbybee wrote:

How would you know if I used a block that said "set cloud high score to 999999999999"?

That is entirely possible - and you are free to make your own choice as a programmer for your Scratch project.
When remixing other's projects, the Scratch editor will know that you are remixing, and will allocate a new slot on the server for your remix project's cloud variable.

Offline

 

#23 2012-02-06 18:04:26

veggieman001
Scratcher
Registered: 2010-02-20
Posts: 1000+

Re: Databases (TECH WARNING, COMPLICATED TOPIC) (simple version included)

sdg1 wrote:

Hi P110 and others.

[short version] We are working on this [/short version]  smile

[long version]
We have decided to split the problem into two different parts. One part deals with storing data online. The other part deals with data-sets, and operations on data-sets like filtering/searching.

For the first part, we are currently testing an idea where we have special variables called cloud variables. When you set a value of cloud variables in the online player, even if you leave the project, when you come back later, you'll get back the values you originally stored. So for storing high scores in a Scratch game, your code can look like:

if <(current score) > (☁ high score)>
  set [☁ high score v] to (current score)
With this code, once the [☁ high score] variable is set, the next person who accesses the project online will have to beat the high score set previously.

We are doing cloud lists too, where values set for lists will be stored online.


For more database-y stuff, we are still trying to finalize what the blocks would look like, but the idea is to allow for Scratch projects to connect to online data-sets, and do query/search. I'll post more information on this as we make more progress on this.

That sounds really awesome! I can't wait!

(sidenote: I thought you said 'tetchy' instead of 'techy' at first lol)


Posts: 20000 - Show all posts

Offline

 

#24 2012-02-07 06:07:47

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: Databases (TECH WARNING, COMPLICATED TOPIC) (simple version included)

Oh, the ST does look at suggestions.  tongue
Do could variables work in projects that are not uploaded?

Offline

 

#25 2012-02-07 15:13:56

prototype47
Scratcher
Registered: 2010-02-25
Posts: 98

Re: Databases (TECH WARNING, COMPLICATED TOPIC) (simple version included)

sdg1 wrote:

Hi P110 and others.

[short version] We are working on this [/short version]  smile

[long version]
We have decided to split the problem into two different parts. One part deals with storing data online. The other part deals with data-sets, and operations on data-sets like filtering/searching.

For the first part, we are currently testing an idea where we have special variables called cloud variables. When you set a value of cloud variables in the online player, even if you leave the project, when you come back later, you'll get back the values you originally stored. So for storing high scores in a Scratch game, your code can look like:

if <(current score) > (☁ high score)>
  set [☁ high score v] to (current score)
With this code, once the [☁ high score] variable is set, the next person who accesses the project online will have to beat the high score set previously.

We are doing cloud lists too, where values set for lists will be stored online.


For more database-y stuff, we are still trying to finalize what the blocks would look like, but the idea is to allow for Scratch projects to connect to online data-sets, and do query/search. I'll post more information on this as we make more progress on this.

I'm giggling inside. 
Not to push, but is Scratch 2.0 nearing anything like completion? If you can't say that's fine.


SED is temporarily abandoned while I move onto new areas, such as AI with pathfinding, individual reactions, and group communication.  More complex projects are also brewing.
http://dl.dropbox.com/u/41930734/newsig.png

Offline

 
  • Index
  •  » Suggestions
  •  » Databases (TECH WARNING, COMPLICATED TOPIC) (simple version included)

Board footer