Thursday, September 4, 2014

Can we Update Views?

Can we Update Views?

Oh yes, we can. There are a few golden rules to be followed to write an updateable view.

BTW, a view is a precompiled SQL statement.You can refer to my other blogpost to quickly recap on what is a view?

http://naveenieus.blogspot.in/2014/09/views-in-sql.html


To put it simple, the following are the NOT HAVE rules to be followed in the definition of a view;

1. Aggregate Functions
2. Distinct, Group By, Having
3. Sub Queries
4. Reference to a non-updateable view in the FROM clause
5. Sub Query
6. Temporary Tables
7. No duplicate view column Names
8. All columns in the base table not having Default Value should be included in the View Definition
9. Columns should be simple and not derived

Reference / Further Reading:

http://dev.mysql.com/doc/refman/5.0/en/view-updatability.html

Tags: Updateable View, View, Rules for Updateable View

Wednesday, September 3, 2014

Views in SQL


Views are precompiled SQL statements, which can involve more thatn one table. The SQL developer / user can refer to all the columns in the views as being referred to a single table.

Trivia on Views

  • Can use joins to get columns from more than one table.
  • Can hide columns form the user.
  • Can act as aggregated tables where there are complex calculations performed to get the column values.
  • Takes lesser tome to execute, since the statement is precompiled.
  • Does occupy a little memory but does not store the records as in table.
  • Views can be updated, if there is one to one relationship between the rows in the view and tables.
 
 
Tags: Views in SQL, Views, Trivia on Views,

Monday, September 1, 2014

Baby Bathtime

Baby bath-time with father is always joyous if the baby is playfully entertained. We require a diversified vision with a multi-core processor capable of running parallel threads to get the task accomplished.

Now the entertainment factor comes into picture over and above the ability to process the orders from the commanders. Here all that is required for the father is Inner Peace. Simply attain Nirvana by simply being mute to commanders. 

Now some best practices here are;

1. Cut your nails: Baby skin is soft and tender and could easily get scratched. Have your nails cut and the edges shaped. 

Tip :P It's totally up to you if you have to get a manicure done. BTW, I don't.

2. Stock Backup toys: babies get pretty adamant during bath-time. Keep enough toys as backup (hidden from the baby) to distract them when they cry for the bat of soap. In my case, the baby always wants the bottle of shampoo to be emptied into the bathtub.

3. Rubber Floor Mat: Using one will prevent slipping and tripping. In case the baby is old enough to stand on it's feet, it would be helpful.

4. Water Temperature: Checking the water temperature is a vital factor. The ideal temperature for a bath for a baby is anywhere between 36°C to 38°C

Tip: Water any cooler than 36°C is not good for bath.

Remember to practice Feather Touch approach when giving the baby a bath, remember that it's a baby and not a toy.

Tags: baby, Baby Bath, Baby Stories, Bathtime best practices

Saturday, August 30, 2014

En'route Erode

Starting of from home at about 2:00 PM, hiding a secret thing that Subash had to, we took the bus from the town bus stand at 3:00 to Erode after a couple of minutes of hiccup discussion on weather to wait and take a bus with a seat or to stand and travel all the way. BTW, we choose the later.

Thanks to Subash for the tickets.

We had good ride to Erode, passing through some awesome country side roads due to a detour near Avinashi, the journey getting extended by 15 more minutes. The warn Erode weather and the visibly huge bus stand was a good welcome note.

Subash, my friend next door had to attend repeated calls from various sources (undisclosed) during the entire journey. But found time to show me the place where his car kissed a bus sometime back. Not to mention also the bus which got kissed at the Erode bus stand.

Proceeding to AvilPoondurai taking another bus, we reached to secret location admist sugarcane fields and coconut grooves to pickup his car and reach his farm house at Tekkanur.

A beautiful South Indian farm house with a festive splendor was awaiting for our arrival. On stepping out of the car, there was a huge scream 

"Mapla vandaaachu....."

Meaning: Groom has arrived...

Wednesday, August 27, 2014

Baby Bath Checklist

One of the most challenging yet fun filled tasks on earth is to give a bath to a baby. The challenge becomes tougher when Dad takes over for the job.

As though the challenge is not enough there would be a few commanders to actually battle during the process. Even though the actual process time would be about 5 minutes, the commanders see to it that it becomes 50.

Now the the actual part of the theme. When taking the baby for a bath, have the following things already at your command (very far off from the commanders). In other words, you are the commander here.

Warm water
Shower Cap (2 nos, one for the baby and one for you...)
Baby Shampoo
Baby Soap
Baby Bathing Powder (Now this is a truly Indian stuff)
Baby Bathing Seat
Your Seat

Take care not to allow any commanders near this command center which you and only you will be in-charge.

Tag: Baby care, Baby Stories, Kids, Toddlers, de-stress, second skills