Hamster
Search
Open menu
熟悉傳統數據庫概念及 SQL
1. Which of the following may be a valid SQL statement?
A.
choose name, id from students if name='paul' && age>20;
B.
select students if name='paul' && age>20;
C.
select * from students where name='paul' and age>20;
D.
get students where name='paul' and age>20;
2. Which of the following is not a many-to-many relationship?
A.
Student and Teacher
B.
Patient and Doctor
C.
Customer and Restaurant
D.
Husband and wife
3. Create an index when? (choose two)
A.
Most queries are expected to retrieve more than 2% to 4% of the rows in the table.
B.
The table is updated frequently
C.
A column contains a large number of null values
D.
A column contains a wide range of values
4. Which of the following is the best description for a database?
A.
A database directly contains some columns.
B.
A database directly contains some tables.
C.
A database directly contains some records.
D.
A database directly contains some rows.
5. How to create a table?
A.
create table ( id integer primary key; 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; name varchar(20)}
6. Which of the following may be a valid SQL statement?
A.
select students if name='paul' && age>20;
B.
choose name, id from students if name='paul' && age>20;
C.
get students where name='paul' and age>20;
D.
select * from students where name='paul' and age>20;
7. 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 price = 2*price from products;
B.
update products by price = 2*price;
C.
update products set price = 2*price;
D.
update products price = 2*price;
8. 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.
Structured Query Language (SQL)
C.
National Query Language (NQL)
D.
JAVA
9. In most databases, data are organized and stored in:
A.
table
B.
plain text
C.
directory
D.
view
10. 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 total(*) from products if price > 100;
B.
select total(*) from products for price > 100;
C.
select sum(*) from products where price > 100;
D.
select count(*) from products wehre price > 100;