- What is the difference between SQL and MySQL?
- What do you mean by DBMS? What are its different types?
- What are the types of joins in SQL? Give an example for each one.
- What is a Primary key?
- What are the different operators available in SQL?
- What is the need for group functions in SQL?
- 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.
@Geraldmutsw
@LethuM2197
SQL This is a standardized language used to communicate with relational databases. It allows you to perform tasks like creating and modifying tables, retrieving data, and deleting information. Think of it as a set of instructions for interacting with databases.
MySQL: This is a popular open-source relational database management system (RDBMS) that uses SQL as its primary language. It's the software that stores and manages your data based on the instructions you provide using SQL. So, SQL is the language, and MySQL is a specific tool that uses that language.
A DBMS is a software application that allows you to store, organize, retrieve, and manipulate data in a structured way. It provides a central location for managing data and ensures its integrity and consistency. Here are some different types of DBMS:
Relational DBMS (RDBMS): This is the most common type, which stores data in tables with rows and columns and uses SQL for communication.
NoSQL DBMS: This type offers more flexibility for storing unstructured or semi-structured data.
Hierarchical DBMS: Data is organized in a tree-like structure with parent-child relationships.
Network DBMS: Data is organized with records linked to multiple other records, forming a network.
Inner join returns rows with at least one match in both tables.
Left (outer) join returns rows from left table and the matched rows from right table.
Right (outer) join returns rows from right table and the matched rows from left table.
Full (outer) join returns rows with a match in either of the two tables.
A primary key in a table that uniquely identifies each row and column or set of columns in the table. The primary key is an attribute or a set of attributes that help to uniquely identify the tuples(records) in the relational table.
Arithmetic Operators (+, -, , /) for calculations
Comparison Operators (=, <>, <, >, <=, >=) for comparisons
Logical Operators (AND, OR, NOT) for combining conditions
The group function in SQL Server provides a powerful tool for performing calculations on groups of rows, allowing you to group data based on specific criteria. This function is important when you want to analyze and summarize information from multiple records in a data structure. The basic group functions are COUNT, SUM, AVG, MAX, and MIN.
Relationships define how data tables are linked. They help you organize your data efficiently and retrieve information across different tables.
One-to-One: A single record in one table is associated with exactly one record in another table.
One-to-Many: A single record in one table is associated with multiple records in another table.
Many-to-Many: Multiple records in one table can be associated with multiple records in another table.