หน้าเว็บ

วันอาทิตย์ที่ 14 ธันวาคม พ.ศ. 2557

ข้อสอบ O-NET

ข้อสอบ O-NET

1.ข้อใดไม่ใช่ระบบปฏิบัติการที่นำมาใช้บนอุปกรณ์พกพาประเภท Smartphone.
1.  Ubumtu      
2.  Iphone  os
3.  Android      
4.  Symbian


2. หากมีคอมพิวเตอร์อยู่แล้วอุปกรณ์ข้อใดจำเป็นต้องใช้ในการติดตั้งอินเตอร์เน็ต
ก. CD-ROM, คู่สายโทรศัพท์
ข. Modem, คู่สายโทรศัพท์
ค. CD-ROM, Scanner
ง. Modem, Scanner

3.ลิขสิทธิ์โปรแกรมประเภทรหัสเปิด (Open Source) อนุญาตให้ผู้ใช้ทำอะไรได้บ้าง
ก.  นำโปรแกรมมาใช้งานโดยไม่ต้องเสียค่าลิขสิทธิ์
ข.  ทดลองใช้โปรแกรมก่อนถ้าพอใจจึงจ่ายค่าลิขสิทธิ์
ค.  แก้ไขปรับปรุงโปรแกรมเองได้
1.  ข้อ  ก กับ  ข้อ       
2.  ข้อ    กับ  ข้อ  
3.  ข้อ    อย่างเดียว    
4.  ข้อ    อย่างเดียว

4.ระบบกระดานสนทนาหรือเว็บบอร์ดแห่งหนึ่งมีความต้องการดังนี้
ก.  ต้องให้ผู้ใช้สามารถตั้งกระทู้โต้ตอบกันได้โดยผู้ใช้ต้องแสดงตัวตน(ล็อกอิน)เพื่อเข้าระบบก่อน
ข.  ผู้ใช้สามารถตั้งกระทู้หรือเข้าไปตอบกระทู้ที่ตั้งไว้แล้วได้
ค.  ระบบจะบันทึกชื่อผู้ตั้งและผู้ตอบไว้ด้วย
ในการออกแบบฐานข้อมูลดังกล่าวข้อใดกล่าวได้ถูกต้อง.
1.  ต้องสร้างตารางผู้ใช้ ตารางกระทู้และตารางคำตอบ
2.  ไม่ต้องสร้างตารางผู้ใช้เนื่องจากสามารถบันทึกชื่อผู้ใช้ในตารางกระทู้และตารางคำตอบได้เลย
3.  ต้องสร้างตารางผู้ใช้และตารางกระทู้ส่วนคำตอบจะอยู่ในตารางกระทู้อยู่แล้ว
4.  ไม่ต้องสร้างตารางกระทู้เพราะสามารถบันทึกกระทู้ที่ผู้ใช้ตั้งในตารางผู้ใช้ได้เลย

5. ข้อใดเป็นการปฏิบัติที่ถูกต้องตามหลักวิชาการเมื่อค้นคว้าหาข้อมูลจากอินเทอร์เน็ตมาทำรายงาน.
1.  คัดลอกเนื้อหาจากเว็บไซต์
2.  ใช้เนื้อหาจากกระดานสนทนา(Web board)มาใส่ในรายงาน
3.  นำรูปภาพจากเว็บไซต์มาใส่ในรายงาน
4.  อ้างอิงชื่อผู้เขียนบทความ

6.ห้องสมุดแห่งหนึ่งต้องการพัฒนาระบบยืมหนังสือโดยสามารถบันทึกข้อมูลการยืมหนังสือลงบนบัตรอิเล็กทรอนิกส์โดยไม่ต้องเขียนด้วยมือระบบนี้ควรใช้เทคโนโลยีในข้อใด
1.  Smart  Card         
2.  Fingerprint
3.  Barcode                
4.  WiFi

