Discuss Scratch
- Discussion Forums
- » Suggestions
- » Databases
- BotanAI
- Scratcher
100+ posts
Databases
Variables. Allowing us near-instantaneous storage and use of a single bit of data. Infinitely useful.
Lists. Letting us group data, sort it, identify it. Gives us many more possibilities than a mere variable can. But, these are 1 dimensional.
Let's go a step further. Databases- 2 dimensional information storage. I can imagine many possibilities where this is useful.
Data tables for RPGs.
A backbone for 3-dimensional shapes.
A map-based game.
“Can't you just create a bunch of lists?” I hear you cry. But on that note, you could “just” create a bunch of variables and remove lists. This is extremely inefficient. While I've used it on EXTREMELY SMALL databases, it can't be scaled. Having to manually code in a bunch of editing functions every time I make a different-sized database than I have before is torture.
Lists. Letting us group data, sort it, identify it. Gives us many more possibilities than a mere variable can. But, these are 1 dimensional.
Let's go a step further. Databases- 2 dimensional information storage. I can imagine many possibilities where this is useful.
Data tables for RPGs.
A backbone for 3-dimensional shapes.
A map-based game.
“Can't you just create a bunch of lists?” I hear you cry. But on that note, you could “just” create a bunch of variables and remove lists. This is extremely inefficient. While I've used it on EXTREMELY SMALL databases, it can't be scaled. Having to manually code in a bunch of editing functions every time I make a different-sized database than I have before is torture.
some really annoying person
- FancyFoxy
- Scratcher
500+ posts
Databases
So, this is like Excel?
THIS IS MY SIGNATURE. THIS MEANS IT IS AN AUTOMATIC MESSAGE THAT APPEARS AT THE BOTTOM OF ALL MY POSTS.
Hi! I'm FancyFoxy! I create animations and games that were never, EVER meant to be taken seriously.
FancyFoxy Heroes and #Thanksgiving are some of my latest projects, check them out!
- BotanAI
- Scratcher
100+ posts
Databases
Haha, that's one way to think of it. Yeah, basically. So, this is like Excel?
some really annoying person
- FancyFoxy
- Scratcher
500+ posts
Databases
Okay then, support.Haha, that's one way to think of it. Yeah, basically. So, this is like Excel?
I'm gonna come up with the blocks for this data type.
add [Hello world] to column (1 v) of [database v] :: #e41b17
add [Hello world] to row (1 v) of [database v] :: #e41b17
insert [Hello world] at column (1 v) of [database v] :: #e41b17
insert [Hello world] at row (1 v) of [database v] :: #e41b17
delete item column: (1 v) row: (1 v) of [database v] :: #e41b17
replace item column: (1 v) row: (1 v) of [database v] with [Hello world] :: #e41b17
<[database v] contains [Hello world] ? :: #e41b17>
<column (1 v) of [database v] contains [Hello world] ? :: #e41b17>
<row (1 v) of [database v] contains [Hello world] ? :: #e41b17>
(item at column: (1 v) row: (1 v) of [database v] :: #e41b17)
(length of column (1 v) of [database v] :: #e41b17)
(length of row (1 v) of [database v] :: #e41b17)
(length of [database v] :: #e41b17)
Last edited by FancyFoxy (July 28, 2017 16:22:47)
THIS IS MY SIGNATURE. THIS MEANS IT IS AN AUTOMATIC MESSAGE THAT APPEARS AT THE BOTTOM OF ALL MY POSTS.
Hi! I'm FancyFoxy! I create animations and games that were never, EVER meant to be taken seriously.
FancyFoxy Heroes and #Thanksgiving are some of my latest projects, check them out!
- BotanAI
- Scratcher
100+ posts
Databases
Okay then, support.
I'm gonna come up with the blocks for this data type.
-snip-
It's…
wipes a tear from my eye
It's beautiful.
Edit- What's the difference between “add” and “insert?” And why wouldn't an add block specify both the column and row?
Last edited by BotanAI (July 27, 2017 20:31:57)
some really annoying person
- FancyFoxy
- Scratcher
500+ posts
Databases
Insert is a bit hard to explain, but…Okay then, support.
I'm gonna come up with the blocks for this data type.
-snip-
It's…
wipes a tear from my eye
It's beautiful.
Edit- What's the difference between “add” and “insert?” And why wouldn't an add block specify both the column and row?
Basically, if you say “insert at 5”, then the item would be put at 5 and everything after 5 would be moved up. So previous 5 would be 6, making way for the new 5.
Also, I separated column and row for the add block because I think “adding” shouldn't be point-specific. Those blocks are for adding to a column or adding to a row. It would probably need something at Column 2, Row 1 in order to have Column 2, Row 2. Like how lists work. You need an Item 1 to have an Item 2.
THIS IS MY SIGNATURE. THIS MEANS IT IS AN AUTOMATIC MESSAGE THAT APPEARS AT THE BOTTOM OF ALL MY POSTS.
Hi! I'm FancyFoxy! I create animations and games that were never, EVER meant to be taken seriously.
FancyFoxy Heroes and #Thanksgiving are some of my latest projects, check them out!
- BotanAI
- Scratcher
100+ posts
Databases
Ah, that makes sense. Thanks for your support!
some really annoying person
- Charles12310
- Scratcher
1000+ posts
Databases
Support. This would be very useful for things like leaderboards.
A few internet communication companies want to corrupt the internet by getting rid of net neutrality. Stop Them!
- BotanAI
- Scratcher
100+ posts
Databases
I think you can do that with just a list. I dunno, tho Support. This would be very useful for things like leaderboards.
some really annoying person
- Charles12310
- Scratcher
1000+ posts
Databases
Nah. It's difficult. The a list would be like:I think you can do that with just a list. I dunno, tho Support. This would be very useful for things like leaderboards.
User1 - 1234
User2 - 39174
User3 - 29883
And then you need to find the positions of the numbers and the names, and other things all in one item, and if you ever wanted to change a position in a leaderboard, it would be more difficult too.
A database would be like:
User 1 | 1234
User 2 | 39174
User 3 | 29883
The difference is that the individual sections can be changed easily and positioned easily.
A few internet communication companies want to corrupt the internet by getting rid of net neutrality. Stop Them!
- Blaze349
- Scratcher
1000+ posts
Databases
Variables don't give you just one bit of data. A bit can only hold two values, 0 and 1 (though this is alright for booleans). Variables. Allowing us near-instantaneous storage and use of a single bit of data. Infinitely useful.
- BotanAI
- Scratcher
100+ posts
Databases
Variables don't give you just one bit of data. A bit can only hold two values, 0 and 1 (though this is alright for booleans).
Sorry, confusing wording. I meant a bit like “a little bit,” not “one bit.” My bad.
-snip-
The difference is that the individual sections can be changed easily and positioned easily.
True.
Last edited by BotanAI (July 29, 2017 19:24:17)
some really annoying person
- Charles12310
- Scratcher
1000+ posts
Databases
Because I think this suggestion is very useful for leaderboards, custom variables, player data (they should be cloud), etc., I am going to revive this topic. (please don't complain about necroposting)
Anyways, I think the “databases” should be called tables. Tables are more understandable than databases, and databases can mean more than just a table, especially when it comes to internet terms.
Anyways, I think the “databases” should be called tables. Tables are more understandable than databases, and databases can mean more than just a table, especially when it comes to internet terms.
A few internet communication companies want to corrupt the internet by getting rid of net neutrality. Stop Them!
- -ShadowOfTheFuture-
- Scratcher
1000+ posts
Databases
Support! I can see many instances in which this would be useful.
How about “arrays”?
Anyways, I think the “databases” should be called tables. Tables are more understandable than databases, and databases can mean more than just a table, especially when it comes to internet terms.
How about “arrays”?
<Insert uncreative signature here>
██ ██ ██ ██ ██ ██
██ ██ ██ ██ ██ ██
██ ██ ██ ██ ██ ██ ██
██ ██ ██ ██ ██ ██ ██
███ ███ ██ ████ ██ ███ ███
█████████ █████ █████ █████████
“Though the seasons come and go, and sunshine turns to snow, we will always have tomorrow up ahead.”
- walkcycle
- Scratcher
500+ posts
Databases
No support because this is too complicated for Scratch and we have lists for data. But as an extension it could be added.
- Charles12310
- Scratcher
1000+ posts
Databases
I see no reason why this is confusing. As far as I know, tables/arrays can seem confusing at first, but when you look at how it works, it seems very understandable. Not everything has to be understandable at first glance. Not to mention that is you are going to make a large table, you have to make a lot of lists, and scripting can take extra time. No support because this is too complicated for Scratch and we have lists for data. But as an extension it could be added.
A few internet communication companies want to corrupt the internet by getting rid of net neutrality. Stop Them!
- HyperNova35
- Scratcher
100+ posts
Databases
Support. Not sure if I completely understand what this is, but judging by this post:
it seems to be pretty useful.Haha, that's one way to think of it. Yeah, basically. So, this is like Excel?
Here's a little lesson in memery.
- walkcycle
- Scratcher
500+ posts
Databases
Who said it was confusing? I see no reason why this is confusing.
To make it less complicated, try reducing the number of blocks it takes.
add [Hello world] to column (1 v) of [database v] :: #e41b17
add [Hello world] to row (1 v) of [database v] :: #e41b17
insert [Hello world] at column (1 v) of [database v] :: #e41b17
insert [Hello world] at row (1 v) of [database v] :: #e41b17
delete item column: (1 v) row: (1 v) of [database v] :: #e41b17
replace item column: (1 v) row: (1 v) of [database v] with [Hello world] :: #e41b17
<[database v] contains [Hello world] ? :: #e41b17>
<column (1 v) of [database v] contains [Hello world] ? :: #e41b17>
<row (1 v) of [database v] contains [Hello world] ? :: #e41b17>
(item at column: (1 v) row: (1 v) of [database v] :: #e41b17)
(length of column (1 v) of [database v] :: #e41b17)
(length of row (1 v) of [database v] :: #e41b17)
(length of [database v] :: #e41b17)
It would be useful for sure. it seems to be pretty useful.
- DaEpikDude
- Scratcher
1000+ posts
Databases
Well, kind of you?Who said it was confusing? I see no reason why this is confusing.
too complicated for Scratch…… because this is
Anyway, I really feel like having tables / databases / 2D lists / whatever would be really helpful for all sorts of things: specifically stat tables would be so much easier.
And all the world over, each nation's the same,
They've simply no notion of playing the game.
They argue with umpires, they cheer when they've won,
And they practice beforehand, which ruins the fun!
- Charles12310
- Scratcher
1000+ posts
Databases
snip
add new row :: list
add [] to row (1 v) of [table v] :: list
insert [] to row (1 v) of [table v] :: list
replace (1 v) of row (1 v) of [table v] with [] :: list
delete (1 v) of row (1 v) of [table v] :: list
<row (1 v) of table contains []? :: list >
(item (1 v) of row (1 v) of [table v] :: list )
(length of row (1 v) of [table v] :: list )
(# of items in [table v] :: list )
To make it simpler.
A few internet communication companies want to corrupt the internet by getting rid of net neutrality. Stop Them!
- Discussion Forums
- » Suggestions
- » Databases