DB Discussion

25-March-2025 Postgres: TABLE Seperation: Example scene: Movies In the movies database, several tables are present like, movies, actors, directors, artists. We can include all the results in the same table, but we seperate the details into multiple tables. WHY ? The reason is simple, we avoid the overload processing time for the DBMS to search the particular combination of results. When we query an particular result, a single table contains all the data may be slow in processing the query due to the much data source. To avoid the overload processing of DBMS we separate the tables and join when we need the two different columns from different tables. We will discuss it in further blogs. SQL Query Execution Order: On every execution of an query includes several steps and it occurs based on order. order of an query execution based on its clauses. The order is: 1. FROM Clause 2. WHERE Clause 3. GROUP BY Clause 4. HAVING Clause 5. SELECT Clause 6. ORDER BY Clause 7. LIMIT Clause Query executed in the above order.

Mar 26, 2025 - 06:59
 0
DB Discussion

25-March-2025

Postgres:

TABLE Seperation:

Example scene: Movies

    In the movies database, several tables are present like, movies, actors, directors, artists.

    We can include all the results in the same table, but we seperate the details into multiple tables.     

WHY ?

    The reason is simple, we avoid the overload processing time for the DBMS to search the particular combination of results.
    When we query an particular result, a single table contains all the data may be slow in processing the query due to the much data source. To avoid the overload processing of DBMS we separate the tables and join when we need the two different columns from different tables.
    We will discuss it in further blogs.

SQL Query Execution Order:

On every execution of an query includes several steps and it occurs based on order.

order of an query execution based on its clauses.

The order is:

    1. FROM Clause
    2. WHERE Clause
    3. GROUP BY Clause
    4. HAVING Clause
    5. SELECT Clause
    6. ORDER BY Clause
    7. LIMIT Clause

Query executed in the above order.