Hamster
Search
Open menu
熟悉傳統數據庫概念及 SQL
1. Which of the following is not a many-to-many relationship?
A.
Student and Teacher
B.
Customer and Restaurant
C.
Husband and wife
D.
Patient and Doctor
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)values (Select order_id,name,price from orders);
B.
Insert into sales(item_id,name,price)on select order_id,mane ,price from orders;
C.
Insert into sales(item_id,name,price)select order_id,name,price from orders;
D.
Insert into sales(item_id,name,price)as select order_id,name,price from order;
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.
A column contains a wide range of values
C.
The table is updated frequently
D.
A column contains a large number of null values
4. Which of the following is suitable to use index?
A.
Table with few rows
B.
Columns often be used in ORDER BY clause
C.
Table with many modifications but few actual queries
D.
Many duplicate rows
5. Which of the following is a standard interactive and programming language for getting information from and updating a database?
A.
Structured Query Language (SQL)
B.
Dynamic Query Language (DQL)
C.
National Query Language (NQL)
D.
JAVA
6. Typically where is a database is stored?
A.
In the CPU.
B.
On a Hard disk.
C.
On a CDROM.
D.
In memory.
7. In most databases, data are organized and stored in:
A.
table
B.
view
C.
directory
D.
plain text
8. Which of the following is the best description for a database?
A.
A database directly contains some rows.
B.
A database directly contains some columns.
C.
A database directly contains some records.
D.
A database directly contains some tables.
9. How to create a table?
A.
create table { id integer; name varchar(20)}
B.
create table ( id integer primary key; name varchar(20));
C.
create table ( id integer primary key, name varchar(20));
D.
class table { id: integer; name: String; }
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 count(*) from products wehre price > 100;
B.
select total(*) from products if price > 100;
C.
select sum(*) from products where price > 100;
D.
select total(*) from products for price > 100;