Saturday, July 29, 2006

Maybe....

How do you handle emotions? What do you do when you feel depressed? You may feel as if there is no goal in your life. You feel lost. You dont know what to do. And to top it up, you are not absolutely sure about the reason for all these emotions/feelings. You try to find a reason.

Maybe your friend did something wrong. No, but he/she was right in her own way. What he/she did is in no way wrong for him/her. But then, why are you upset about what he/she did? Maybe there are issues at your college or work place. Your professor never takes you seriously. No matter what you write, he would not give you good marks. Whereas, his favourite student gets all the good marks and all the praise. Or maybe, your boss had a problem at his place and decided to bring it all out on you. Or maybe you are not getting the responsibilities you deserve. Or maybe you are underpaid and on searching you are not getting a job that you would like. Or maybe, your collegues just dont get along with you. Or maybe you had a fight with your collegue over some small issue in the project. Or maybe your girlfriend/boyfriend or wife/husband cares for someone more than he/she cares for you. Maybe you are right. Maybe you are wrong. You are not sure.

What do you do in such a situation? You feel lonely. You feel lost. You may want to end up your life. How? Take loads of sleeping pills. Or maybe hang yourself from the cealing. Or maybe just jump off the tallest building in your city. But then again, there is no reason for doing so. There is no reason to kill yourself. Why should you kill yourself when you have not achieved what you were meant to achieve in life. But then again what are you supposed to achieve? You are not sure of anything. Well or maybe you are afraid of death. Buy why?? After all some day you are going to die. Is there a reason to live? Why are you alive? What is the purpose of your life?

Maybe you would sit in a corner and cry. And you try to hide yourself from the world. Maybe your friend comes to console you. And maybe you cry on his/her shoulder or maybe you just shoo him away. You expect someone to take care of you. But when someone comes and asks you what is wrong, you dont know how to explain. Maybe you can trust the person or maybe you cant. Maybe the person will understand you or maybe not. You are not sure. You are alone. You are lonely. You struggle with yourself trying to decide what to do. What is right and what is wrong.

And then maybe the next day, you wake up and you feel lucky. Or maybe, you get a call from someone you really care about. Or something unexpectedly good happens. Or maybe the grief simply fades with time. Your mind hides the grief in one of its secret places. And you decide never to look in that place. You cope up with yourself. You feel good. You continue to live...

You laugh, you cry. You get angry. You get depressed. You get excited. That, i think is life...

Sunday, July 23, 2006

why?? why??


  • Why are people jealous of each other?

  • Why do people have an ego?

  • Why do people have an attitude?

  • Why can't people consider each other as equal?

  • Why are there caste restrictions?

  • Why is a girl child not considered as equal to a boy child?

  • Why is there more than 50% reservation for SC/ST/OBC people?

  • Why do we give and take dowery?

  • Why are most of the cops corrupt?

  • Why is there crime in society?

  • Why can't we simple admire beauty without tampering with it?

  • Why are we possessive of the ones we love?

  • Why do terrorists kill innocent people?

  • Why do we fight with a rickshaw wala for Rs 2/- while we spend 150/- on a movie without a word of protest?

  • Why are people emotional?

  • Why do some relations break?

  • Why is love painful?

  • Why do girls mostly answer "I used to think of you only as a friend" OR "I never had such thoughts about you" when you propose her?

  • Why are there issues with property?

  • Why cant we simply take what is ours and let others have what is theirs?

  • Why do we have to tip the waiter always?

  • Why cant we do what we love to do?

  • Why do people steal what is not theirs?

  • Why do people kill?

  • Why do people rape?

  • Why are homo sapiens self destructive?

  • Why is it difficult to let go of someone you love?

  • Why do we fall in love?

  • Why is there a censor board in a democratic country?

  • Why is there still illetracy in India?

  • Why do i like India but still hate it?

  • Why do we fight with someone we love?

  • Why is it that most of the times boys have to propose and be rejected?

  • Why cant girls propose?

  • Why are there love triangles?

  • Why are we afraid of the truth?

  • Why can't I simply be what i am no matter whatever the situation is?

  • Why is sholay still considered to be the best bollywood movie?

  • Why are some people fat and others thin?

  • Why are most of the girls cute?

  • Why is it difficult to live alone?

  • Why do we need to marry?

  • Why are people not ok with gay and lesbian relations?

  • Why cant everybody be in peace and happy?

  • Why is it difficult to live?

  • Why are we afraid of death?


