Aim of the Course
After the completion of this course, you will be able to use an SQL client to obtain data stored in an SQL database. You will learn how to write queries which give you exactly the information you require and to bring them into the form most suitable to answer the given questions. You will also learn how to enter new data and how to edit existing data.
A relational database is a database model that stores data in tables. The vast majority of databases used in modern applications are relational, so the terms "database" and "relational database" are often used synonymously. Likewise, most database management systems (DBMS) are relational database management systems (RDBMS). Other database models include flat file, hierarchical and NoSQL databases.
Each table in a relational database contains rows (records) and columns (fields). In computer science terminology, rows are sometimes called "tuples," columns may be referred to as "attributes," and the tables themselves may be called "relations." A table can be visualized as a matrix of rows and columns, where each intersection of a row and column contains a specific value. It is "relational" since all records share the same fields.
Database tables often include a primary key, which provides a unique identifier for each row within the table. The key may be assigned to a column (which requires a unique value for each row), or it may be comprised of multiple columns that together form a unique combination of values. Either way, a primary key provides an efficient way of indexing data and can be used to share values between tables within a database. For example, the value of a primary key from one table can be assigned to a field in a row of another table. Values imported from other tables are called foreign keys.
The standard way to access data from a relational database is through an SQL(Structured Query Language) query. SQL queries can be used to create, modify, and delete tables, as well as select, insert, and delete data from existing tables.
SQL, is an acronym for Structured Query Language and can be pronounced as either "sequel" or "S-Q-L." It is a query language used for accessing and modifying information in a database. The language was first created by IBM in 1975 and was called SEQUEL for "Structured English Query Language." Since then, it has undergone a number of changes. SQL communicates with databases via a graphical user interface like the one you installed (DB Browser for SQLite) in the Installation Guide. Other popular database management systems include Microsoft SQL Server, Oracle, PostgreSQL, Microsoft Access, DB2 and Sybase. They all have their own graphincal user interface that perform similar functions as DB Browser for SQLite
SQL keywords such as SELECT or FROM are not case sensitive.
Questions or exercises are written as:
0.) Have you successfully installed SQLite?
The solutions to all questions in the course are found HERE.
You are strongly encouraged not only to answer the questions but also to try out all presented commands with some examples of your own.
Now you can get started to learn the SQL basics.