Prelim Flashcards

(39 cards)

1
Q

It is the standard language for dealing with Relational Databases.

A

SQL

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

______ is used to insert, search, update, and
delete database records.

A

SQL

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

TRUE OR FALSE:
SQL keyword are NOT case sensitive select is the same as SELECT

A

TRUE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

TRUE OR FALSE:
Some database systems require a semicolon at the end of each SQL statement.

A

TRUE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

_________ is the standard way to separate each SQL statement in database systems that allow more than one SQL statement to be executed in the same call to the server.

A

Semicolon

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

SQL COMMAND:
Extracts data from a database

A

SELECT

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

SQL COMMAND:
Updates data in a database

A

UPDATE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

SQL COMMAND:
Deletes data from a database

A

DELETE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

SQL COMMAND:
Inserts new data into a database.

A

INSERT INTO

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

SQL COMMAND:
Creates a new database.

A

CREATE DATABASE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

SQL COMMAND:
Modifies a database.

A

ALTER DATABASE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

SQL COMMAND:
Creates a new table.

A

CREATE TABLE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

SQL COMMAND:
Modifies a table.

A

ALTER TABLE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

SQL COMMAND:
Deletes a table.

A

DROP TABLE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

SQL COMMAND:
Creates an index (search key).

A

CREATE INDEX

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

SQL COMMAND:
Deletes an index.

17
Q

What is the syntax of SELECT statement?

A

SELECT * FROM table name;

If only specific fields:
SELECT Lname, Fname, MI FROM Students (tablename);

18
Q

The __________ statement is used to return only distinct (different) values.

A

SELECT DISTINCT

19
Q

Syntax for SELECT Example Without DISTINCT

A

SELECT age FROM student;

20
Q

Syntax for SELECT Example With DISTINCT

A

SELECT DISTINCT age FROM student;

21
Q

Syntax for SELECT Example With COUNT DISTINCT

A

SELECT COUNT(DISTINCT age) FROM student;

22
Q

The WHERE clause is used to ____ records.

23
Q

TRUE OR FALSE:
The WHERE clause is not only used in SELECT statements, it is also used in UPDATE, DELETE, etc.!

24
Q

What is the syntax of WHERE clause?

A

SELECT * FROM students
WHERE age = ‘20’;

SELECT * FROM student
WHERE userID = 1;

25
SQL requires ______ quotes around text values (most database systems will also allow double quotes).
single
26
TRUE OR FALSE: In SELECT clause, numeric fields should not be enclosed in quotes.
TRUE
27
=
Equal
28
>
Greater than
29
<
Less than
30
Operator: Between a certain range
BETWEEN
31
Operator: Search for a pattern.
LIKE
32
Operator: To specify multiple possible values for a column.
IN
33
Syntax for creating database
CREATE DATABASE CREATE DATABASE `student`;
34
Syntax for dropping database
DROP DATABASE `student`;
35
Syntax for creating table
CREATE TABLE `studinfo`
36
Syntax for dropping table
DROP TABLE `studinfo`
37
Syntax for adding a column
ALTER TABLE studinfo ADD Remarks varchar(100);
38
Syntax for deleting a column
ALTER TABLE studinfo DROP COLUMN Remarks;
39
AUTO_INCREMENT PRIMARY KEY, FOREIGN KEY (SanIcoconnect) REFERENCE tablename(SanIcoconnect)