Discuss Scratch

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.


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

FancyFoxy wrote:

So, this is like Excel?
Haha, that's one way to think of it. Yeah, basically.

some really annoying person
FancyFoxy
Scratcher
500+ posts

Databases

BotanAI wrote:

FancyFoxy wrote:

So, this is like Excel?
Haha, that's one way to think of it. Yeah, basically.
Okay then, support.
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

FancyFoxy wrote:

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

BotanAI wrote:

FancyFoxy wrote:

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?
Insert is a bit hard to explain, but…
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

Charles12310 wrote:

Support. This would be very useful for things like leaderboards.
I think you can do that with just a list. I dunno, tho

some really annoying person
Charles12310
Scratcher
1000+ posts

Databases

BotanAI wrote:

Charles12310 wrote:

Support. This would be very useful for things like leaderboards.
I think you can do that with just a list. I dunno, tho
Nah. It's difficult. The a list would be like:
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

BotanAI wrote:

Variables. Allowing us near-instantaneous storage and use of a single bit of data. Infinitely useful.

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).
BotanAI
Scratcher
100+ posts

Databases

Blaze349 wrote:

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.

Charles12310 wrote:

-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.



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.

Charles12310 wrote:

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

walkcycle wrote:

No support because this is too complicated for Scratch and we have lists for data. But as an extension it could be added.
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.


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:

BotanAI wrote:

FancyFoxy wrote:

So, this is like Excel?
Haha, that's one way to think of it. Yeah, basically.
it seems to be pretty useful.

Here's a little lesson in memery.
walkcycle
Scratcher
500+ posts

Databases

Charles12310 wrote:

I see no reason why this is confusing.
Who said it was confusing?

To make it less complicated, try reducing the number of blocks it takes.

FancyFoxy wrote:

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)

HyperNova35 wrote:

it seems to be pretty useful.
It would be useful for sure.

DaEpikDude
Scratcher
1000+ posts

Databases

walkcycle wrote:

Charles12310 wrote:

I see no reason why this is confusing.
Who said it was confusing?
Well, kind of you?

walkcycle wrote:

… because this is too complicated for Scratch

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

walkcycle wrote:

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!

Powered by DjangoBB