Monday, December 24, 2012

SQL සිංහලෙන් - පලමු පියවර

SQL එහෙමත් නැත්නම් Structured Query Language කියන්නෙ ඩේටාබේස් වලදි දත්ත හසුරුවන්න භාවිතා කරන විශේෂ භාෂාවක්. ඒ වගේම SQL සම්මතයක් බවට පත්වෙලයි තියෙන්නෙ. MySQL, SQL server, Oracle, Access කියන්නෙ මේ සම්මතය අනුගමනය කරන දත්ත කලමණාකරන පද්ධති (Database Management System - DBMS) කිහිපයක්.

SQL  සම්මතයක් වන නිසාම එය අනුගමනය කරන DBMS වල SELECT, UPDATE, DELETE, INSERT, WHERE වැනි විධාන වල සමානත්වයක් තියෙනව. කෙසේවෙතත් ඒ ඒ DBMS වලට අනන්‍යවූ විධානයන්ද දකින්න පුළුවන්.

MySQL කියන්නෙ SQL සම්මතය අනූව යන DBMS වලින් වඩාත්ම ජනප්‍රියම සහ බහුලවම භාවිතාවෙ පද්ධතිය. ඒකට එක හේතුවක් තමයි MySQL නිදහස් හා විවෘත්ත (Free and Open Source) ගණයට අයත්වීම.
ඒ නිසා අපි  අපේ පාඩම MySQL වලින් කරගෙන යමු.

මුදිතගෙ PHP පාඩම් වලට සම්බන්ධ වෙනව නම් මේ වෙද්දි wamp දාගෙන ඇති. වින්ඩෝස් පාවිච්චි කරන කෙනෙක් නම් මෙතනින් wamp දාගන්න විදිය කියලදෙන ඒ ලිපිය බලන්න. wamp එක්ක MySQL තියන නිසා කරදරයක් නෑ.

ලිනක්ස් පාවිච්චි කරන අයව අමතක කරල බෑ නෙ. ටර්මිනල් එක අරගෙන උබුන්ටු නම්
sudo apt-get install mysql-server
ෆෙඩෝරා නම්
yum install mysql-server
දැන් කොහොමද  MySQL රන් කරන්නෙ. wamp පාවිචිකරනව නම් පහත රූපයේ විදියට wamp අයිකනය ක්ලික් කරල එන මෙනුවෙන්  MySQL >> MySQL console තෝරන්න.

ලිනක්ස් නම් ටර්මිනල් එතට ගිහින් මේ කමාන්ඩ් එක රන් කරන්න.
mysql -uroot -proot
වැඩේ හරි නම් මේ විදියට MySQL console එක දැකගන්න පුළුවන්.
 

මේ විදියට MySQL දාගත්තනම් දැන් වැඩේ පටන්ගන්න පුළුවන්. MySQL දාගන්න විදිය බොහොම කෙටියෙන් කිව්වෙ. කරගෙන යද්දි ගැටළු ආවොත් කමෙන්ට් එකකින් හරි facebook group එකෙන් අහන්නකො.

සරල විධාන කීපයක් කරල බලමු. දැනට තියන ඩේටාබේස් මොනවද කියල බලාගන්න
show databases;
මෙම විධානය ක්‍රියාත්මක කලවිට පහත පරිදි දැනට තියන ඩේටාබේස් ලිස්ට් එකක් බලාගන්න පුළුවන්.

 මීලඟට  විධානය ක්‍රියාත්මක කලයුතු ඩේටාබේස් එක තොරාගතයුතුයි. ඒ සඳහා යොදාගන්නේ use විධානයයි. උදාහරණයක් ලෙස අපට information_schema ඩේටාබේස් එක තොරාගතයුතු නම්
 use information_schema;
 information_schema ඩේටාබේස් එක තුල ඇති tables බලාගතයුතු නම්
show tables;
 මෙවිට  information_schema ඩේටාබේස් එක තුල ඇති tables ලිස්ට් එක්ක දැකගත හැක.  information_schema ඩේටාබේස් එක තුල ඇති character_sets නැමති table එකෙහි ඇති සියළුම දත්ත ලබාගැනීමට
select * from character_sets;

මෙම සරල විධාන කිහිපය අත්හදා බලන්නග. මීලඟ ලිපි වලින් වැඩිදුර විස්තර කතාකරමු

