 Hello, welcome to SSUnitech. So, see this side and this is our interview questions and answers. So, today we gonna discuss about top 20 interview questions for the beginners. So, let's start with our first question. So, what are the differences between dbms and rdbms? So, first is it stores data as a file in case of dbms but in case of rdbms it stores data as a table form. Next is it has unnormalized data but in case of rdbms it has normalized data. In dbms it doesn't have any integrity constraints but in case of rdbms it defines integrity constant to maintain the AC properties. Next is it doesn't have any relationship between the tables but in case of rdbms it maintain relationship between the tables by using primary can foreign keys. Next is it doesn't support distributed database but in case of rdbms it supports distributed database. Next is it is used in small organization and it supports single user only in case of dbms but in rdbms it is used in large organizations and able to handle multi-users. For example, in dbms we have file system but in case of rdbms we have sico server or calmy sico. Let's move to our next question. So, what is SQL? SQL stands for Structured Query Language. So, it is used to communicate with the databases. It is also used to perform tasks such as update data on the database or retrieve data from the database. Let's move to next question. So, what is primary key? So, primary key is a field or combination of fields in a table which uniquely identify each rows in the table. A primary key column cannot have null values. A table can't contain more than one primary key. Let's move to another question. So, our next question is what is unique key? So, unique key is a field or combination of fields in a table which uniquely identify each row in the table as we have seen in primary key. A unique key column can have only one null value. A table can contain more than one unique key. Let's move to next question. So, what are the differences between primary key and unique key? In case of primary key it cannot have null value but in case of unique key it can have only one null value. Next is a table can't have more than one primary key but in case of unique key a table can have more than one unique key. By default it would create a cluster index in the table in case of primary key but in case of unique key by default it would create a non cluster index in the table. Move to next question. So, what is foreign key? A foreign key is used to link two tables together and foreign key is a field or combination of fields in one table that refers to the primary key in the another table. For example let's assume we have a table with customer and it contains three columns first is customer ID then customer name and customer address and we have a primary key on this table on customer ID column and we have our second table which is sales and it contains two columns first is sale order and second is customer ID and we have sale order as a primary key and we can create a foreign key with this table which will refer in our customer tables primary key. As we can see foreign key in our sale table then the column name we want to create foreign key on the customer ID column then we need to specify reference then the customer table and then column. Let's move to next question. So, what is check constant? The check constant is used to limit the value range that can be placed in the column. If we define a check constant on a single column it allows only certain values for this column. Let's move to next question. So, what are the joints? So, joints are used to retrieve data from two or more than two related tables. Tables can be related to primary key and foreign keys. Let's move to next question. What are the types of joints in SQL Server? So, mainly we have three type of joints. First is inner joint, second is outer joint then cross joint. In case of inner joint inner joint will return only matching rows from the board tables and non matching rows will be eliminated. Next is outer joint. It has three type of joints. First is left outer joint, second is right outer joint. Next is full outer joint. In case of left outer joint it will return matching rows plus non matching rows from the left table. Next is right outer joint. It returns all the matching rows plus non matching rows from the right table. Next is full outer joint. It would return all the matching rows plus non matching rows from left table plus non matching rows from the right table. Next is cross joint. It returns Cartesian product of the two tables. Those are involved in the joint. Move to next question. So, what are the identity column? It is also called as auto incremental column. Identity columns are columns with the values automatically generated when a new row is inserted in a table. We cannot insert explicit values into identity columns. Let's move to next question. So, what are the differences between delete and truncate? So, delete is a DML command and truncate is a DDL command. We cannot use wear condition in case of truncate but we can use wear condition in case of delete. Next, delete will be slow in terms of performance but truncate would be faster. Next, in case of delete it can't be reset the values or identity column but in case of truncate it can reset identity column values. Next, trigger will be fired in case of delete. Trigger will not be fired in case of truncate. Let's move to next question. So, what are union and union all? So, union operator combines result set of two or more than two select statement queries in a single result set. Union operator doesn't include duplicate rows in the final result set. Union all. Union all operator is same as a union except it includes all the unique and duplicate values in the final result set. So, let's move to next question. So, what are the difference between union and union all? So, in case of union it will remove the duplicate values from the result set but in case of union all it doesn't remove the duplicate values from the result set. Next is in case of union it provides sorted result set but in case of union all it doesn't provide any sorted result set. Next is in case of union it would be slower than union all and union all would be faster than union. Let's move to next question. So, what are the differences between care and where care data types? So, care it is fixed length data type and it is used to store non-unique code characters and it occupies one byte of space for each character. In case of where care it is variable length of data type and it is also used to store non-unique code characters and it also occupies one byte of space for each character. Move to next question. So, what are the differences between where care and where care data types? So, in case of where care it is a variable length of data type and it is used to store non-unique code characters and it occupies one byte of space for each character. In case of where care data type it is a variable length of data type and it is used to store unique code characters and it occupies two byte of space for each character. Let's move to next question. So, what are the differences between where and having clause? So, in case of where it can't be used with the aggregate functions like some minimum maximum ATC but having can be used with the aggregate functions. Where can be used with any select query but having can be used only with the group by condition. Where clause filters rows before the aggregation that's why it's good in performance and having filters rows after the aggregation that's why it's bad in performance. Let's move to next question. So, what are the authentication modes in SQL Server? So, first is Windows and second is mixed authentication mode. So, we have two types of authentication mode in SQL Server. Let's move to next question. So, what is stored procedure? Stored procedure are collection of SQL queries that can be saved and reused whenever required and we can also pass parameters to stored procedures and we can manipulate data based on the parameters. Move to next question. So, what are the advantages of stored procedure? So, first is execution plan retention and reusability. Next is reduced network traffic. Next is code reusability and better maintenance. Next is better security and last is avoid SQL induction attacks. Let's move to next question and this is our last question. So, what is function? A function is a stored program that we can pass parameters or not into and return a value. For example, our first we can see getDate, it would return the current date and time without getting any parameter. But we can see our second function which is square root. It would accept a parameter and parameter would be our numeric type. If we can pass 4 inside this sqrt then it would return 2. So, thank you so much for watching this video. If you like this video, please subscribe our channel to get many more videos. And don't forget to press the bell icon for getting the update of our newly uploaded videos.