7.ผู้ประกอบอาชีพเป็นผู้พัฒนาเว็บไซต์ต้องเชี่ยวชาญความรู้ด้านใดบ้างจากตัวเลือกต่อไปนี้.
ก.  ฮาร์แวร์คอมพิวเตอร์                  ข.  ระบบปฎิบัติการ
ค.  เว็บเซิร์ฟเวอร์                          ง.  HTML
จ.  ระบบฐานข้อมูล                      ฉ.  ภาษาจาวา (Java)
1.  ข้อ  ก และ ค                    
2.  ข้อ    และ  
3.  ข้อ    และ                    
4.  ข้อ    และ  

8.ข้อใดเป็นเทคโนโลยีการเชื่อมต่อข้อมูลไร้สายทั้งหมด.
1.  Wi-Fi  ,  IP             
2.  Wi-Fi  ,Bluetooth
3.  3G  ADSL                
4.  3G    Ethernet

9.ข้อใดไม่ใช่ข้อเสียของการละเมิดลิขสิทธิ์ซอฟต์แวร์.
1.  การทำผิดกฎหมายลิขสิทธิ์มีความผิดทางอาญา
2.  เป็นช่องทางหนึ่งในการระบาดของไวรัสคอมพิวเตอร์
3.  ผู้ใช้จะไม่ได้รับการบริการจากผู้พัฒนาถ้าหากมีปัญหาการใช้งาน
4.  ทำให้ผู้พัฒนาซอฟแวร์ไม่มีรายได้เพื่อประกอบการและพัฒนาต่อไปได้

10. ข้อใดต่อไปนี้ถูกต้องที่สุด.
1.  การบันทึกข้อมูลลงแผ่นดีวีดีใช้เทคโนโลยีแบบแม่เหล็ก
2.  หมายเลขไอพีเป็นหมายเลขที่ใช้กำกับ  Network Interce Card
3.  หน่วยความจำสำรองเป็นหน่วยความจำที่มีคุณลักษณะแบบ Volntile
4.  รหัส ACIIและEBCIDICเป็นการวางรหัสตัวอักษรที่ใช้ขนาด  8 บิต

คำสั่ง sql


SQL WHERE
เป็นคำสั่งที่ใช้สำหรับการระบุเงื่อนไขการเลือกข้อมูลในตาราง (Table) คำสั่ง SQL WHERE สามารถระบุเงื่อนไขในการเลือกข้อมูลได้ 1 เงื่อนไข หรือมากกว่า 1 เงื่อนไข
Database : MySQL,Microsoft Access,SQL Server,Oracle
Syntax
SELECT Column1, Column2, Column3,... FROM Table-Name WHERE [Field] = 'Value'
Table : customer

CustomerID
Name
Email
CountryCode
Budget
Used
C001
Win Weerachai
win.weerachai@thaicreate.com
TH
1000000
600000
C002
John Smith
john.smith@thaicreate.com
EN
2000000
800000
C003
Jame Born
jame.born@thaicreate.com
US
3000000
600000
C004
Chalee Angel
chalee.angel@thaicreate.com
US
4000000
100000

ตัวอย่าง การเลือกข้อมูลโดยใช้ Operators = (เท่ากับ) 
SELECT * FROM customer WHERE CountryCode = 'US'
หรือ แบบ 2 เงื่อนไข ใช้ and เข้ามาเชื่อม วลี
SELECT * FROM customer WHERE CountryCode = 'US' and Budget = '4000000'
Output

CustomerID
Name
Email
CountryCode
Budget
Used
C003
Jame Born
jame.smith@thaicreate.com
US
3000000
600000
C004
Chalee Angel
chalee.angel@thaicreate.com
US
4000000
100000

CustomerID
Name
Email
CountryCode
Budget
Used
C004
Chalee Angel
chalee.angel@thaicreate.com
US
4000000
100000