68 comments:

  1. එල එල මචෝ... දිගටම ලියමු.

    ReplyDelete
  2. මම අද තමයි මෙකට ආවෙ.නියමයි.දිගටම ලියන්න..සුභ පතනව.

    ReplyDelete
  3. XAMP ගැනත් ලිව්වානම් හොදයි නේද ? හොද උත්සාහයක්.ජය

    ReplyDelete
    Replies
    1. ඉදිරි ලිපියකින් XAMP ගැනත් ලියන්නමිකො. ස්තූතියි අපිව දිරිමත් කරනවට. දිගටම අපිත් එක්ක ඉන්නකො

      Delete
  4. මරු ...තව දුර යන්න සුබපැතුම් !!!!!

    ReplyDelete
  5. මම සොෆ්ට්වෙයා ඉන්ජිනේරීන් ආසා කරන විශයක්. ලියන්න දිගටම කියවන්න එකතු වෙනවා.

    ReplyDelete
  6. එල එල දිගටම ලියන්න අය්යේ......
    මේ SQL පාඩම් A/L ICT කරන අයට ගොඩක් වැදගත් වෙනවා...
    ඔයාල Python ගැනත් ලිව්වනම් තවත් නියමයි............

    ReplyDelete
  7. Nicrosoft SQL server eken karana hati liyala post danna puluwannam godak loku udawwak

    ReplyDelete
  8. Hi, Great.. Tutorial is just awesome..It is really helpful for a newbie like me.. I am a regular follower of your blog. Really very informative post you shared here. Kindly keep blogging. If anyone wants to become a Front end developer learn from Javascript Training in Chennai . or Javascript Training in Chennai. Nowadays JavaScript has tons of job opportunities on various vertical industry. ES6 Training in Chennai

    ReplyDelete
  9. I really enjoy simply reading all of your weblogs. Simply wanted to inform you that you have people like me who appreciate your work. Definitely a great post I would like to read this
    Data Science course in Chennai
    Data science course in bangalore
    Data science course in pune
    Data science online course
    Data Science Interview questions and answers
    Data Science Tutorial
    Data science course in bangalore

    ReplyDelete
  10. Nice blog,I understood the topic very clearly,And want to study more like this.
    Data Scientist Course

    ReplyDelete
  11. Nice blog Post ! This post contains very informative and knowledgeable. Thanks for sharing the most valuable information.
    Hadoop Training in Hyderabad

    ReplyDelete
  12. Expected to form you an almost no word to thank you once more with respect to the decent recommendations you've contributed here.
    Machine Learning Training In Hyderabad

    Machine Learning Course In Hyderabad

    ReplyDelete
  13. Cool stuff you have and you keep overhaul every one of us

    data science course

    ReplyDelete
  14. I have to search sites with relevant information on given topic and provide them to teacher our opinion and the article.

    Simple Linear Regression

    Correlation vs Covariance

    ReplyDelete
  15. Thank you so much for this incredible guide. This has given me so much information
    AI Training in Hyderabad

    ReplyDelete
  16. Tutorial is just awesome..It is really helpful for a newbie like me.. I am a regular follower of your blog. Really very informative post you shared here.

    Java training in Chennai

    Java training in Bangalore

    Java training in Hyderabad

    Java Training in Coimbatore

    Java Online Training

    ReplyDelete
  17. Nice! you are sharing such helpful and easy to understandable blog. i have no words for say i just say thanks because it is helpful for me.Very interesting to read this article.I would like to thank you for the efforts you had made for writing this awesome article.
    Data Science Training In Chennai

    Data Science Online Training In Chennai

    Data Science Training In Bangalore

    Data Science Training In Hyderabad

    Data Science Training In Coimbatore

    Data Science Training

    Data Science Online Training

    ReplyDelete
  18. The Basics You Have Explained Was Good.Thanks For Sharing The Content With Us.

    Python Training Course Institute in Hyderabad

    ReplyDelete
  19. Great post i must say and thanks for the information. Education is definitely a sticky subject. However, is still among the leading topics of our time. I appreciate your post and look forward to more.

    Simple Linear Regression

    Correlation vs Covariance

    ReplyDelete
  20. Very interesting to read this article.I would like to thank you for the efforts you had made for writing this awesome article. This article inspired me to read more. keep it up.
    Correlation vs Covariance
    Simple linear regression
    data science interview questions

    ReplyDelete
  21. Attend The Data Scientist Courses From ExcelR. Practical Data Scientist Courses Sessions With Assured Placement Support From Experienced Faculty. ExcelR Offers The Data Scientist Courses. Data Scientist Courses

    ReplyDelete
  22. Thanks for posting useful information.You have provided an nice article,

    Data Science Training in Hyderabad

    ReplyDelete
  23. thanks for sharing your expertise and also the time it took to post!!

    AWS Training in Hyderabad

    ReplyDelete
  24. Excellent post.I want to thank you for this informative read, I really appreciate sharing this great post.Keep up your work

    Data Science Training in Hyderabad

    ReplyDelete
  25. I have to search sites with relevant information on given topic and provide them to teacher our opinion and the article.

    Simple Linear Regression

    Correlation vs covariance

    KNN Algorithm

    Logistic Regression explained

    ReplyDelete
  26. Very nice blogs!!! i have to learning for lot of information for this sites…Sharing for wonderful information.Thanks for sharing this valuable information to our vision. You have posted a trust worthy blog keep sharing, data sciecne course in hyderabad

    ReplyDelete
  27. Attend The Data Analyst Course From ExcelR. Practical Data Analyst Course Sessions With Assured Placement Support From Experienced Faculty. ExcelR Offers The Data Analyst Course.
    Data Analyst Course

    ReplyDelete
  28. This was a very informative article, indeed loved to read and clear my doubts. Keep us posted a lot more blogs. Also check out our blog pages too.

    data science training in chennai

    ccna training in chennai

    iot training in chennai

    cyber security training in chennai

    ethical hacking training in chennai

    ReplyDelete

  29. Very awesome!!! When I searched for this I found this website at the top of all blogs in search engines.

    Data Science Training in Hyderabad

    ReplyDelete
  30. This is an excellent post I seen thanks to share it. It is really what I wanted to see hope in future you will continue for sharing such a excellent post.
    data scientist course in hyderabad

    ReplyDelete
  31. Thanks for posting the best information and the blog is very helpful.data science interview questions and answers

    ReplyDelete
  32. Highly appreciable regarding the uniqueness of the content. This perhaps makes the readers feels excited to get stick to the subject. Certainly, the learners would thank the blogger to come up with the innovative content which keeps the readers to be up to date to stand by the competition. Once again nice blog keep it up and keep sharing the content as always.

    Data Science Course in Bhilai

    ReplyDelete
  33. Fantastic blog extremely good well enjoyed with the incredible informative content which surely activates the learners to gain the enough knowledge. Which in turn makes the readers to explore themselves and involve deeply in to the subject. Wish you to dispatch the similar content successively in future as well.

    data science training in bhilai

    ReplyDelete
  34. Extremely overall quite fascinating post. I was searching for this sort of data and delighted in perusing this one. Continue posting. A debt of gratitude is in order for sharing. python course in delhi

    ReplyDelete
  35. I was just examining through the web looking for certain information and ran over your blog.It shows how well you understand this subject. Bookmarked this page, will return for extra. data science course in vadodara

    ReplyDelete
  36. Extremely overall quite fascinating post. I was searching for this sort of data and delighted in perusing this one. Continue posting. A debt of gratitude is in order for sharing. cloud computing course in nagpur

    ReplyDelete
  37. Very nice job... Thanks for sharing this amazing and educative blog post!
    data science training in malaysia

    ReplyDelete
  38. I am really happy to say it’s an interesting post to read . I learn new information from your article , you are doing a great job . Keep it up

    Devops Training in Hyderabad

    Hadoop Training in Hyderabad

    Python Training in Hyderabad

    Tableau Training in Hyderabad

    Selenium Training in Hyderabad

    ReplyDelete
  39. Awesome blog. I enjoyed reading your articles. This is truly a great read for me. I have bookmarked it and I am looking forward to reading new articles. Keep up the good work!ethical hacking course in delhi

    ReplyDelete
  40. Excellent post.I want to thank you for this informative read, I really appreciate sharing this great post.Keep up your work
    data science course in malaysia

    ReplyDelete
  41. Really nice and interesting post. I was looking for this kind of information and enjoyed reading this one.
    data science course in malaysia

    ReplyDelete
  42. Nice blog and absolutely outstanding. You can do something much better but i still say this perfect.Keep trying for the best.
    data analytics course in hyderabad

    ReplyDelete
  43. You completed certain reliable points there. I did a search on the subject and found nearly all people will agree with your blog.
    data science course in hyderabad

    ReplyDelete
  44. I found Hubwit as a transparent s ite, a social hub which is a conglomerate of Buyers and Sellers who are ready to offer online digital consultancy at decent cost. data analytics course in mysore

    ReplyDelete
  45. You actually make it look so easy with your performance but I find this matter to be actually something which I think I would never comprehend. It seems too complicated and extremely broad for me. I'm looking forward for your next post, I’ll try to get the hang of it! data scientist course in mysore

    ReplyDelete
  46. Truly overall quite fascinating post. I was searching for this sort of data and delighted in perusing this one. Continue posting. Much obliged for sharing.data scientist course in bhopal

    ReplyDelete
  47. You’re so interesting! I don’t believe I’ve truly read something like this before. So great to find someone with genuine thoughts on this issue. Really.. many thanks for starting this up. This website is something that’s needed on the internet, someone with some originality!

    CBSE Schools In Khanna
    CBSE Schools In Mansa
    CBSE Schools In Moga
    CBSE Schools In Mohali
    CBSE Schools In Muktsar
    CBSE Schools In Nawanshahr
    CBSE Schools In Agra
    CBSE Schools In Aligarh
    CBSE Schools In Amethi
    CBSE Schools In Auraiya

    ReplyDelete