Posts

Showing posts from September, 2014

Database for Lab test(mySQL)

Image
Database ရဲ့ 2012 က practical test ေမးခြန္းေလးပါ... Lab test အတြက္အဆင္ေၿပေအာင္ ဒီေမးခြန္းေလးကို အဆင့္လိုက္ၿပန္ေၿဖေပးထားပါတယ္... #Question# (1)Create the following tables which contain the following associated fields.                Suppliers (sid CHAR(5),sname CHAR(20),address CHAR(20))                Parts (pid CHAR(5),pname CHAR(20),color(10))                Catalog (sid CHAR(5),pid CHAR(5),cost NUMBER) (2)Fill the following data into tables.               Suppliers                       Sid  Sname  address                      S1 Esther London                      S2 James Paris                 ...

DBMS Lab Test [OQ Answer]

ေမးခြန္းက ဒီမွာပါ ... Download ေမးခြန္းက ပထမဆံုး JJCOFFEESHOP ဆိုတဲ့ Database တစ္ခုေဆာက္ခိုင္းတယ္။ အဲဒီမွာ username နဲ့ password ပါထည့္ခိုင္းတယ္။ username နဲ့ password ထည့္တာကို မႏွစ္က မသင္ဘဲနဲ့ ေမးသြားတယ္...ေတာ္ေတာ္မ်ားမ်ားတိုင္ပတ္ကုန္တာေပါ့ဗ်ာ.... အခုေတာ့ လြယ္သြားပါျပီ။ ပထမဆံုး JJCOFFEESHOP ဆိုတဲ့ Database တစ္ခုေဆာက္မယ္ဗ်ာ... mysql> CREATE DATABASE JJCOFFEESHOP; mysql> USE JJCOFFEESHOP; ေအာက္က use JJCOFFEESHOP ဆိုတာက ကြ်န္ေတာ္တို ့ေဆာက္ထားတဲ့ JJCOFFEESHOP ကို သံုးမယ္ေပါ့ဗ်ာ. ျပီးရင္ username နဲ ့ password ေပးမယ္... mysql> CREATE USER 3CS00 IDENTIFIED BY 'passwd'; အဲဒီမွာ 3CS00 ဆိုတာက username ျဖစ္ျပီးေတာ့ passwd က password ပါ။ သတိထားရမွာက password ကို single qoute (') နဲ့ ေရးရမွာပါ..အဖြင့္ေကာ အပိတ္ေကာေပါ့။ အဲလိုမဟုတ္ရင္ error ျပေနလိမ့္မယ္။ ေနာက္တစ္ခုက ကြ်န္ေတာ္တို ့DB ထဲမွာ table ေတြထည့္မယ္။ ထည့္ရမယ့္ Table ေတြက ေမးခြန္းမွာပါျပီးသားပါ..။ Table 3 ခုရွိတယ္... CUSTOMER ရယ္ ITEM ရယ္ SALE ရယ္။ အရင္ဆံုး CUSTOMER Table ကိုအရင္ထည့္မယ္။ mysql> CREATE TABLE ...