0% found this document useful (0 votes)
9 views27 pages

Chapter 1: Presenation: 1-Course Presentation

Uploaded by

chaimaeib723
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views27 pages

Chapter 1: Presenation: 1-Course Presentation

Uploaded by

chaimaeib723
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 27

Chapter 1: Presenation

1-course presentation
SQL, which stands for Structured Query Language, serves as a comprehensive tool for managing relational databases.
It encompasses various aspects such as defining data (DDL/LDD), querying data (DQL), interrogating data
(LID),manipulating data (DML), and controlling data (DCL). SQL is uniquely tailored for interacting with SGBDR/
RDBMS, making it the primary language for database operations.

MySQL, SQL Server, PostgreSQL, MongoDB, and DB2 ex… are all relational database management systems (RDBMS)
that utilize SQL as their primary language for interacting with data.

2-the components of a RDBMS


2.1-what is a relational database
It provides a structured way to store and manage data, allowing users to define data structures (tables ), store data in
files, control access to that data, and maintain data integrity (safety) through various mechanisms such as
constraints, transactions, and validations. It serves as a reliable and efficient way to organize, retrieve, and
manipulate data for various purposes.

2.2-Relationale database objects

1. Tables: Tables consist of rows and columns, where each row represents a record and each column represents
a field or attribute.
2. Indexes: Indexes are used to improve the speed of data retrieval operations, such as SELECT queries, by
providing quick access paths to the data based on the values in specific columns.
3. Views: Views are virtual tables generated from the result set of a SELECT query.
4. Constraints: Constraints enforce rules or conditions on the data stored in tables to maintain data integrity.
5. Stored Procedures: Stored procedures are sets of SQL statements that are stored in the database and can be
executed on demand. They are often used to encapsulate business logic and frequently executed tasks.
6. Triggers: Triggers are special types of stored procedures that are automatically executed in response to
certain events, such as INSERT, UPDATE, or DELETE operations on a table.
7. Functions: Functions are reusable blocks of code that accept parameters, perform calculations or operations,
and return a value.

2.3-Table characteristic

3-sql presentation
3.2-types of languages
Chapter 2: Data integration language (LID)
1-Select order
 SELECT [distinct] {*,champ1 AS alias,champ2…..} FROM Table name;

2-Basic syntaxes
2-sql functions
4- Case
4-1 case expression

4-2 case generalize

5-synthax generals de select


6-exercices
Chapter 3: multi_table query
1-jointure

2-produit Cartesian/jointure sans condition


Reference of table or rename
Every line in the first table hase every line in the other table

3-jointure with a condition


4-jointure externe
4.1-defenition
Outputs the artbutes that are in the tabe one and not in the table two

5-Autojoin
Like there is a boss of the employee in the table employee
6-resume and exercises
Chapter 4: complex queries
1-les requetes ensemblistes
 the UNION operator in SQL is used to combine the results of two or more SELECT statements into a single result
set. It removes any duplicate rows that may exist between the result sets.

2-les sous-requetes monolignes


3-les sous-requetes multilignes

4-les sous-requetes dans la clause FROM


5-summarie and exercices
Chapter 4: LMD
1-INSERT

2-UPDATE

3-DELETE

4-exercices
Chapter 6: language de definition
1-les types des donnes
2-contraintes
3-DDL commandes
4-views
5-database other objects
5.1-sequences
Sure! In SQL, a sequence is like a counter that generates unique numbers automatically. You can use it to create
unique identifiers for your rows in a table, like primary keys. Think of it as a way to ensure each row has a distinct ID
number without you having to manually assign them. When you insert a new row into a table, you can use the
sequence to automatically generate the next unique number for that row.

has to delete tables first that use sqs

5.2-synonymes
6-indexes

Think of an index in SQL like the index of a book. Just like you use a book's index to quickly find specific topics or
pages, an index in SQL helps the database quickly locate specific rows in a table.

When you create an index on a column or a group of columns, it's like creating a sorted list of those values. So, when
you search for something based on that column, the database can quickly look it up in the index instead of scanning
through the entire table.

Indexes make searching and sorting data much faster, just like how an index in a book helps you find information
quickly. However, like adding an index to a book can take up space and time to update, indexes in SQL can increase
the size of the database and can slow down write operations (like inserting or updating data), so you have to use
them wisely.
7-exercices

You might also like