No!!, this is not something i am writing under desperation or depression. I am as happy as a lark. Have been thinking about writing this for a long time... It is something i think is right but... whatever.......

Maybe this is how the world is, and, if everything would be right, there would be no challenges worth facing in life. These are the questions which i think should define life (a struggle) as it is. There are still lots of whys still left out.

And finally, why do i like my bullet so much...

Saturday, July 22, 2006

firefox 2.0 is out

Can be downloaded from http://developer.mozilla.org OR from http://www.mozilla.org/projects/bonecho/all-beta.html

Major features in firefox 2.0 from the end user view point are

User experience

  • Inline spell checking for text areas lets you compose with confidence in web forms.

  • Microsummaries provide a way to create bookmarks that display information pulled from the site they refer to, updated automatically. Great for stock tickers, auction monitoring, and so forth.

  • Extension Manager user interface has been enhanced.

  • Search engine manager lets you rearrange and remove search engines shown in the search bar.

  • Tabbed browsing enhancements include adding close buttons to each tab, adjustments to how Firefox decides which tab to bring you to when you close the current tab, and simplified preferences for tabs.

  • Autodetection of search engines allows search engines that offer plugins for the Firefox search bar to offer to install their plugins for you.

  • Search suggestions allow search engines to offer suggested search terms based on what you've typed so far in the search bar.



Security and privacy

  • Anti-phishing feature to warn users when the web site you're looking at appears to be a forgery.

Wednesday, July 19, 2006

Freedom Of Blogging

Censorship, or limiting access to certain specific data is a big drawback for democracy. It limits freedom of speech, thought, expression, the basic fundas of democracy.

We say india is a democratic country. Why? There is censorship in almost all movies, in addition to rating given by the censor board.

Well forget that. But why is my blog not opening up since yesterday. I had to do some blogging but since my blog was not opening up, i thought, it might be down. But that is not the case...

Take a look at the traceroute below (for techies):

C:\Documents and Settings\Admin>tracert jayant7k.blogspot.com

Tracing route to blogspot.blogger.com [66.102.15.101]
over a maximum of 30 hops:

1 314 ms 298 ms 300 ms 97.239.1.15
2 298 ms 320 ms 299 ms 97.239.2.1
3 297 ms 320 ms 499 ms 202.138.101.57
4 517 ms 540 ms 519 ms 220.224.184.178
5 517 ms 540 ms 519 ms 62.216.145.221
6 557 ms 539 ms 559 ms eqixva-google-gige.google.com [206.223.115.21]
7 638 ms 639 ms 640 ms 216.239.47.120
8 539 ms 539 ms 540 ms 72.14.238.235
9 718 ms 740 ms 719 ms 66.249.94.233
10 717 ms 720 ms 719 ms 66.249.95.246
11 717 ms 719 ms 719 ms 216.239.46.44
12 637 ms 619 ms 619 ms 72.14.236.9
13 617 ms 639 ms 620 ms 72.14.233.121
14 639 ms 619 ms 659 ms 216.239.49.78
15 * * * Request timed out.
16 * * * Request timed out.
17 * * * Request timed out.
18 * * * Request timed out.
19 * * * Request timed out.
20 * * * Request timed out.
21 * * * Request timed out.
22 * * * Request timed out.
23 * * * Request timed out.
24 * * * Request timed out.
25 * * * Request timed out.
26 * * * Request timed out.
27 * * * Request timed out.
28 * * * Request timed out.
29 * * * Request timed out.
30 * * * Request timed out.

Trace complete.


After 14 hops, suddenly the request for data times out.

