Skip to content

Instantly share code, notes, and snippets.

@tech-chieftain
Created July 1, 2024 08:02
Show Gist options
  • Save tech-chieftain/abf62339ee38dee99162abb3ca24a7c3 to your computer and use it in GitHub Desktop.
Save tech-chieftain/abf62339ee38dee99162abb3ca24a7c3 to your computer and use it in GitHub Desktop.

SQL discussions

  1. What is the difference between SQL and MySQL?
  2. What do you mean by DBMS? What are its different types?
  3. What are the types of joins in SQL? Give an example for each one.
  4. What is a Primary key?
  5. What are the different operators available in SQL?
  6. What is the need for group functions in SQL?
  7. What is a Relationship and what are they?

Please discuss these questions with your partners and post your answers as a comment on this gist when you are finished.

@Hophneylen
Copy link

Hophneylen commented Jul 1, 2024

Lentsoana Hophney
Wesly
Nonhlanhla Mazibuku

  1. SQL is a standardized programming language used for managing and manipulating relational databases.
    ----MySQL is a relational database management system that uses SQL as its query language
  2. (Database Management System) is software that enables the creation, management, and use of databases.
    Types -----
    Hierarchical DBMS :Data is organized in a tree-like structure.
    Network DBMS :Data is organized in a graph, allowing multiple parent-child relationships.
    columns.
    Object-oriented DBMS (OODBMS):Data is represented as objects, similar to object-oriented programming.
  3. Types of joins in SQL
    a)Inner join: Returns rows that have matching values in both tables.
    b)full- outer join: returns all rows when there is a match in one of the tables and NULL values for columns of the table that does not have a match.
    c)Left-outer join: Returns all rows from left table and matching rows from the right table.
    d)Right- outer join: Returns rows from right table and matching rows from the left table.
    e)cross join: Returns all possible rows combinations from the two tables
    f)self-join: regular join but the table is joining by itself.
    g)Natural join: joins based on
  4. A Primary Key is a unique identifier for a record in a database table.
  5. a)Arithmetic Operators
    b)Comparison Operators
    c)Logical Operators
    d)String Operators
  6. group functions are essential for performing calculations on multiple rows of data to produce a single result. They allow you to summarize large datasets and aggregate datasets using some criteria to uncover insights.6. a relationship refers to the connection between tables that defines how the data in one table is related to the data in another.
  7. a relationship refers to the connection between tables that defines how the data in one table is related to the data in another.
    One-to-One Relationship, One-to-Many Relationship, Many-to-Many relationship.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment