Tuesday, December 15, 2015

PostgreSQL test answers of 2016.

In this post you can find Complete and recently updated Correct Question and answers of PostgreSQL. All Answers updated regularly with new questions. Upwork PostgreSQL test answers of 2016.



Question:* PostgreSQL can be used from just about any major programming language, including C, C++, Perl, Python, Java, Tcl, and PHP.

Answer: • True

Question:* The value NULL, in database terminology, means?

Answer: • All of these

Question:* Tablespaces:

Answer: • Allow an administrator to designate specific locations in a file system where database objects can be stored.

Question:* A VACUUM operation is used:

Answer: • All of these

Question:* When you want to use a join between columns that are in the same table, you use what type of join?

Answer: • self

Question:* True or False? ALTER TABLE may be issued while a VACUUM process is running.

Answer: • False

Question:* True or False? When using a SELECT statement on a table, or group of tables, those resources are locked exclusively.

Answer: • False

Question:* True or false: With table inheritance, not null and check constraints are inherited.

Answer: • True

Question:* If you don’t specify ASC or DESC, PostgreSQL will assume you want to see results:

Answer: • in ascending order

Question:* Deadlocks occur when:

Answer: • Two transactions hold exclusive locks on resources they both need.

Question:* True or False? VACUUM FULL shrinks indexes, optimizing database performance.

Answer: • True - This was addressed in version 9.0

Question:* WAL stands for:

Answer: • Write Ahead Log

Question:* Which of the following best describes a role:

Answer: • A template for authorization to various database objects.

Question:* What do you call the application that makes requests of the PostgreSQL server?

Answer: • Client

Question:* The basic psql command to list tables is?

Answer: • \dt

Question:* In PostgreSQL, a named collection of tables is called what?

Answer: • Schema

Question:* What command tells PostgreSQL that all of the changes you made to a database should become permanent?

Answer: • Commit

Question:* What is the wrapper around the SQL command CREATE DATABASE?

Answer: • createdb

Question:* ____________ allow us to define formally in the database how different tables relate to each other.

Answer: • Foreign Key Constraints

Question:* The SQL condition for pattern matching is?

Answer: • LIKE

Question:* The most common method to get data into a table is to use what command?

Answer: • Insert

Question:* PostgreSQL is:

Answer: • An open-source ORDBMS developed at UC Berkley, which supports many modern features.

Question:* PostgreSQL is

Answer: • a relational database management system.

Question:* With PostgreSQL, you can access data by

Answer: • All of these

Question:* When retrieving data in a particular table, we use the_____________ statement.

Answer: • SELECT FROM

Question:* The heart of SQL is the __________ statement.

Answer: • SELECT

Question:* We add data to PostgreSQL by using which statement?

Answer: • INSERT

Question:* PostgreSQL has many modern features including:

Answer: • All of the above

Question:* PostgreSQL used what model of communication?

Answer: • Client/Server

Question:* PostgreSQL runs on:

Answer: • all major operating systems, including Linux, UNIX (AIX, BSD, HP-UX, SGI IRIX, Mac OS X, Solaris, Tru64), and Windows.

Question:* PostgreSQL can be installed?

Answer: • All of these

Question:* Triggers can be configured to execute when which of the following operations are performed:

Answer: • All of the above

Question:* True or False? Within a table, a single column may be encrypted.

Answer: • True

Question:* The core PostgreSQL source code includes what interfaces?

Answer: • The C and embedded C interfaces

Question:* True or False? PostgreSQL is so lightweight that performance and reliability are not affected by hardware.

Answer: • False

Question:* True or False: A tablespace is the place where database objects are stored on disk.

Answer: • True

Question:* Unless you specify NOT NULL, PostgreSQL will assume that a column is:

Answer: • Optional

Question:* Query trees can be viewed in the server logs as long as which of the following configuration parameters are enabled?

Answer: • All of these

Question:* To create a database in PostgreSQL, you must have the special CREATEDB privilege or

Answer: • be a superuser.

Question:* A meta-command always begins with what?

Answer: • Backslash character (\)

Question:* To describe a table in PostgreSQL which of the following is correct:

Answer: • psql> \d table_name

Question:* What does the following statement do? CREATE INDEX lower_title_idx ON books ((lower(title)));

Answer: • Creates an index for efficient case-insensitive searches on the titles column within the books table

Question:* What command allows you to edit PostgreSQL queries in your favorite editor ?

Answer: • \e

Question:* To prevent transaction wraparound, a VACUUM operation should be run on every table no less than once every:

Answer: • 2 billion transactions