Well take a look at this... http://www.withinandwithout.com/?p=854. The GREAT indian government has decided to do censorship on internet also. Blocking freedom of blogging. This is very bad. The government says that terrorists are using blogs to communicate. Well agreed. But then there is google earth.

If you dont have any idea about what it is, you can do a search on google and download and take a look at it. Using google earth, you can zoom in on any place around the world be it "the white house" or "The parliament". You will be having the map of that place in front of you, no matter where you are.

If you have good internet connectivity on moon, maybe you can plan a terrorist mission from there using google earth. What will the government do then, decide to ban "google earth". Say that from now onwards, there would be no maps made for delhi.

It was just an example, of what technology can provide. Using it depends on who uses it. Just like an atom bomb. It can be used both for construction and destruction. Dynamites and explosives can be used for breaking rocks and making roads or for killing innocent people. With advanced technology, nothing would be impossible.

What i would say is that instead of blocking access to data, the government should focus on strengthening its own infrastructure. Look at the amount of corruption that is there in india. The cost of a traffic cop in DELHI/NCR is only around 100/- for whatever was done or not done. The feeling of doing something good for the nation has to be there, not only in the traffic cops but in the ministers and all IAS/IPS officers.

People in india want to become MPS, IAS, IPS because there is lots of under table money in these lines.

Sometimes, i just try to imagine how can this country run? But it is still running. Though a single earthquake, single famine or a single terrorist attack can bring it to a standstill any day.

Well, for example, we had a heavy downpour in delhi today, and believe me, more than half of delhi was immobile due to it. Why cant the government do something about it?

Well, anyways lets hope this does not go on for long and we can access our precious blogs soon.

To bypass the block, you can use www.pkblogs.com. And read whatever blogs that were blocked. The news is that blogspot, Typepad and geocities have been affected due to the ban. You can post blogs but cannot view your blog.

And almost all ISPs have dirtied their hands in this game. Have a look at http://censorship.wikia.com/wiki/List_of_ISPs_that_seem_to_have_blocked_blogger

Keep blogging........
Let the world know where we stand......

Tuesday, July 18, 2006

Honda Vallyrle Rune

Take a look... Costs something around 25K dollars...
6 Cylinder and styleeeee...






And this is a Triumph Rocket III - 3 cylinder :

Saturday, July 08, 2006

document scoring/calculating relevance in lucene

How is scoring of a document calculated in lucene? Well, first of all what is soring and what does it do. Scoring is a factor which decides the order by which documents are returned after a search is done using lucene. Something like "order by relevance". If we provide an order by/sort by clause in the search query, then ordering is done on this. Else, ordering is done on the score of the document. All documents returned from the search have a score no associated with it. The document with the highest score comes on top and that with the lease score comes at the bottom.

Scoring is implemented in the similarity class of lucene (org.apache.lucene.search.Similarity).

Lets see how the score of a document is calculated.

The score of a query q for document d is defines as follows (t refers to a term):





score(q,d)=
Σ (tf(t in d) * idf(t)^2 * getBoost(t in q) * getBoost(t.field in d) * lengthNorm(t.field in d) ) * coord(q,d) * queryNorm(sumOfSqaredWeights)
t in q


where


sumOfSqaredWeights =
Σ ( idf(t) * getBoost(t in q) )^2
t in q


Now, lets decode it...

tf = term/phrase(t) frequency in a document(d). Terms and phrases repeated in a document indicate the topic of the document, so implementations of this method usually return larger values when freq is large, and smaller values when freq is small.

idf = term document frequency(no of documents which contain the term). Terms that occur in fewer documents are better indicators of topic, so implementations of this method usually return larger values for rare terms, and smaller values for common terms.

getBoost (t in q) = Gets the boost for this clause in the query. Documents matching this clause will (in addition to the normal weightings) have their score multiplied by b. The boost b=1.0 by default.

getBoost (t.field in d) = Gets the boost for the field in the document if the term is in the field. Again boost for the field b is 1.0 by default.

