Glad to hear that your are interested in building a website/app. It sounds as though you may be a little confused as to what you are doing though.
First off, I think what you are trying to generate is not a domain, but a URI or Uniform Resource Identifier. This is different from a domain name in the sense that the domain, or "hostname", is used to identify the server to handle the request rather than the destination on the server you are looking for.
That is heavily debatable. As @guyspronck has stated, you can use PHP alongside MySQL, or my favorite, node.js (paired with MongoDB or any other NoSQL flavor). The difference is that node.js will act as a full server and whilst it gives you many extra features, it can be unfriendly for beginners and does not offer the same simple file transport system that PHP possesses (though on the flip-side, many argue PHP is harder to code, as it tends to spit out errors in a funny way). If you are unfamiliar with either, you should probably read one of these if you decide on PHP or one of these if you choose node.js.
You might also want to read up on MySQL or NoSQL as well.
Good luck on your project!