ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm new to programming but its a field that I'd really like to get into. The only experience I have is with php. Most of my php scripts were written to collect data, store the data in a mysql database table, then access the data and generate reports. Makes sense right?
Well I'd like to begin writing a financial package and I'm not sure what programming language I should use to do it. If you're wondering why a financial package, well I just thought it would be a fun project where I could actually use the end product. I'd like the program to work on windows and linux so im assuming i should use Java. I have a lot of java programming books that i plan on using to learn the language.
Now to my question, php stores the data it receives in mysql database tables, where do programming languages like java, c, c++ store their data? It there some kind of database utility built in to these languages? How do programming languages store the information that users enter, and then access the data later? Thanks.
Originally posted by msound
Now to my question, php stores the data it receives in mysql database tables,
That statement, as it is, is plain wrong. PHP can use other databases
like PostrgeSQL, too ... it's all a matter of APIs and libraries.
Quote:
where do programming languages like java, c, c++ store their data? It there some kind of database utility built in to these languages? How do programming languages store the information that users enter, and then access the data later? Thanks.
See above.
MySQL and Postgres come with APIs for many languages,
including C, C++, Perl, Java ... from other parties you can
get interfaces for other lingos, too
That statement, as it is, is plain wrong. PHP can use other databases
hmmm, seeing as how i was talking about my personal experience with php, and how i use it, that statement is not wrong. I wasnt saying that mysql is the only database solution for php, its just the solution that I use when I write php applications.
Quote:
MySQL and Postgres come with APIs for many languages
Im new to programming, what's an API? where do i get an API? would I need to have the API installed on the machines that I would like to use my Java program on? Or do I only need the API present when I'm writing the program, and once I compile the database source will be included automatically?
An application programming interface (API) is a set of definitions of the ways in which one piece of computer software communicates with another. It is a method of achieving abstraction, usually (but not necessarily) between lower-level and higher-level software.
Originally posted by msound
hmmm, seeing as how i was talking about my personal experience with php, and how i use it, that statement is not wrong. I wasnt saying that mysql is the only database solution for php, its just the solution that I use when I write php applications.
I'm quite happy to argue that ... ;)
You didn't say "From PHP I use a MySQL database for
persistent storage, how would I go about persistent data
from other languages" but "php stores the data it receives
in mysql database tables" which is something matter-of-
factly ;) and still wrong. I use PHP and "store data it
receives" in plain text files without touching MySQL
or other databases.
dude read the first paragraph of my post. its obvious i was talking about my personal experience with the language. its clear that im not an advanced programmer so its not like anyones going to read my post and take anything away from it. you decided to critique my post instead of offering any kind useful information that i could actually understand given my lack of programming knowledge. thanks to the person who actually posted useful information, that link helped a lot.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.