IMPORTANT TIP
Ques=> How does +,_ act as Binary as well as unary operator?
Ans=>When you want to represent the magnitude of a number
like whether the number is positive or negative
eg. +10,-10 or +a,-a where "a" is a variable name.
here +,_ is using single operand so here it act as unary.
when you write 2+5 or 5-3 or x-y or a+b here +,_ operator
is using double operand so here it act as binary operator.
Ques=> What is the difference between primary key and foreign key?
Ans=>Primary key is the unique key of a table, for example ID.
Say, you have a student table, the primary key is usually
student id, as there won't be two students with the same id.
As for foreign key, it's a key to define the relationship between
two tables. Say, there is another table called StudentEvent,
which it contains a PersonInCharge field.In this StudentEvent
table, the primary key is EventID, where the PersonInCharge is
actually storing the StudentID, which it is the foreign key to
the Student table. This actually defines the relationship
between Student table and StudentEvent table.
Ques=> How does +,_ act as Binary as well as unary operator?
Ans=>When you want to represent the magnitude of a number
like whether the number is positive or negative
eg. +10,-10 or +a,-a where "a" is a variable name.
here +,_ is using single operand so here it act as unary.
when you write 2+5 or 5-3 or x-y or a+b here +,_ operator
is using double operand so here it act as binary operator.
Ques=> What is the difference between primary key and foreign key?
Ans=>Primary key is the unique key of a table, for example ID.
Say, you have a student table, the primary key is usually
student id, as there won't be two students with the same id.
As for foreign key, it's a key to define the relationship between
two tables. Say, there is another table called StudentEvent,
which it contains a PersonInCharge field.In this StudentEvent
table, the primary key is EventID, where the PersonInCharge is
actually storing the StudentID, which it is the foreign key to
the Student table. This actually defines the relationship
between Student table and StudentEvent table.