lengthNorm(t.field in d) = normalization value for a field given the total number of terms contained in a field. These values, together with field boosts, are stored in an index and multipled into scores for hits on each field by the search code. Matches in longer fields are less precise, so implementations of this method usually return smaller values when numTokens is large, and larger values when numTokens is small. These values are computed under IndexWriter.addDocument(Document d) and stored. Thus they have limited precision, and documents must be re-indexed if this method is altered.

coord = Score factor based on the fraction of all query terms that a document contains. This value is multiplied into scores. The presence of a large portion of the query terms indicates a better match with the query, so implementations of this method usually return larger values when the ratio between these parameters is large and smaller values when the ratio between them is small.

queryNorm = Computes the normalization value for a query given the sum of the squared weights of each of the query terms. This value is then multipled into the weight of each query term. This does not affect ranking, but rather just attempts to make scores from different queries comparable.

So affectively the score of a document returned, in search done, using a query is calculated keeping in mind the frequency of the term/phrase in the document, frequency of documents containing the term, boosting factor of a clause in the query, boosting factor of a field, total number of terms in a field, fraction of all query terms contained in a document and some normalization factor based in the idf and boost of term in query.

If you are searching a single field using a query, the results should be very relevant, provided the text entered is meaningful and gramatically correct. With the logic here, even if you are searching multiple fields, the order of relevance of results should be good. But relevance can be increased by assigning boost factor to fields either during the query formation process or during the indexing process. Fields could be boosted according to their order of importance resulting in very relevant results.

Boosting during the query formation process provides the flexibility to change the boost factor dynamically but slows down the search and scoring due to dynamic computation of score. Whereas if fields are boosted during the indexing process, then though the search will be much faster, you would loose the flexibility of altering the boost factor dynamically.

Anything i have missed, please let me know and i will add it...

Friday, July 07, 2006

blogrolling

Finally got some way of connecting other blogs to my site. Editing the template every time i want to add some blog to my site is a very tedious job...

blogrolling is cool.

The "i am online" link from yahoo is a bit buggy though. Shows me online even at times when i am NOT. Seems that yahoo is having problems with its database/messaging systems.

Clustermaps is also cool. Lots of people who visit me are from india, europe and North America. Good to know where i am getting fame. Will have to plan my celebrity trip accordingly ;-).

cbox.ws though gives no control on spam. People just write down anything in it. It should have a image verification process...

Anyways, i think i have got an almost perfect site.

Still missing something which gives referral details. Like from which site, people got links to my site. Will need to plan my advertising strategy accordingly ;-).

Searcing for more stuff ....

Wednesday, July 05, 2006

simply babbling...

Long time again and no blogs...And i have my excuses ready...

Well firstly there was nothing good enough to write...bad excuse!!, i could have written about my bike ride from noida to greater noida. Although i have gone through the ride again and again, but this time it was different. Me and my collegue, ankit raced through the 20-25 km express way connecting greater noida with noida/delhi. I think, i could have done an average of 100 kmph on my thunderbird. The bike has done only 6000 kms and people say it will open up after around 15000 kms. After that it may touch 120 kmph.

Had Shipra and IP (friends) for the drive. See the pics below...












Had loads of fun. Though there was nothing to do in Greater Noida. No malls, no food joints. All we could find was a Dominos pizza where we had some pizza and then we drove back. Great drive, something which inspired me to think for a delhi-jaipur drive sometime later.

Next, had a wedding in the family (my sis). Getting married on 5th of july 2006. So came down to baroda on 30th - my b'day and was a bit busy with the wishes. just enjoying myself.

And lastly, do remember that indian weddings are lengthy procedures which include shopping (specially for the wedding), lots of customs and traditions and finally the wedding followed by the vidai. Oh!!! a complete week would go by and still you would miss someone by the end of it. Dont know why people follow such traditions.

In the meantime, i tried downloading some games for linux. The best one yet is Quake-III Arena. Downloaded cube and tuxracer, but could not get them running....

Lets c what comes next...

Saturday, June 24, 2006

mysql storage engines

