DatabaseIntegrate.org is a free starting point for students and new developers: a short learning path, a visual SQL query builder and a connection string generator with code examples in six languages. No sign-up, nothing to buy.
Start the learning path Open the SQL query builderWork through these in order. Each step takes an evening or two.
A relational database stores data in tables. Each row is one record and each column one attribute. A primary key uniquely identifies a row; a foreign key points to a row in another table, which is how an order “belongs to” a customer. Sketch your app's data on paper as tables before writing any code.
SELECT reads rows, INSERT adds them, UPDATE changes them and DELETE removes them. WHERE limits which rows are affected – forgetting it on an UPDATE or DELETE changes every row. Practise with the visual query builder and read the SQL it generates.
Your program reaches the database through a driver and a connection string containing host, port, database name and credentials. Keep the password out of your source code by reading it from an environment variable. The connection string generator shows the format for eight engines with Python, Node.js, Java, C#, PHP and Go examples.
Never build SQL by gluing user input into a string – that is how SQL injection happens. Use parameterised queries (placeholders such as ? or $1) so the driver sends values separately from the SQL. Every mainstream driver supports this.
Most slowness comes from missing indexes, fetching more rows or columns than needed, or running one query per item in a loop. Learn to read a query plan with EXPLAIN, then work through ten performance strategies.