Today, due to development of information technology and extraordinary growth of data, it is necessary to develop new methods to query this information. ''Music Information Retrieval'' or ''music query'' is one of these challenges. Music query based on information such as title, composer or genre is possible using general search engines today, if this information is available. But if not, searching by direct musical content would be a solution in that case. In this thesis, Query By Humming (QBH) systems and the previous researches in this area have been studied. In these systems the users can search for their favorite song by just whistling or singing part of the song. Since there would be some possible errors due to false whistling, the algorithm should be robust to work in these cases. An efficient QBH system must have pitch detector, melody extractor, time-series aligner and sequence matcher. In this study, relative pitch frequencies of the notes have been used to represent the melodies instead of absolute pitch frequencies. In this manner the system is not sensitive to the beginning note, because people may whistle the song on different clefs or octaves. In addition, the Rhythm of the melodies has been taken in to account by introducing a new criterion named IoIRatio. This criterion is robust to Tempo i.e. in order to obtain an efficient music retrieval, the IoIRatio assists the system to tolerate the errors originated from different tempos between the whistled query and the original song in the database. Moreover, Dynamic Time Warping (DTW) algorithm that is based on Dynamic Programming has been employed to match the query and database songs and also to measure the similarity between them. Global constraints such as Saoko-Chiba, Itakura and SDTW algorithm have also been applied to enhance retrieval efficiency. By introducing the SDTW algorithm that behaves statistically with the sequences and considers each frequency sample as a Gaussian distribution around that sample, the retrieval efficiency has been enhanced. Moreover, dimensionality reduction approaches like FTW, PDTW and IDDTW have been applied to reduce time and computational complexity. By applying these approaches, there will be a trade-off between retrieval efficiency and time performance of the system. These approaches usually utilize PAA coefficients in accompany to DTW algorithm for representation of reduced-dimension query and melodies. Furthermore, a criterion named Mean Reciprocal Rank (MRR) has been utilized to determine accuracy level of the retrieval. These are the issues that have been evaluated and studied in this thesis. Keywords QBH system, Melody matching, Time-series alignment, Dynamic Time Warping algorithm, Saoko-Chiba and Itakura constraints, Dimensionality Reduction