Which languages are the most common to build a site like amazon? What do I need to know in order to build an e-store?
A full blown e-commerce is complicated. My first suggestion would be to look at existing solutions and start from there. Magento is one of the most widely used, written in PHP and Open Source. It's proven and works. It's also heavy on resources and complicated.
If you haven't build a full e-commerce site I would also suggest to look at the APIs of Shopify and Ecwid so you get a general idea of what you need to build for success. And maybe use them as a backend.
If you still want to build one (to learn for example), keep in mind that Putting a Catalog online (Products, Categories and Stock) it's easy, but you'll need quite a few more things for e-commerce:
Tonnes of reports and everything with security in mind. You also need to keep in mind which country are you selling in, because depending on that things might change. And keep an eye in fees and read about charge-backs.
Finally, if after reading all this you still want to pursue this endeavor. I'd suggest to create an account on Shopify or Ecwid and use them as backend, both start free. I think in Ecwid you don't get charged until you sell something.
Then start building your own solution and replace bits and pieces as you get more experience.
Aleksandar Andrijevic
Web developer
I was writing an e-commerce platform about 4-5 years ago for my ex company and it was in pure PHP + PostgreSQL + jQuery and JavaScript. This was only the store part, as back-end was administered through desktop app(don't ask my way). Today I will probably go with PHP Symfony framework pure as an API and some JS framework(Aurelia is my favorite so far), or maybe full in Node.js.
For the database part I will stick to standard RDBMS systems that are web hosting out-of-the-box available like PostgreSQL or MySQL(using things like DoctrineORM for PHP you don't have to worry about either of those on development level), and I should avoid NoSQL stuff like MongoDB, because e-commerce sites tend to grow with data-products far more quick than other stuff like blogs, and for that I would use something more robust, stable and mature than NoSQL database. Maybe I am wrong considering my experience with NoSQL. But I don't have anything against MongoDB, learning it now and I am very into it. :)
For the e-commerce platform from ground, you should consider already existing projects for guidance (coming primarily from PHP background I don't know if there are any open source projects in ROR), but you can look into things like Sylius or Elcodi/Bamboo . If you need some guidance about database organization and patterns, you can contact me if you like and I will be happy to write you a little helper on that. :)