name: portada layout: true class: portada-slide, middle, right --- # SQL ## Databases .footnote[Joan Puigcerver Ibáñez ([j.puigcerveribanez@edu.gva.es](mailto:j.puigcerveribanez@edu.gva.es))] --- layout: true class: regular-slide .right[.logo[]] --- # SQL .blue[SQL] (Structured Query Language) is a language that allows managing and retrieving data stored in a relational database. - It allows communicating with the DBMS (each DBMS has it own language). The main features of SQL are: - It is a language for all types of users (administrators, developers and regular users) - The user using SQL specifies what he wants, not where or how. - Allows you to make any data query. - It is possible to manipulate it for queries, updates, data definitions and control. --- # SQL  --- # SQL sentences The SQL language provides a large repertoire of statements that are used such as: - Querying data from databases. - Creating, updating and deleting objects from the database. - Creating, updating and deleting data from objects - Controlling access to the database of data and objects. --- # SQL sentences This sentences are classified in several types: - .blue[Data Manipulation Language (DML)]: is used to read and update database data. It is used by users to make queries, insertions, deletions and modifications. - .blue[Data Definition Language (DDL)]: is used to specify the DB schema, user views, and storage structures. This is what defines the conceptual scheme and the internal scheme. - .blue[Transaction Control Language (TCL)]: TCL statements are used to handle changes made by DML statements. Such changes can be grouped into logical transactions. - .blue[Data Control Language (DCL)]: is used by the administrator to control access to the data contained in the database.