now its time for Database. the major thing that beginners are curioues to know what are the difference between InnoDB and MyISAM. when where to use when.

The Simple is that to show By The Table.

My ISAMInnoDB
Required full text SearchYes
Require TransactionsYes
frequent select queriesYes
frequent insert,update,deleteYes
Row Locking (multi processing on single table)Yes
Relational base designYes


if there is any doubt which to use when. then MyISAM is your default choice.
you can also mix different table types in same database. Hence it  is recommended.
i think table has told the everthing. :) and nothing more to explain.
8

View comments

  1. hey !!
    This is a very nice article..
    But what i don't get is what if we have to use both MyISAM and INNODB...in such a case if we have DML's in a transaction INNODB tables will rollback, but how to ensure atomicity in the MyISAM tables ?

    Your reply will be of great help.
    Thanks in Advance

    ReplyDelete
  2. yes there is minor problem that MyISAM didnot support Transactions... and innoDB are more relialbe on atomicity... but you can solve that problem by your own programmming design... you can achieve that by random no method.. you can achieve parallelism also ..

    ReplyDelete
  3. I like your Yoda style of speaking 99 Developer!

    ReplyDelete
  4. There IS full text search in InnoDB now.

    ReplyDelete
  5. Your comparision table is good but I d'nt agree with your comment "if there is any doubt which to use when. then MyISAM is your default choice."

    As per me if you have sufficient resources (CPU/RAM/Space) and you have any doubt that which engine to use, then go with Innodb.

    ReplyDelete
  6. i'am using very frequent insert queries. that's why my table engine is innodb.

    ReplyDelete
  7. This is a good article that just open my mind, I never really realize about the engine as I just got a major error that required me to do the research thank you.

    ReplyDelete
  8. This is useful for me. You said frequent "insert, update, select, delete" InnoDB or MyISAM. My online store project, I have new products, new members which engine should I use? Thank you.

    ReplyDelete

  1. when i was reading some editor script,, some one has comment like this "Safari Lies.. " :D
    good work man..!
    0

    Add a comment


  2. As you all know, nowadays English is not only communication for the customer. If you have to reach the local market your site must be multi-lingual and through localization you can achieve the local customers which are not illiterate and they know only their Mother Tongue. You have to make your website Multilingual where you can target other customer also whether they are Chinese or Spanish or French. Through this your customer will increases by leap and bound you can find new market. The Solution in my mind is very simple and implementable with very low level cost. You can save your multilingual text in DB and on base of the customer which they language want to see can be visible
    Look the following schema
    1-Filename
    2-Constant
    3-english
    4-spanish
    5-french
    6-Chinese

    Through this schema you can easily make your site multilingual. You have to add constant on your WebPages and on runtime you have to fetch the values of it and replace it by constant on choice of customer selection. Hope you got the hint how you can implement it ;)
    0

    Add a comment

  3.       Writing your First Java Program.


    Hey Me Back after Long Time. I was trying to learn New Language Java (PS: this language is not new for the world. but for me. Yes it is... ;) ) ... okay first the thing i have to install is the JDK java developement kit which is easily available and downloadable from java website..


    These are the few quick steps and notes that can help you to write your first program on java


    1-JDK


    2-IDE ( than can be a notepad, Eclipse or Netbeans)


    after installing jdk open a notepad and write a simple program Named NewClass.java



    /**
    *
    * @author developer 99
    */

    public class NewClass {
             public static void main(String args[])
             {
                     System.out.print("Welcome to Java Programming!!");
             }
    }


    after writing this program on notepad, I just compile this program thorugh command prompt by running
    -- javac NewClass.java
    and when it complies it creates new file with the named NewClass.class and run this program by this command
    --java NewClass
    /**
    it will prompt (Welcome to Java Programming)
    **/


    !! Help !!


    if you are compiling your program and you are getting the error of could not load or find main class... 
    then check your System Environment Variable
    Properties -> Advanced -> Environment Variables
    There will be an attribute Path edit this attribute and place the path of the folder where javac file exists in my case i found javac file on following path
        "C:\Program Files\Java\jdk1.7.0\bin"
    Ads by AdGenta.com


    Tags: , ,


    0

    Add a comment

  4. Hi, Blogging  is not only become the way of writing your daily diary. it is also becoming the way of earning. now every one can become the professional blogger by easy steps and you can monetize your blogs very easily.


    Ads by AdGenta.com


    there is not only the way you can earn from adsense. you can also earn from difference sources just like AdGenta. as this blog is written by AdGenta Tool,


    Powered by Qumana


    0

    Add a comment

  5. last day when i applied to google adsense... it has been rejected .. and the reason it is mentioned is that i am cybersquatter.. and now the question's arises is that . who is the person  to decided ? whether i am cyberaquatter or not.. Is i am doing an illegal work? or i the blog name i have selected is cyer suqatted if it is cybersquatted.. then it have not to be given to me ... as i am cyber squitting... and when i wikipedia that name there is mentioned that
    it is resolved by  Uniform Domain Name Resolution Policy (UDRP) process which is developed by the Internet Corporation for Assigned Names and Numbers (ICANN). Critics claim that the UDRP process favors large corporations and that their decisions often go beyond the rules and intent of the dispute resolution policy.
     what a joke!!
    0

    Add a comment


  6. Whenever your sites contains two type of themes and you have to apply aur to change the themes you can do it by very simple manner.
    Just write two lines and whole your template and images will be changed.
    This can be done thorugh apache rewrite rule.
    Just open .htaccess file where your index page is available.
    If there is no .htaccess file you can just create it and this level
    And just type following lines.

    RewriteCond    %{http_host} ^([^.]+)\.test.com [NC]
    RewriteRule    ^(images|css)/(.+)$ themes/1/$1/$2 [L]
    This is the conditional rules which state that if the domain is test.com
    And url of images are like this test.com/images/a
    It will redirect that image to test.com/thems/1/images/
    Now if you want to change the images and cass
    Just change the RewriteRule
    As below
    RewriteCond    %{http_host} ^([^.]+)\.test.com [NC]
    RewriteRule    ^(images|css)/(.+)$ themes/2/$1/$2 [L]
    It will redirect your images and css to themes/2/images/ or theme/2/css/

    I hope this is the simplest way of changing your website themes
    0

    Add a comment



  7. Hi, when I was working on the registration form of conference, how many persons will be available , and informations of users (name,email,phone,address). I was thinking instead of typing user info one by one. I have design  the input area as tabular form.  There is add user button on the screen through which dynamicly created input box. Of the input boxes..
    Name
    Phone
    Email
    address
    User 1
    Dummy data
    Dummy data
    Dummy data
    User 2
    Dummy data
    Dummy data
    Dummy data
    User 3
    Dummy data
    Dummy data
    Dummy data
    Submit Button will be here

    Now the issue that I have faced that I need that data in well managed form. So this case I have got two solutions .
    Solution 1 (By Modifying input tag id’s and name ).
    In this solution I have to named the input tags according to the users detail which you can see in the following example
    <form method="post" action="">
    <input type="hidden" id="user1[name]" name="user1[name]" value="developer99"/>
    <input type="hidden" id="user1[phone]" name="user1[phone]" value="03322222222"/>
    <input type="hidden" id="user1[email]" name="user1[email]" value="aa@aa.com"/>
    <input type="hidden" id="user1[address]" name="user1[address]" value="dummy"/>
    <input type="hidden" id="user2[name]" name="user2[name]" value="developer"/>
    <input type="hidden" id="user2[phone]" name="user2[phone]" value="0321229111"/>
    <input type="hidden" id="user2[email]" name="user2[email]" value="test@test.com"/>
    <input type="hidden" id="user2[address]" name="user2[address]" value="dummy"/>

    <input type="submit" id="submit" name="submit" value="submit"/>
    </form>

    And when I have submit the form I have got the values in the following manner, this is the print of $_REQUEST
    Array
    (
        [user1] => Array
            (
                [name] => developer99
                [phone] => 03322222222
                [email] => aa@aa.com
                [address] => dummy
            )

        [user2] => Array
            (
                [name] => developer
                [phone] => 0321229111
                [email] => test@test.com
                [address] => dummy
            )

        [submit] => submit
    )
    Top of Form

    Bottom of Form
    you can see this is the simple method you can have passing an array through it..
    Solution 2 (By JSON ).
    JSON is lighter way then xml to pass the values through ajax or in webservices.. but it can use in post form also. Below is the code of javascript.
    Var usersInfo = new Array();
    var o = new Array(Name,phone,email,address);
    var o1 = new Array(Name,phone,email,address);
    var o2 = new Array(Name,phone,email,address);



    usersInfo[0] = o;
    usersInfo[1] = o;
    usersInfo[2] = o;


    usersInfo = JSON.encode(usersInfo);

    document.getElementById(‘arrayOfUsers’).value= escape(base64Encode(usersInfo));

    I have encoded this JSON value in base64 encode as some time special chars can create problems .
    And after post you have to decode it through base64 decode and json decode..
    To know much about JSON you can visit up this link
    http://json.org/
    0

    Add a comment

  8. now its time for Database. the major thing that beginners are curioues to know what are the difference between InnoDB and MyISAM. when where to use when.

    The Simple is that to show By The Table.

    My ISAMInnoDB
    Required full text SearchYes
    Require TransactionsYes
    frequent select queriesYes
    frequent insert,update,deleteYes
    Row Locking (multi processing on single table)Yes
    Relational base designYes


    if there is any doubt which to use when. then MyISAM is your default choice.
    you can also mix different table types in same database. Hence it  is recommended.
    i think table has told the everthing. :) and nothing more to explain.
    8

    View comments

    1. hey !!
      This is a very nice article..
      But what i don't get is what if we have to use both MyISAM and INNODB...in such a case if we have DML's in a transaction INNODB tables will rollback, but how to ensure atomicity in the MyISAM tables ?

      Your reply will be of great help.
      Thanks in Advance

      ReplyDelete
    2. yes there is minor problem that MyISAM didnot support Transactions... and innoDB are more relialbe on atomicity... but you can solve that problem by your own programmming design... you can achieve that by random no method.. you can achieve parallelism also ..

      ReplyDelete
    3. I like your Yoda style of speaking 99 Developer!

      ReplyDelete
    4. There IS full text search in InnoDB now.

      ReplyDelete
    5. Your comparision table is good but I d'nt agree with your comment "if there is any doubt which to use when. then MyISAM is your default choice."

      As per me if you have sufficient resources (CPU/RAM/Space) and you have any doubt that which engine to use, then go with Innodb.

      ReplyDelete
    6. i'am using very frequent insert queries. that's why my table engine is innodb.

      ReplyDelete
    7. This is a good article that just open my mind, I never really realize about the engine as I just got a major error that required me to do the research thank you.

      ReplyDelete
    8. This is useful for me. You said frequent "insert, update, select, delete" InnoDB or MyISAM. My online store project, I have new products, new members which engine should I use? Thank you.

      ReplyDelete
  9. Calling MS-SQL SP from Php
    One of the major problem that php developer faces is of calling the MS SQL Server SP..
    That thing also occur to me.. after of lot of trying I found some thing special which can be also use full for other php developer..
    Sp Name was : EXEC CREATEPRODUCT
    In : ProductNamee, Price , @ProductCode, MerchantId
    Here ProducCode was the output parameter..
    I was trying out this with AdoDb Library..

    $addProduct = $obj->ExecuteQuery("Begin;DECLARE @ProductCode as varchar (100) ;EXEC CREATEPRODUCT'$pname', '$price', @ProductCode OUTPUT, '$merchantId';select @ProductCode;End;");

    $productCode = $addProduct[0][0];

    If you see the ExecuteQuery Function I have to declares ProductCode as var char and after eexecuting the SP I have to select that ProductCode…

    I hope that this will help those Programmers which are causing problem in it
    Regards.
                
    1

    View comments

  10. <!--[if gte mso 9]> Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4

    In past few days. When I was working in my office some of my non-favouratable work has been occurred. Which of I hate of these type of work..

    Category_id

    Name

    Count

    1

    Restaurants

    56

    2

    [space]Restaurants

    54

    3

    Space &(amp;) Seas

    68

    4

    Space &(amp;) &(amp;) Seas

    425

    5

    Work—Envelope

    47

    This type of records have been retrieved from the db and I have to fix these categories.. as some of categories spaces and special characters…

    It has been done through only two type of queries …

    Which are given below which can be helpful to you also…

    1- update categories set category_name =trim(category_name) where category_name like '[Space]%' ; // here [space] means space character

    2- update categories set category_name = replace( category_name,'&(amp;)', '&') where category_name like ‘%& %' ;

    0

    Add a comment

Blog Archive
About Me
About Me
Karachi, Pakistan
Loading
Dynamic Views theme. Powered by Blogger. Report Abuse.