SQL SUB SELECT QUERY
เป็นคำสั่งที่ใช้สำหรับการระบุเงื่อนไขการเลือกข้อมูลในตาราง (Table) โดยใช้เลือกข้อมูลย่อยภายใน SELECT ย่อยอีกชั้นหนึ่งครับSUB SELECT QUERY เข้ามาช่วยในด้านความสะดวกและง่ายกว่าการ JOIN TABLE แต่ข้อเสียของ SUB SELECT คือ สามารถทำงานได้ช้ากว่า JOIN TABLE
Database : MySQL,Microsoft Access,SQL Server,Oracle
Syntax
SELECT Column1,Column2,Column3,... FROM [Table-Name] WHERE [Field] IN (SELECT ..... FROM ....)
Table : customer
CustomerID
Name
Email
CountryCode
Budget
Used
C001
Win Weerachai
win.weerachai@thaicreate.com
TH
1000000
600000
C002
John Smith
john.smith@thaicreate.com
EN
2000000
800000
C003
Jame Born
jame.born@thaicreate.com
US
3000000
600000
C004
Chalee Angel
chalee.angel@thaicreate.com
US
4000000
100000

Table : audit 

AuditID
CustomerID
Date
Used
1
C001
2008-07-01
100000
2
C001
2008-07-05
200000
3
C001
2008-07-10
300000
4
C002
2008-07-02
400000
5
C002
2008-07-07
100000
6
C002
2008-07-15
300000
7
C003
2008-07-20
400000
8
C003
2008-07-25
200000
9
C004
2008-07-04
100000

ตัวอย่าง การเลือกข้อมูลตาราง customer ที่เชื่อมโยงกับตาราง audit ที่มีการใช้ยอดเงินในแต่ล่ะครั้งมากกว่า 400000

SELECT * FROM customer WHERE CustomerID IN (SELECT CustomerID FROM audit WHERE Used >= '400000')
Output

CustomerID
Name
Email
CountryCode
Budget
Used
C002
John Smith
john.smith@thaicreate.com
EN
2000000
800000
C003
Jame Born
jame.smith@thaicreate.com
US
3000000
600000

SQL OR AND 
เป็นคำสั่งที่ใช้สำหรับการระบุเงื่อนไขการเลือกข้อมูลในตาราง (Table) การเชื่อมวลีสำหรับเงื่อนไขต่าง ๆ
Database : MySQL,Microsoft Access,SQL Server,Oracle
Syntax
SELECT Column1,Column2,Column3,... FROM [Table-Name] WHERE [Field] = 'Value' [AND/OR] [Field] = 'Value'
Table : customer
CustomerID
Name
Email
CountryCode
Budget
Used
C001
Win Weerachai
win.weerachai@thaicreate.com
TH
1000000
600000
C002
John Smith
john.smith@thaicreate.com
EN
2000000
800000
C003
Jame Born
jame.born@thaicreate.com
US
3000000
600000
C004
Chalee Angel
chalee.angel@thaicreate.com
US
4000000
100000

ตัวอย่าง การเลือกข้อมูลที่ CountryCode = US และ Used = 100000 
SELECT * FROM customer WHERE CountryCode = 'US' AND Used = '100000'
หรือ
SELECT * FROM customer WHERE CountryCode = 'TH' OR CountryCode = 'EN'
Output

CustomerID
Name
Email
CountryCode
Budget
Used
C004
Chalee Angel
chalee.angel@thaicreate.com
US
4000000
100000

CustomerID
Name
Email
CountryCode
Budget
Used
C001
Win Weerachai
win.weerachai@thaicreate.com
TH
1000000
600000
C002
John Smith
john.smith@thaicreate.com
EN
2000000
800000

SQL BETWEEN
เป็นคำสั่งที่ใช้สำหรับการระบุเงื่อนไขการเลือกข้อมูลในตาราง (Table) โดยทำการเลือกเงื่อนไขที่อยู่ระหว่างค่าเริ่มต้นและค่าสิ้นสุด
Database : MySQL,Microsoft Access,SQL Server,Oracle
Syntax
SELECT Column1,Column2,Column3,... FROM [Table-Name] WHERE [Field] BETWEEN [Value-Start] AND [Value-End]
Table : customer
CustomerID
Name
Email
CountryCode
Budget
Used
C001
Win Weerachai
win.weerachai@thaicreate.com
TH
1000000
600000
C002
John Smith
john.smith@thaicreate.com
EN
2000000
800000
C003
Jame Born
jame.born@thaicreate.com
US
3000000
600000
C004
Chalee Angel
chalee.angel@thaicreate.com
US
4000000
100000

