Tutor profile: Ragini G.
Subject: SQL Programming
$$How to retrieve details about the tutor name might be "Gummadi" from the TUTORME table ? $$
Select * from TUTORME where tutor_name like '%Gummadi%'; Like - will help to search words that are similar to your given condition. Now, If I don't use '%' then I will not receive accurate details. For example, there are two people with Gummadi names such as Gummadi_S and S_Gummadi. If my condition was "tutor_name like 'Gummadi' " - it gives me Gummadi_S so I gave "tutor_name like '%Gummadi%' "to retrieve all the rows for that condition.
Subject: Java Programming
$$ How to swap two values using just two variables?$$
$$ Usually, one would think of using temporary variable for swapping two variable. $$ $$ But I will show how we can swap by using just two variables to swap two values. $$ $$int a =10, b = 50; a = a + b; // was a - 10 and b - 50 -> now a - 60 & b - 50 b = a - b; // was a - 60 & b - 50 - > now a - 60 & b - 10 a = a - b; // was a - 60 & b - 10 -> now a - 50 & b - 10 $$ There are other possibilities as well. ping me to know.
$$ When is it advisable to denormalize the data? $$
$$When you need better performance of your database, you can do it. Else, it is advisable to not denormalize. For example, Let us take the transactional environment, in which, you should not provide all the details of the transaction, few columns or sensitive data needs to be locked up that time you need to put them in other tables to maintain integrity though the performance might affect. $$
needs and Ragini will reply soon.