Welcome to “Query and Assembly Programming Languages.” After watching this video, you will be able to: Compare high-level and low-level programming languages. Describe query languages. Describe assembly languages. Let’s explore query and assembly programming languages. But first, we need to categorize programming languages into two levels – high-level and low-level. A high-level programming language is more sophisticated and uses the common English language to make its code more understandable and to increase the speed of coding and debugging programs. Examples of high-level programming languages include query languages such as Structured Query Language (or SQL), structured programming languages such as Pascal, and object-oriented programming languages such as Python. In contrast, a low-level programming language uses a set of symbols to represent machine code. And examples of low-level programming languages include assembly languages such as ARM, MIPS, and X86. A query is a request for information from a database. The database handles the query and searches its tables for the information requested and returns the results to the querying entity. When querying a database, it is important that both the user application making the query and the database handling the query are speaking the same language. In programming terms, writing a query means using predefined and understandable instructions to make the request to a database. This is achieved using programmatic code and this is what we refer to as a query language. A query language may also be referred to as a database query language. By far the most prevalent query language for database queries and database management is SQL. However, there are other query languages available such as AQL, CQL, Datalog, and DMX. In addition to SQL databases, there is another type of database called NoSQL, which stands for Not Only SQL. The key difference between these two types of databases is their data structures. While SQL databases are relational and use structured, predefined, schemas, NoSQL databases are non-relational in nature and have dynamic schemas for unstructured data. A query language is predominantly used to request data from a database or to create, read, update, and delete data in a database. You will likely see the term CRUD used to refer to these last four key database operations. Typically, a user enters a command to either make a query or perform a CRUD operation using syntax that is understandable to the database management system hosting the database. And a database typically consists of structured tables made up of multiple rows and columns of data. When a user performs a query, the database retrieves the data from the relevant rows and columns in the table and arranges it into some sort of order, ready to be returned and presented in the query results. Database queries are either a select command, or an action command, such as CREATE, INSERT, UPDATE, or a mixture of both. The term “statement” is more commonly used to describe these commands. Select queries request data from a database, whereas action queries manipulate data in a database. Query statements can also be used to perform other administrative functions such as creating users and modifying permissions. This table lists some of the most common SQL query statements. Here are some simple syntax examples of common SQL statements. As mentioned earlier, assembly languages are less sophisticated than query languages, structured programming languages, and object-oriented programming languages. As an assembly language uses a simple set of symbols to represent the 0s and 1s of machine code, it is categorized as a low-level programming language. Assembly languages are closely tied to the processor architecture from hardware manufacturers and therefore, each CPU type will typically have its own assembly language. For this reason, there are a large number of assembly languages in use today, which vary among hardware manufacturers. Assembly languages use a simple readable format for their statements, and they are entered one line at a time, with one statement per line. Assembly language statements use the standard format shown here. In this syntax all fields in curly brackets { } are optional, and the statement has two main parts. The first part is the instruction (or the mnemonic), and the second part includes the parameters (or the operands). There may also be optional useful comments added on the end of the statement. One other key difference with assembly languages is that they are translated using an assembler instead of a complier or interpreter, and one statement translates into just one machine code instruction, as opposed to high-level languages where one statement can be translated into multiple machine code instructions. Assemblers translate assembly language into machine code using mnemonics such as Input (INP), Output (OUT), Load (LDA), Store (STA), and Add (ADD). The statements consist of opcodes that tell the processor what to do with the data, and operands that tell the processor where to find the data. In this video, you learned that: Query languages, structured programming languages, and object-oriented programming languages are categorized as high-level programming languages. Assembly languages are categorized as low-level programming languages. A query language is predominantly used to request data from a database or to manipulate data in a database. The most prevalent query language for database queries and database management is Structured Query Language (SQL). Select queries request data from a database, whereas action queries manipulate data in a database. You also learned that: Assembly languages use a simple set of symbols to represent the 0s and 1s of machine code. Assembly languages are closely tied to the processor architecture from hardware manufacturers. Assembly languages are translated using an assembler instead of a complier or interpreter. And assembly language instructions have a one-to-one association with their machine code counterpart.