views:

1936

answers:

8

Which databases does Adobe Flash support, if any?

+5  A: 

None.

Instead, you would need to create some middleware (say, a webservice) that you talked to that did the database CRUD for you.

SCdF
+2  A: 

Agree with @SCdF, create a service in php or any other language that takes a modified query from flash, executes it and returns the DB response. Make sure that it only takes a connection from its own local IP address or something like that to prevent "unintentional use".

Ed
A: 

@SCdF is correct. From the horse's mouth:

A Macromedia Flash movie cannot communicate directly with a database. However, Macromedia Flash movies can "talk" to server-side applications (also referred to as "middleware"). Middleware can query a database and relay data back and forth. There are many server applications available. Some of the most common are CGI, ASP, PHP, ColdFusion and Tango.

Blorgbeard
+3  A: 

None, really.

As others have said, the best solution is to have something in between. I personally prefer amfphp for larger datasets and plain xml for smaller stuff, especially since they introduced E4X (way better XML handling) in ActionScript 3.

However, since Flash can do socket communication, it is possible to talk directly to a server. This is very fast, but you're basically opening up your database to the world. I've never used any of these, but the major ones seem to be asql and assql.

Also, flash running in Adobe AIR has support for sqlite databases.

grapefrukt
+1  A: 

You should look at this article. Also you could look into Flex Data Services. Usually Flex is more suited for application that need a lot of access to data, but for simple things in flash you should use some Xml data sources, and write the xml source yourself in something like php, asp, python, perl etc.. like others have pointed out.

Mihai Lazar
A: 

What about Blaze DS (which used to be Flex Data Services) and LiveCycle Data Services?

prochaine
A: 

Zend AMF is a beast! From the creator of AMFPHP, but Zend AMF is supported by both Adobe and Zend. While AMFPHP is a bit more robust, the creator (Wade Arnold) of it seems to be focused on Zend AMF and it is becoming much better.

If you want something more enterprise level I would advise using Blaze DS or LiveCycle as suggested by prochaine.

ViperForce
A: 

If you want to go the nosql route, there is an opensource actionscript library for communicating with CouchDb: http://code.google.com/p/as3relax/

Mondain