sql Flashcards
what is the difference between sql and nosql
One of the differences is that sql has predefined schemas in which the tables have to be written out beforehand and if there are any changes needed to be made you have to alter the table whereas nosql you can add and change as many documents as you want without having to predefine anything.
Another difference is in sql the data is relational and being able to do things like join allows you to match data set by things like ids also offering data integrity to be able to use foreign keys to link users throughout different tables and traceback what they have done While NoSQL databases store data as individual objects that can include nested properties, if a piece of data like a name changes in one object, it might need to be manually updated in all instances where it appears. In contrast, with relational databases, a change at the top level, like in a primary table, can automatically reflect across all related records.
Lastly in sql you have a consistent language for querying like looking up data in spreadsheets or card catalogs whereas in nosql the languages are very diverse and can use multiple different types of built in functions to search for data.
What is inner join
inner join will select entries that have matching values on both tables
what is left join
left join will return all entries from the left table and any matched entries from the right otherwise null
what is right join
right join will return all entries from the right table and any matched entries from the left otherwise null
what is full join
full join returns all entries in both tables when there is a match otherwise null
what is cross join
cross join will return every possible combination of entries in both tables
what is sql
SQL stands for Structured Query Language. It’s used to communicate and interact with relational databases, allowing users to query, insert, update, and delete data.
what is dml
dml is data manipulation language, it is the process of making queries in sql to manipulate data
what is ddl
ddl is data definition language, it is the process of making queries to manage the table structures
what is dcl
dcl is data control language, it is the process of making queries to manage the permissions
what is tcl
tcl is transaction control language, it is the process of making queries to manage certain transactions
what is a primary key
a primary key is a way to uniquely identify each entry
what is a foreign key
a foreign key is a way to create relationships for multiple different tables
what is normalization
normalization is a way to be more organized when setting up you tables for instance if you have multiple customers then instead of storing there addresses on each order you would make a customers table to avoid data redundancy like what you see more often in a nosql environment.
what is an index
an index is added as a way to find entries quicker and speed up search queries