Hamster
Search
Open menu
熟悉傳統數據庫概念及 SQL
1. Which of the following is the best description for a database?
A.
A database directly contains some records.
B.
A database directly contains some rows.
C.
A database directly contains some tables.
D.
A database directly contains some columns.
2. Which of the following SQL statements is the correct one to copy rows from another tables?
A.
Insert into sales(item_id,name,price)on select order_id,mane ,price from orders;
B.
Insert into sales(item_id,name,price)as select order_id,name,price from order;
C.
Insert into sales(item_id,name,price)select order_id,name,price from orders;
D.
Insert into sales(item_id,name,price)values (Select order_id,name,price from orders);
3. How to create a table?
A.
create table { id integer; name varchar(20)}
B.
create table ( id integer primary key, name varchar(20));
C.
class table { id: integer; name: String; }
D.
create table ( id integer primary key; name varchar(20));
4. Which of the following is suitable to use index?
A.
Table with many modifications but few actual queries
B.
Many duplicate rows
C.
Columns often be used in ORDER BY clause
D.
Table with few rows
5. Which of the following may be a valid SQL statement?
A.
choose name, id from students if name='paul' && age>20;
B.
select * from students where name='paul' and age>20;
C.
select students if name='paul' && age>20;
D.
get students where name='paul' and age>20;
6. In creating a database, this is the process of organizing it into tables in such a way that the results of using the database are always unambiguous.
A.
data modeling
B.
normalization
C.
virtual organization
D.
probability
7. Which of the following is a standard interactive and programming language for getting information from and updating a database?
A.
Dynamic Query Language (DQL)
B.
National Query Language (NQL)
C.
JAVA
D.
Structured Query Language (SQL)
8. Each record in the products table has a product ID, a product name and a price. How to calculate the numbers of products whose prices are greater than $100?
A.
select count(*) from products wehre price > 100;
B.
select total(*) from products for price > 100;
C.
select sum(*) from products where price > 100;
D.
select total(*) from products if price > 100;
9. Which of the following is not a many-to-many relationship?
A.
Customer and Restaurant
B.
Husband and wife
C.
Patient and Doctor
D.
Student and Teacher
10. Each record in the products table has a product ID, a product name and a price. How to double the prices of all products?
A.
update products price = 2*price;
B.
update products set price = 2*price;
C.
update price = 2*price from products;
D.
update products by price = 2*price;