1. PostgreSQL can be used from just about any major programming language, including C, C++, Perl, Python, Java, Tcl, and PHP.
2. What do you call the application that makes requests of the PostgreSQL server?
3. PostgreSQL has many modern features including:
4. PostgreSQL can be installed?
5. PostgreSQL runs on:
6. The heart of SQL is the __________ statement.
7. In PostgreSQL, a named collection of tables is called what?
8. What command tells PostgreSQL that all of the changes you made to a database should become permanent?
9. ____________ allow us to define formally in the database how different tables relate to each other.
10. Which of the following best describes a role:
11. The basic psql command to list tables is?
12. VACUUM FULL shrinks indexes, optimizing database performance.
13. Deadlocks occur when:
14. If you don’t specify ASC or DESC, PostgreSQL will assume you want to see results:
15. When you want to use a join between columns that are in the same table, you use what type of join?
16. PostgreSQL is so lightweight that performance and reliability are not affected by hardware.
17. What does the following statement do? CREATE INDEX lower_title_idx ON books ((lower(title)));
18. When looking at 'ps' output on a unix system, you see the following: postgres 1016 0.1 2.4 6532 3080 pts/1 SN 13:19 0:00 postgres: tgl regression [local] idle in transaction What does 'idle in transaction' mean?
19. What does MCV stand for?
20. Which of the following is not a valid integer array?
21. What is the difference between DO 'some code...' and EXECUTE 'some code...' statements?
22. Locks are recorded in:
23. Hash indexes are not crash-safe
24. What is a TOAST file?
25. A table can have only one primary key column.
26.
SELECT 'infinity'::timestamp;
Will this statement produce an error?
27. There is a column c1 in the table t to which a primary key pk is to be added. What will be the correct syntax?
28. Which method should be used to drop the master table if its primary key is being referenced by a foreign key in some other table?
29. Which of the following is not a single value function?
30. Premium Corp. uses alphanumeric characters for EmployeeID which contains 7 digits prefixed with 3 characters. The 3 characters describe the department code. You need to show the department code and the Employee number separately, where department code should be in capital letters. Which function(s) will you have to use for this?
31.
What is the error in the following query if the students table contains several records?
select name from students where name =
(select name from students order by name);
32. There is a table t upon which a primary key constraint by the name pk is applied. What will be the correct syntax to drop the constraint?
PostgreSQL MCQs | Topic-wise