ตัวอย่าง การเลือกข้อมูลที่ Budget ที่มีค่าตั้งแต่ 1000000 - 3000000 
SELECT * FROM customer WHERE Budget BETWEEN '1000000' AND '3000000'
Output

CustomerID
Name
Email
CountryCode
Budget
Used
C001
Win Weerachai
win.weerachai@thaicreate.com
TH
1000000
600000
C002
John Smith
john.smith@thaicreate.com
EN
2000000
800000
C003
Jame Born
jame.smith@thaicreate.com
US
3000000
600000

SQL COUNT
เป็นคำสั่งที่ใช้สำหรับการระบุเงื่อนไขการเลือกข้อมูลในตาราง (Table) โดยทำการนับจำนวน Count Record ที่ค้นพบ
Database : MySQL,Microsoft Access,SQL Server,Oracle
Syntax
SELECT COUNT(Column/Field) AS [New-Field] FROM [Table-Name]
Table : customer
CustomerID
Name
Email
CountryCode
Budget
Used
C001
Win Weerachai
win.weerachai@thaicreate.com
TH
1000000
600000
C002
John Smith
john.smith@thaicreate.com
EN
2000000
800000
C003
Jame Born
jame.born@thaicreate.com
US
3000000
600000
C004
Chalee Angel
chalee.angel@thaicreate.com
US
4000000
100000

ตัวอย่าง การเลือกข้อมูลจำนวนลูกค้าทั้งหมด
SELECT COUNT(CustomerID) AS CountCustomerID FROM customer
Output 
CountCustomerID
4

SQL OUTER JOIN
เป็นคำสั่งที่ใช้สำหรับการระบุเงื่อนไขการเลือกข้อมูลในตาราง (Table) โดยเงื่อนไขการ OUTER JOIN จะทำการเลือกข้อมูลหลักและข้อมูลเชื่อมโยงที่สัมพันธ์กัน โดยจะทำการอิงจาก Table แรกและ Table สอง ถ้าไม่มีข้อมูลใน Table แรก และ Table สองที่เชื่อมโยงกัน ข้อมูล Table แรกและ Table สอง จะไม่ถูกสนใจ
Database : Microsoft Access,SQL Server,Oracle
Syntax

SELECT [Table-Name1].Column1, [Table-Name2].Column1,... FROM [Table-Name1],[Table-Name2]
WHERE [Table-Name1].Column (+)= [Table-Name2].Column
Table : customer
CustomerID
Name
Email
CountryCode
Budget
Used
C001
Win Weerachai
win.weerachai@thaicreate.com
TH
1000000
600000
C002
John Smith
john.smith@thaicreate.com
EN
2000000
800000
C003
Jame Born
jame.born@thaicreate.com
US
3000000
600000
C004
Chalee Angel
chalee.angel@thaicreate.com
US
4000000
100000
C006
Superman Return
supermain.return@thaicreate.com
US
2000000
0

Table : audit
AuditID
CustomerID
Date
Used
1
C001
2008-07-01
100000
2
C001
2008-07-05
200000
3
C001
2008-07-10
300000
4
C002
2008-07-02
400000
5
C002
2008-07-07
100000
6
C002
2008-07-15
300000
7
C003
2008-07-20
400000
8
C003
2008-07-25
200000
9
C004
2008-07-04
100000
10
C005
2008-07-04
200000

ตัวอย่าง การเลือกข้อมูลแบบเชื่อมตาราง customer และ audit 
SELECT customer.*,audit.* FROM customer,audit
WHERE customer.CustomerID (+)= audit.CustomerID
Output