I would be discussing mysql storage engines/table types over here. MySQL supports pluggable storage engine architecture, which means that you can create your own storage engine and ask MySQL to store data for you using the sql query syntax defined in MySQL. Sounds cool right, but lets not dig that deep now. Lets first see what types of storage engines does MySQL provide and their benefits/drawbacks.

MYISAM Storage Engine

Based on the older IASM storage engine and currently the default storage engine in MySQL. So, if you create a table in MySQL and dont define a storage engine then, the table would use MYIASM as the storage engine. MySQL databases are generally directories and MYISAM tables are stored using 3 files -
.frm => the table format
.MYD => table data
.MYI => table indexes

Points to Remember:

  • The tables are machine/os independent and can be shifted by simply copying the 3 files to another installation of mysql on another machine.

  • Limit of 2^32 rows which can be increased to (2^32)^2.

  • Maximum no of indexes per table = 64, which can be increased upto 128 by recompiling.

  • Maximum no of columns per index = 16.

  • Blob and TEXT columns can be indexed.

  • Table size is almost unlimited (256TB). Though the table gives an error of "Table is full" when it reaches 4 GB. Then some parameters (MAX_ROWS & AVG_ROW_LENGTH) in the table definition needs to be changed to make the table expandable.

  • Transactions are not supported

  • Fulltext indexing and searching is supported though it is very slow.

  • Granuality of locking is TABLE. So if an insert and select happens one after another, the insert will lock the complete table and the select will have to wait till the lock is removed.

  • The tables do get corrupted sometimes and to recover it, you would need to run the "REPAIR TABLE" command.

  • Does not provide "Foreign key" usage.



InnoDB Storage Engine

InnoDB provides transactions and relational database support in MySQL - supports foreign keys and commit, rollback and crash recovery capabilities. InnoDB creates two log files namely "ib_logfile0" and "ib_logfile1" and a data file "ibdata1" in the MySQL data directory where it stores its tables. You can specify the path for creation of data file and the initial/max size of the file and also the no of data files to create. Placing different data files on different disks would of course lead to increased efficiency.

The table definitions are stored in database directory with a .frm extension whereas the data is stored in the "ibdata1" - tablespace. InnoDB has something known as "clustered index" where the data for the rows is stored. Accessing a row through the clustered index is fast because the row data is on the same page where the index search leads. If a table is large, the clustered index architecture often saves a disk I/O.

innodb_data_home_dir = /ibdata
innodb_data_file_path=ibdata1:50M;ibdata2:50M:autoextend:max:500M


Points to remember:

  • Moving databases/tables is not easy. You need to take a dump and import it in the other installation of mysql

  • Table cannot contain more than 1000 columns

  • Although InnoDB supports row sizes larger than 65535 internally, you cannot define a row containing VARCHAR columns with a combined size larger than 65535.

  • combined size of the InnoDB log files must be less than 4GB

  • Minimum tablespace size is 10MB. And maximum tablespace size is 64TB. This is also the maximum size for a table

  • Does not support FULLTEXT indexes.

  • InnoDB does not keep an internal count of rows in a table. So to process a select count(*) from tablename, InnoDB must scan the complete index which may take some time.

  • Delete from tablename does not regenerate the table, but deletes rows one by one.

  • Supports foreign keys constrains and transactions (commit and rollback)

  • Has row level locking and also provides consistent non-locking read in select statements. Which provides better multi-user concurrency and performance.



Memory/Heap Storage Engine

As the name suggests, the tables are made in memory/RAM. Since the data for the tables are stored in memory they are lost if the mysql server is shut down or if it crashes, but the tables continue to exist since the table definition is a .frm file stored in the database directory. On a mysql restart, all data would have been lost and the tables would be empty. The indexes made on these tables are HASH indexes which makes access to these tables extremely fast. You can create temporary HEAP tables which can be used for high frequency reads & writes.

