Client or server for upload DB

Hi!

I have to design a system which read frames from xbee and after that, upload them to a DB on internet. For the moment I would use xampp for DB.

I have some arduinos with xbee S1 digimesh already connected between them. I am able to send data to one arduino ethernet. Now I have to upload data received.

I have been reading something about ethernet and I saw there are 2 modes, server and client. But in both, exists the possibility to send data to other server or receive data from others. I don't know which I have to use or which is better for my system. I think maybe it is client mode, because I already have a server (xampp or other in future).

Data will not be a big amount. Just a payload of 6 bits for each node.

What do you think?

Edit: I forgot to add. I think I willl upload data to DB using php or sql. I don't know what is the easiest way using arduino. I know php and sql so, please tell me what is best.

upload them to a DB on internet

There are no databases on the internet. There are databases on servers that are also webservers. Some of those web servers serve up pages that contain forms whose methods invoke scripts that manage the database connection.

For the moment I would use xampp for DB.

xamp is a package that contains a database tool. It is not a database by itself.

I think maybe it is client mode, because I already have a server (xampp or other in future).

A server serves up data. Your Arduino is not serving up the data. It is a client. It is asking the server to provide a reply to a GET or POST command. That GET or POST command identifies what script on the server to execute to process the command, and what data to use to process that command, if any. In your case, the script to execute would expect some data (what to store in the database, for instance). It would generate a response that defined the success/failure of the command, among other things.

I think I willl upload data to DB using php or sql.

Your GET command will invoke a the PHP script that interacts with the database, use sql commands.

I don't know what is the easiest way using arduino.

Your issue isn't with the Arduino as the issuer of the GET command. It is with understanding the client/server relationship, with setting up the server, with constructing the database, with writing the PHP scripts, etc.

Forget about the Arduino for a while. You need to do all the server setup, setting up the database, the database accounts and permissions, the PHP configuration, the PHP script development, etc. and test it all from the same PC. Once the server is configured, test it from another PC. When it all works, get the Arduino back out of the drawer, and make it call the server with the data that it has.

The learning curve is pretty steep. The feeling of accomplishment when the Arduino connects to the server ans successfully stores data is great.

Thanks PaulS.

I said xampp as DB... I mean create DB in xampp. Using phpMyAdmin to test it. About db on internet... something similar, I mean not to have arduino ethernet and DB in the same network...

I will try to create php files, db and after that, test it. Then I will try to use arduino to do all work.