CustomerID
Name
Email
CountryCode
Budget
Used
AuditID
CustomerID
Date
Used
C001
Win Weerachai
win.weerachai@thaicreate.com
TH
1000000
600000
1
C001
2008-08-01
100000
C001
Win Weerachai
win.weerachai@thaicreate.com
TH
1000000
600000
2
C001
2008-08-05
200000
C001
Win Weerachai
win.weerachai@thaicreate.com
TH
1000000
600000
3
C001
2008-08-10
300000
C002
John Smith
john.smith@thaicreate.com
EN
2000000
800000
4
C002
2008-08-02
400000
C002
John Smith
john.smith@thaicreate.com
EN
2000000
800000
5
C002
2008-08-07
100000
C002
John Smith
john.smith@thaicreate.com
EN
2000000
800000
6
C002
2008-08-15
300000
C003
Jame Born
jame.smith@thaicreate.com
US
3000000
600000
7
C003
2008-08-20
400000
C003
Jame Born
jame.smith@thaicreate.com
US
3000000
600000
8
C003
2008-08-25
200000
C004
Chalee Angel
chalee.angel@thaicreate.com
US
4000000
100000
9
C004
2008-07-04
100000

SQL LEFT JOIN
เป็นคำสั่งที่ใช้สำหรับการระบุเงื่อนไขการเลือกข้อมูลในตาราง (Table) โดยเงื่อนไขการ LEFT JOIN จะทำการเลือกข้อมูลหลักและข้อมูลเชื่อมโยงที่สัมพันธ์กัน โดยจะทำการอิงจาก Table แรกสำคัญก่อน ถ้าไม่มีข้อมูลใน Table แรก ข้อมูล Table สองจะไม่ถูกสนใจและจะสนใจข้อมูลแค่ Table แรกเท่านั้น
Database : MySQL,Microsoft Access,SQL Server,Oracle
Syntax
SELECT [Table-Name1].Column1, [Table-Name2].Column1,... FROM [Table-Name1]
LEFT JOIN [Table-Name2] ON [Table-Name1].Column = [Table-Name2].Column
Table : customer
CustomerID
Name
Email
CountryCode
Budget
Used
C001
Win Weerachai
win.weerachai@thaicreate.com
TH
1000000
600000
C002
John Smith
john.smith@thaicreate.com
EN
2000000
800000
C003
Jame Born
jame.born@thaicreate.com
US
3000000
600000
C004
Chalee Angel
chalee.angel@thaicreate.com
US
4000000
100000
C006
Superman Return
supermain.return@thaicreate.com
US
2000000
0

Table : audit
AuditID
CustomerID
Date
Used
1
C001
2008-07-01
100000
2
C001
2008-07-05
200000
3
C001
2008-07-10
300000
4
C002
2008-07-02
400000
5
C002
2008-07-07
100000
6
C002
2008-07-15
300000
7
C003
2008-07-20
400000
8
C003
2008-07-25
200000
9
C004
2008-07-04
100000
10
C005
2008-07-04
200000

ตัวอย่าง การเลือกข้อมูลแบบ LEFT JOIN ตาราง customer และ audit 
SELECT customer.*,audit.* FROM customer
LEFT JOIN audit ON customer.CustomerID = audit.CustomerID
Output

CustomerID
Name
Email
CountryCode
Budget
Used
AuditID
CustomerID
Date
Used
C001
Win Weerachai
win.weerachai@thaicreate.com
TH
1000000
600000
1
C001
2008-08-01
100000
C001
Win Weerachai
win.weerachai@thaicreate.com
TH
1000000
600000
2
C001
2008-08-05
200000
C001
Win Weerachai
win.weerachai@thaicreate.com
TH
1000000
600000
3
C001
2008-08-10
300000
C002
John Smith
john.smith@thaicreate.com
EN
2000000
800000
4
C002
2008-08-02
400000
C002
John Smith
john.smith@thaicreate.com
EN
2000000
800000
5
C002
2008-08-07
100000
C002
John Smith
john.smith@thaicreate.com
EN
2000000
800000
6
C002
2008-08-15
300000
C003
Jame Born
jame.smith@thaicreate.com
US
3000000
600000
7
C003
2008-08-20
400000
C003
Jame Born
jame.smith@thaicreate.com
US
3000000
600000
8
C003
2008-08-25
200000
C004
Chalee Angel
chalee.angel@thaicreate.com
US
4000000
100000
9
C004
2008-07-04
100000
C006
Superman Return
supermain.return@thaicreate.com
US
2000000
0
NULL
NULL
NULL
NULL