Question:* The rule system:

Answer: • All of these

Question:* Asynchronous Commits:

Answer: • All of these

Question:* This is used to determine how text is stored and sorted within PostgreSQL?

Answer: • Collations

Question:* What command turns on timing?

Answer: • \timing

Question:* 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?

Answer: • A client is connected, and the server is awaiting input.

Question:* True or False? Only the administrator can make use of tablespaces.

Answer: • False

Question:* Advisory locks are allocated out of a shared memory pool whose size is defined by the configuration variables....

Answer: • All of these

Question:* What does MCV stand for?

Answer: • Most Common Values

Question:* In order to echo all input from script, you use the ________ psql command.

Answer: • -a

Question:* Which is NOT true of array indexes?

Answer: • By default PostgreSQL indexes arrays so that inner elements can be searched.

Question:* Which statement is true about PostgreSQL data types?

Answer: • There is a non-standard PostgreSQL data type, called Geometric data type, which handles 2-dimensional data.

Question:* True or False? Dynamic Tracing is enabled by default at compile time.

Answer: • False

Question:* What is "index bloat"?

Answer: • No-longer-needed keys in an index aren't reclaimed, therefore increasing space required to store an index, as well as time it takes to scan.

Question:* To copy a database from server1 to server2, you might use which of the following:

Answer: • pg_dump -h server1 database | psql -h server2 database

Question:* To restore a PostgreSQL backup created with pg_dump, the following may be used:

Answer: • $ psql -f database_dump.psql database_name

Question:* What is the difference between DO 'some code...' and EXECUTE 'some code...' statements?

Answer: • DO lets you execute some plPgSql code without saving it to database and EXECUTE lets you execute DDL or DML only

Question:* By default, in what subdirectory of the database data directory are WAL logs contained?

Answer: • pg_xlog

Question:* The syntax to view the indexes of an existing postgreSQL table is:

Answer: • # \d table_name

Question:* Bob works for StegaCorp. His workstation's IP address is 10.5.34.8. He needs access to a database called "partners" directly from his workstation. Which of the following is the correct entry in pg_hba.conf?

Answer: • host partners bob 10.5.34.8/32 krb5

Question:* True or False? PostgreSQL supports Index Only Scans.

Answer: • True

Question:* Which of the following is not a valid integer array?

Answer: • '{1,3,4,5,{6,7}}'

Question:* What are the join strategies available to the postgreSQL planner when a SELECT query contains two or more relations?

Answer: • Nested Loop Join, Merge Join, Hash Join

Question:* Locks are recorded in:

Answer: • pg_locks system view

Question:* True or False? To increase server performance, automated CHECKPOINT operations should be setup in cron or Task Scheduler.

Answer: • False

Question:* Which of the following is NOT a feature of user defined functions?

Answer: • They can initiate subtransactions

Question:* The extension used for data encryption/decryption within PostgreSQL is:

Answer: • pgcrypto

Question:* Which statement is not true about a PostgreSQL domain?

Answer: • Domain is a namespace existing between databases and objects such as tables.

Question:* True or False? When restoring a database backed up with pg_dump, it's generally a good idea to enable WAL.

Answer: • False

Question:* True or false: When a table is created which uses a table name as a column type, not null constraints on the column type's table definition are honored by the including table.

Answer: • False

Question:* To create a database that supports UTF-8, the following command can be used:

Answer: • createdb -E UTF8 -O user database_name

Question:* True or false? Hash indexes are not crash-safe

Answer: • False

Question:* True or False: PostgreSQL allows you to implement table inheritance. This should be defined with the special keyword INHERITIS in the table design.

Answer: • False

Question:* WAL segment size is determined:

Answer: • By the configure script at compile time

Question:* What is a TOAST file?

Answer: • A file containing values too wide to fit comfortably in the main table

Question:* The __________ database model has the advantage of being able to quickly discover all of the records of one type that are related to a specific record of another type by following the pointers from the starting record.

Answer: • network

Question:* When identifying rows uniquely, we use__________keys.

Answer: • surrogate

Question:* True or false: With table inheritance child tables inherit primary and foreign key definitions from their parents

Answer: • False

Question:* True or False? To enable continuous archiving, all you have to do is set archive_mode to 'on' in postgresql.conf

Answer: • False



No comments:

HTML5 Upwork (oDesk) TEST ANSWERS 2022

HTML5 Upwork (oDesk) TEST ANSWERS 2022 Question: Which of the following is the best method to detect HTML5 Canvas support in web br...

Disqus for upwork test answers