Points to remember:

  • Can have 32 indexes per table and 16 columns per index.

  • Type of indexing can be decided to be either HASH or BTREE.

  • Using Hash indexes can lead to slower updates and deletes on the table if the degree of key duplication is high.

  • Cannot contain BLOB or TEXT columns

  • Server needs sufficient memory to maintain all MEMORY tables at one point of time

  • To populate a MEMORY table when MySQL server is started, the --init-file option can be used

  • It has table level locking

  • Memory can be freed up by using either truncate/drop table command



Merge Storage Engine

Using MERGE storage engine, we can make a collection of identical MYISAM tables look and work like one. Each MERGE table is made up of two files
.frm - table definition/format
.MRG - names of tables that should be used as one
MERGEd tables support SELECT, DELETE, UPDATE and INSERT. On DROPPING a merge table, only the merge specification is dropped. The underlying tables are unaffected.

Points to remember:

  • MERGE table cannot enforce uniqueness over the underlying table.

  • MERGE table can be used to spilt big tables into parts and refer to them using the merged table name

  • MERGE table does not have its own indexes, it uses indexes of its underlying tables.

  • You cannot search the MERGE tables using FULLTEXT indexes. The FULLTEXT indexes can be created on the underlying MyIASM tables but they cannot be used through the MERGE table.

  • Merge tables use more file descriptors. If 10 clients are using a MERGE table that maps to 10 tables, the server uses (10 × 10) + 10 file descriptors.

  • Key reads are slower, since the on performing a SELECT, the MERGE storage engine has to issue a call on all the underlying tables one by one.

  • INSERTS can be directed to either the first or the last table using INSERT_METHOD parameter during MERGE table creation.

  • REPLACE does not work

  • When you create a MERGE table, there is no check to ensure that the underlying tables exist and have identical structures.

  • There is a limit of 2^32 rows to a MERGE table.



BDB(BerkeleyDB) Storage Engine

Sleepycat's Berkeley DB is a database engine that provides developers with fast, reliable, local persistence with zero administration (check www.sleepycat.com ). Mysql has been provided the BDB transactional storage engine. You need to have BDB installed on your system and compile MySQL with BDB to use the BDB storage engine. Each BDB table is stored in two files
.frm -> table definition/format
.db -> contains table data and indexes

Points to remember:

  • BDB tables can have up to 31 indexes per table and 16 columns per index.

  • MySQL needs a primary key for each BDB table. If not provided, MySQL would create a hidden primary key and use it.

  • If all columns that you access in a BDB table are part of the same index or part of the primary key, MySQL can execute the query without having to access the actual row.

  • Sequential scanning is slower for BDB tables than for MyISAM tables because the data in BDB tables is stored in B-trees and not in a separate data file.

  • There are often holes in the BDB table to allow you to insert new rows in the middle of the index tree. This makes BDB tables somewhat larger than MyISAM tables.

  • SELECT COUNT(*) FROM tablename is slow for BDB tables, because no row count is maintained in the table.

  • Internal locking in BDB tables is done at the page level.

  • Opening many BDB tables at the same time may be quite slow.

  • Each BDB table stores in its .db file the path to the file as it was created. So it is not possible to move BDB table files from one database directory to another. To shift a BDB table mysqldump and import are required to be done.



FEDERATED Storage Engine

The federated storage engine can be used to access data in tables of remote databases locally. When a federated table is created a .frm file is created in the database directory. This file just contains the table definition. The actual table remains in the remote mysql database.
Flow of information in case of federated tables is as follows :

SQL calls issued locally
MySQL handler API (data in handler format)
MySQL client API (data converted to SQL calls)
Remote database -> MySQL client API
Convert result sets (if any) to handler format
Handler API -> Result rows or rows-affected count to local


The structure of the federated table must be exactly similar to the remote table structure except that the ENGINE should be FEDERATED and CONNECTION parameter should contain the connection string that indicates to the federated engine how to connect to the remote mysql server and access the table over there.

connection string format:
mysql://user_name[:password]@host_name[:port_num]/db_name/tbl_name

