Posts

Normalization in SQL

Image
 Normalization :-        Normalization is a Database technique which can help us to remove redundancy. Redundancy         means In a colum1 Country and  column2 Sales so here we are adding the sales of Country.                             In country Column i have India and Ind Both meaning are same but when i find total record of        India it will give me 700 Sales so this is redundancy .For removing redundancy we need to create a       master table and where we can add Country and  link it with relationship.                            1st Normalization ,2nd Normalization, 3rd Normalization :-       Multivalued :- same Column Can have comma separate Files or more than 1 values.              ...

STORE PROCEDURE AND FUNCTION

Image
 STORE PROCEDURE :-   Store Procedure is a reusability of code it can be invoke by using Exec.  so if i have any sql query that  i write over  and over again then i will save it to store procedure and just call it to execute it  HOW TO CREATE STORE PROCEDURE: first select your database then click on Programmability and in  Programmability we have Store Procedure.  so for creating a new Store Procedure just right click on Store procedure and select New Store Procedure SO here patientEFcore  is my database and inside it i have Programmability and in  Programmability i have Store Procedure. so in PatientEFcore i have tables here in tblPatient i am creating Store Procedure for Patientid .  soo this is my  new Store Procedure  CREATE PROCEDURE Sp_getpatientId       //Sp_getpatientId i named my store Procedure @Id int                          ...

MSSQL DataTYPE

Image
  💓 Mssql Datatype can have int ,char ,varchar ,decimal ,bit ,money    1)  Integer :Integer can store whole value like Id, Age  can take 4byte of data to store.                                tinyInt :- 1byte ,smallInt: 2byte ,mediumInt : 3 byte,Int :4byte,bigInt :5byte    2)  Char : Char is a Fixed Length .char can store English character and  Number. Store 1byte of data    3)  Varchar : Varchar  is a variable Length it store English char and number.    4)  Decimal :Decimal can store the exact value in database.  decimal(P,D)                    P = Precision , D = Digit     5) Bit : Bit can store the value 0 and 1 0 = false ,1 = true.     6)Money : Money can store the Currencly Value          Also we have nChar and nVarchar ...
 SQL PERFORMANCE TUINING :-    1) CLUSTER AND NON-CLUSTER INDEX :-       both can be used for searching purpose.        CLUSTER INDEX :          It can be used for searching purpose          Any column can have  Primary key or index then it will be a cluster index.        there will be only 1 cluster index in a table.      eg:-       select * from Appoinmnet where id=51;         1)soo cluster index 1st create B-tree n divide index value 1-50 and 51-100   (balance tree it can balancely divide the records agar 100 he to  50 ,  50  me divide krega)             2)then  index can check condition is 50<51 not so skip 1-50 and search on 51-100 index        3) it gate 51 index then it index have leaf node which provide him value   ...

Boxing and Unboxing

Image
  BOXING AND UNBOXING IN.NET :-                      For understanding Boxing and Unboxing 1st we should know about the Value type  and Refrence type  :- VALUE TYPE AND REFRENCE TYPE :-     Value type :- value type hold the value within its own memory which allocated to the stack.                                                                     and its create a fresh memory for every data .                                                                                                    ...

TRIGGER IN SQL SERVER

Image
    TRIGGER IN SQL SERVER:-         TRIGGER  are logic which can be fire's whenever we are doing INSERT ,UPDATE    ,DELETE            operators on TABLE.                  2 different type of TRIGGER in SQL SERVER :-              a.  AFTER TRIGGER :-AFTER TRIGGER can be execute after the INSERT  ,UPDATE, DELETE  operators happen on table                b.  INSERTED OF TRIGGER :- INSERTED OF TRIGGER can skip  INSERT ,UPDATE, DELETE   and it can be execute before the  update of  table                      For creating a TRIGGER we need 2 Tables       In 1st Table we will perform all the operators like INSERT UPDATE DELETE and In      2nd Table  TRIGGER will fir...

NODE.js

  What is Node ? Node is a JavaScript Runtime ,cross-platform ,open-source build on Chrome's V8 JavaScript Engine.Node.js run the V8 JavaScript engine, the core of google Chrome, outside of the browser. This allows Node.js to be  very performant . Node.js has a unique advantage because millions of fronted developers that write JavaScript  for the browser are now able to write the server-side code in additional to the client-side code without the need to learn a completely different language. Why does not alert() run inside Node? alert() is not a part of Node it is a part of Browser type . no alert() function is there in node.js Because the function is actually a method that belong to the window object and there is no window object in node.js   What is Chrome v8 engine ? The Chrome V8 engine is a high performance JavaScript engine written in C++. It is an open source project by google. It also has the flexibility to be used both on the client side and server side. Ess...