SQL DISTINCT
เป็นคำสั่งที่ใช้สำหรับการระบุเงื่อนไขการเลือกข้อมูลในตาราง (Table) โดยทำการเลือกข้อมูลที่ซ้ำกันมาเพียงแค่ Record เดียว
Database : MySQL,Microsoft Access,SQL Server,Oracle
Syntax
SELECT DISTINCT Column1,Column2,Column3,... FROM [Table-Name]
Table : customer
CustomerID
Name
Email
CountryCode
Budget
Used
C001
Win Weerachai
win.weerachai@thaicreate.com
TH
1000000
600000
C002
John Smith
john.smith@thaicreate.com
EN
2000000
800000
C003
Jame Born
jame.born@thaicreate.com
US
3000000
600000
C004
Chalee Angel
chalee.angel@thaicreate.com
US
4000000
100000

ตัวอย่าง การเลือกข้อมูล CountryCode ที่ไม่ซ้ำกัน 
SELECT DISTINCT CountryCode FROM customer
Output 
CountryCode
TH
EN
US

SQL INSERT
เป็นคำสั่งที่ใช้สำหรับเพิ่มข้อมูลลงในตาราง (Table) โดยสามารถเพิ่มได้ทั้งแถวหรือว่าเพิ่มในส่วนของแต่ละฟิวด์
Database : MySQL,Microsoft Access,SQL Server,Oracle
Syntax
INSERT INTO [Table-Name] (Column1,Column2,Column3,...) VALUES ('Value1','Value2','Value3',...)
Table : country
CountryCode
CountryName
TH
Thailand
EN
English
US
United states

ตัวอย่าง การเพิ่มข้อมูลลงใน Table 
INSERT INTO country VALUES ('CH','Chaina')
หรือ
INSERT INTO country (CountryCode,CountryName) VALUES ('CH','Chaina')
Output 
CountryCode
CountryName
TH
Thailand
EN
English
US
United states
CH
Chaina

SQL LIMIT
เป็นคำสั่งที่ใช้สำหรับการระบุเงื่อนไขการเลือกข้อมูลในตาราง (Table) ที่สามารถกำหนดจำนวน Record ที่แสดงผลออกมาได้
Database : MySQL
Syntax
SELECT Column1, Column2, Column3,... FROM [Table-Name] ORDER BY [Fields] [ASC/DESC] LIMIT [Int-Start] , [Int-End]
Table : customer
CustomerID
Name
Email
CountryCode
Budget
Used
C001
Win Weerachai
win.weerachai@thaicreate.com
TH
1000000
600000
C002
John Smith
john.smith@thaicreate.com
EN
2000000
800000
C003
Jame Born
jame.born@thaicreate.com
US
3000000
600000
C004
Chalee Angel
chalee.angel@thaicreate.com
US
4000000
100000

ตัวอย่าง การเลือกข้อมูลที่มีการใช้ยอดเงินมากที่สุดจำนวน 2 Record 
SELECT * FROM customer ORDER BY Used DESC LIMIT 0,2
Output 
CustomerID
Name
Email
CountryCode
Budget
Used
C002
John Smith
john.smith@thaicreate.com
EN
2000000
800000
C001
Win Weerachai
win.weerachai@thaicreate.com
TH
1000000
600000
 

(http://www.thaicreate.com/tutorial/sql.html)