Points to remember:

  • The remote table that a FEDERATED table points to must exist before you try to access the table through the FEDERATED table.

  • It is possible for one FEDERATED table to point to another, but you must be careful not to create a loop.

  • Transactions are not supported

  • There is no way for the FEDERATED engine to know if the remote table has changed.

  • The FEDERATED storage engine supports SELECT, INSERT, UPDATE, DELETE, and indexes. It does not support ALTER TABLE, or any Data Definition Language statements other than DROP TABLE. The DROP TABLE statement would drop only the local table and not the remote table.

  • FEDERATED tables do not work with the query cache.



ARCHIVE Storage Engine

Used for storing large amounts of data without indexes in a very small footprint. When an archive table is created, following files are created in the database directory.
.frm -> table definition
.ARZ -> DATA file
.ARM -> METADATA file
The engine uses zlib lossless data compression (check www.zlib.net ).

The Archive table is almost 75% smaller in size then the MyISAM table and almost 83% smaller in size then the transactional InnoDB engine. Even after compression of MyISAM table, Archive tables are still 7% smaller. Insert operations on an Archive table is faster than that on a MyISAM table. If table scans on both tables are compared, table scan on an Archive table is found to be faster.

Points to remember:

  • Supports only INSERTS and SELECTS

  • Does NOT support DELETE, REPLACE and UPDATE

  • Has row level locking

  • Rows are compressed as they are inserted.

  • A SELECT statement performs a complete table scan and uncompresses rows on demand. There is no ROW cache.



CSV Storage Engine

Stores data in text files using comma-separated values format. When a table is created 2 files are created in the database directory
.frm -> table definition
.CSV -> data file. A normal text file with comma separated values.

This engine does not support INDEXING. The data file (.csv) file can be read by spreadsheet applications like openoffice, MS office or star office.

In addition to these, there are two other storage engines:

EXAMPLE Storage engine: It is a stub engine and does nothing. You cannot perform anything on this engine except creation of tables. Tables are created as .frm files in the database directory. No data file is created and no data can be stored using this engine.
BLACKHOLE Storage engine: It acts as a black hole, accepts data and throws it away. It does not store anything. Selects always return an empty result set.

This summarizes the mysql storage engines. For details the following url can be referred.

http://dev.mysql.com/doc/refman/5.1/en/storage-engines.html

The following link can be used to select a storage engine.

http://dev.mysql.com/doc/refman/5.1/en/pluggable-storage-choosing.html

Next ... lets c what i can write

Thursday, June 22, 2006

How much tax do I pay?

Lets start from the ground up. I would create a hypothetical situation and try to figure out the amount of tax i pay per month. Well suppose i have a taxable salary of 10,000 per month and since i am a well paid indian, i would come in the 30% tax bracket.

So i would pay up 3,000/- as tax per month. Next, except home cooked food, everything else is taxed at 12.25%. Which means that if i spend around 100/- on say having my diner outside, i would be paying 12.25/- as tax. On an average, i end up spending 100/- every day on one thing or the other. That makes up for 3000/- per month and 3000*12.25 = 367.5/- as tax.

Moreover, in India, petrol is priced at 50/- per litre out of which 25/- is tax+duty. So if i spend around 1000/- on petrol, i would be purchasing only 500/- worth of petrol and paying 500/- worth of tax. Lucky for me, my office is close to my home, so i end up spending not more than 1000/- on petrol. Some people from my office end up spending something around 5000/- to 6000/- on petrol. its called luxury.

Atleast one movie a week makes sense to me. Currently all movies in noida - Delhi/NCR is priced at 125/- out of which 30% is entertainment tax which comes to about 29/-. So if i am watching 4 movies in a week, i would end up paying around 120/- as entertainment tax. Plus on purchase of any commodity, i am supposed to be paying 4% VAT. Well, i suppose, i must be getting around 1000/- worth of FMCG stuff and as a result pay around 40/- as tax.

To sum it all up, out of 10,000 i would be paying 3000+370+500+120+40=4030 as tax. I pay 40% of my salary as TAX. So, in a year, if i get a salary of 3 Lakhs, i would end up paying 1.2 Lakhs to the government as tax. Do i get the comparable returns is a big question, the answer of which is "not available" as of now.