Docsity

EDB PostgreSQL 13 Professional Exam, Exams of Technology

Toggle sidebar
bg1
EDB PostgreSQL 13 Professional Exam
Question 1: What is the primary function of PostgreSQL’s architecture?
A. Operating system management
B. Data storage and retrieval
C. Network security management
D. Hardware virtualization
Answer: B
Explanation: PostgreSQL’s architecture is primarily designed to store, manage, and retrieve data
efficiently.
Question 2: Which of the following best describes PostgreSQL’s process model?
A. Single-process, multithreaded
B. Multi-process with shared memory
C. Event-driven single-thread
D. Distributed microservices
Answer: B
Explanation: PostgreSQL uses a multi-process architecture with shared memory for coordination
among processes.
Question 3: What is a key new feature introduced in PostgreSQL 13?
A. In-memory data storage
B. Incremental sorting
C. Built-in AI analytics
D. Blockchain integration
Answer: B
Explanation: PostgreSQL 13 introduced incremental sorting as an optimization for queries with
ORDER BY clauses.
Question 4: Which edition of PostgreSQL is maintained by EnterpriseDB (EDB)?
A. Community edition only
B. EDB Advanced Server
C. PostgreSQL Express
D. Oracle compatible edition
Answer: B
Explanation: EnterpriseDB offers the EDB Advanced Server edition, which adds features on top
of the community version.
Question 5: In PostgreSQL terminology, what does “EDB” primarily stand for?
A. Enterprise Database
B. Extended DataBase
C. Enhanced Database
D. External Database
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33

Partial preview of the text

Download EDB PostgreSQL 13 Professional Exam and more Exams Technology in PDF only on Docsity!

EDB PostgreSQL 13 Professional Exam

Question 1: What is the primary function of PostgreSQL’s architecture? A. Operating system management B. Data storage and retrieval C. Network security management D. Hardware virtualization Answer: B Explanation: PostgreSQL’s architecture is primarily designed to store, manage, and retrieve data efficiently. Question 2: Which of the following best describes PostgreSQL’s process model? A. Single-process, multithreaded B. Multi-process with shared memory C. Event-driven single-thread D. Distributed microservices Answer: B Explanation: PostgreSQL uses a multi-process architecture with shared memory for coordination among processes. Question 3: What is a key new feature introduced in PostgreSQL 13? A. In-memory data storage B. Incremental sorting C. Built-in AI analytics D. Blockchain integration Answer: B Explanation: PostgreSQL 13 introduced incremental sorting as an optimization for queries with ORDER BY clauses. Question 4: Which edition of PostgreSQL is maintained by EnterpriseDB (EDB)? A. Community edition only B. EDB Advanced Server C. PostgreSQL Express D. Oracle compatible edition Answer: B Explanation: EnterpriseDB offers the EDB Advanced Server edition, which adds features on top of the community version. Question 5: In PostgreSQL terminology, what does “EDB” primarily stand for? A. Enterprise Database B. Extended DataBase C. Enhanced Database D. External Database

Answer: A Explanation: EDB stands for Enterprise Database, emphasizing features designed for enterprise use. Question 6: Which aspect is critical during PostgreSQL installation and configuration? A. Graphical user interface design B. Memory allocation and file system paths C. Email server integration D. Mobile app connectivity Answer: B Explanation: Proper memory allocation and correct file system paths are essential for optimal PostgreSQL installation and configuration. Question 7: What distinguishes PostgreSQL’s open-source community edition from the EDB edition? A. Pricing model only B. Inclusion of proprietary enterprise features C. Operating system support D. Data type limitations Answer: B Explanation: The EDB edition includes additional enterprise features that are not present in the standard community edition. Question 8: Which component in PostgreSQL is responsible for coordinating concurrent operations? A. Query optimizer B. Process manager C. Shared memory and locking mechanisms D. Data dictionary Answer: C Explanation: Shared memory and locking mechanisms ensure that concurrent operations are coordinated safely and efficiently. Question 9: PostgreSQL is best described as a: A. Relational database management system B. File-based storage system C. NoSQL data store D. In-memory database only Answer: A Explanation: PostgreSQL is a powerful open-source relational database management system (RDBMS). Question 10: Which organization supports the PostgreSQL community? A. Oracle Corporation B. PostgreSQL Global Development Group C. Microsoft Corporation

Question 16: What is the significance of the PostgreSQL release cycle? A. It delays security patches B. It provides periodic enhancements and bug fixes C. It halts new feature development D. It only releases major version updates Answer: B Explanation: The regular release cycle ensures that PostgreSQL receives new features, performance enhancements, and timely security fixes. Question 17: Which SQL command is used to create a new database in PostgreSQL? A. CREATE SCHEMA B. CREATE DATABASE C. INIT DATABASE D. NEW DATABASE Answer: B Explanation: The CREATE DATABASE command is used to create a new database in PostgreSQL. Question 18: In PostgreSQL, what is a tablespace? A. A schema for organizing tables B. A location on disk where database objects are stored C. A type of SQL join D. A backup file format Answer: B Explanation: A tablespace is a storage location on disk where PostgreSQL stores the files for database objects. Question 19: Which command is used to remove an existing database in PostgreSQL? A. DROP DATABASE B. DELETE DATABASE C. REMOVE DATABASE D. UNINSTALL DATABASE Answer: A Explanation: DROP DATABASE is the command to permanently remove a database. Question 20: What is the purpose of the “ALTER DATABASE” command? A. To delete a database B. To modify database attributes such as ownership or encoding C. To backup a database D. To connect to a database Answer: B Explanation: ALTER DATABASE allows you to change various database parameters like ownership and locale settings. Question 21: How can you change the location of a PostgreSQL tablespace? A. Using ALTER TABLESPACE to set a new directory

B. Directly editing the postgresql.conf file C. By dropping and recreating the tablespace D. Tablespace location cannot be changed Answer: A Explanation: ALTER TABLESPACE can be used to change certain properties of a tablespace, including its location. Question 22: What is the impact of using different data types in PostgreSQL? A. They have no impact on performance B. They determine how data is stored and processed C. They only affect backup speed D. They restrict user privileges Answer: B Explanation: Data types define how data is stored, processed, and validated within the database. Question 23: What is the purpose of a schema in PostgreSQL? A. To store system logs B. To logically group database objects C. To manage network connections D. To define backup strategies Answer: B Explanation: Schemas organize database objects into logical groups, making management and security easier. Question 24: Which statement is true regarding roles in PostgreSQL? A. Roles are only used for backup purposes B. Roles are used to manage user permissions and access C. Roles control disk space allocation D. Roles are created automatically with each table Answer: B Explanation: Roles in PostgreSQL are used to manage permissions and define access rights for users and groups. Question 25: What file is crucial for adjusting PostgreSQL server parameters? A. pg_pass.conf B. postgresql.conf C. config.xml D. server.ini Answer: B Explanation: The postgresql.conf file holds the configuration parameters that affect server behavior. Question 26: How does one modify PostgreSQL server settings permanently? A. By editing the pg_hba.conf file B. By changing parameters in the postgresql.conf file C. By using SQL commands exclusively

D. CREATE ROLE

Answer: B Explanation: CREATE SCHEMA is used to create a new schema, a container for database objects. Question 32: In PostgreSQL, what is the significance of privileges? A. They limit the number of connections B. They control access to database objects C. They adjust the storage engine D. They manage file system permissions Answer: B Explanation: Privileges define which users can access or modify specific database objects. Question 33: How can a database administrator manage user privileges in PostgreSQL? A. By editing system files B. Through SQL commands like GRANT and REVOKE C. Using the operating system’s user manager D. By modifying the data dictionary manually Answer: B Explanation: GRANT and REVOKE SQL commands allow administrators to assign or remove privileges from users. Question 34: What is the default port number for PostgreSQL connections? A. 3306 B. 5432 C. 1521 D. 8080 Answer: B Explanation: PostgreSQL typically listens on port 5432 by default. Question 35: Which PostgreSQL configuration file controls client authentication? A. postgresql.conf B. pg_hba.conf C. recovery.conf D. auth.conf Answer: B Explanation: The pg_hba.conf file defines client authentication rules. Question 36: What does the “GRANT” command in PostgreSQL do? A. It creates a new role B. It assigns privileges to roles or users C. It updates server configuration D. It creates a new database Answer: B Explanation: The GRANT command assigns specific privileges to roles or users for various database objects.

Question 37: Which command is used to modify a role’s privileges in PostgreSQL? A. ALTER ROLE B. UPDATE ROLE C. MODIFY USER D. CHANGE PRIVILEGES Answer: A Explanation: ALTER ROLE is used to change properties and privileges of a role in PostgreSQL. Question 38: What is the role of the “REVOKE” command? A. It deletes a database B. It removes assigned privileges from a role C. It backs up data D. It encrypts user data Answer: B Explanation: REVOKE is used to remove privileges previously granted to a role or user. Question 39: Which of the following actions requires superuser privileges in PostgreSQL? A. Creating a new table B. Creating a new role with LOGIN C. Modifying a database’s encoding D. Inserting data into a table Answer: C Explanation: Changing database encoding typically requires superuser privileges due to its global impact. Question 40: How does PostgreSQL ensure that configuration changes are not applied mid- transaction? A. Through a configuration lock B. By requiring a server restart or reload C. Using transaction-level isolation D. It applies changes immediately Answer: B Explanation: PostgreSQL applies configuration changes only after a server restart or reload to maintain transactional integrity. Question 41: What is normalization in database design? A. A method to encrypt data B. The process of organizing data to reduce redundancy C. A type of indexing strategy D. A backup technique Answer: B Explanation: Normalization organizes data to minimize redundancy and improve data integrity. Question 42: Which normal form eliminates duplicate columns from the same table? A. First Normal Form (1NF) B. Second Normal Form (2NF)

D. It stores data in a linear file Answer: B Explanation: GIN indexes are optimized for indexing composite values such as arrays and for full-text search. Question 48: Which data type is suitable for storing a set of values in PostgreSQL? A. JSON B. Array C. TEXT D. UUID Answer: B Explanation: PostgreSQL supports array data types that allow storage of a set of values in a single column. Question 49: What is the benefit of using JSON data types in PostgreSQL? A. They enforce a strict schema B. They provide flexibility for semi-structured data C. They automatically compress data D. They improve transaction speed Answer: B Explanation: JSON data types allow flexible storage and querying of semi-structured data without a fixed schema. Question 50: Which concept helps in reducing data redundancy during design? A. Denormalization B. Indexing C. Normalization D. Partitioning Answer: C Explanation: Normalization minimizes redundancy by organizing data into related tables. Question 51: What is an entity-relationship (ER) diagram used for? A. Encrypting data B. Visually representing database structure C. Managing user roles D. Configuring server parameters Answer: B Explanation: ER diagrams are used to visually model the relationships between entities in a database. Question 52: Which relationship type is represented when a record in one table can be associated with many records in another table? A. One-to-One B. One-to-Many C. Many-to-Many D. Self-referential

Answer: B Explanation: A one-to-many relationship means one record in the parent table may link to many in the child table. Question 53: How is a many-to-many relationship typically implemented in a relational database? A. Directly in a single table B. Using a junction (bridge) table C. Through a stored procedure D. By duplicating data in both tables Answer: B Explanation: A junction table is used to handle many-to-many relationships by linking keys from both tables. Question 54: In PostgreSQL, what is the main purpose of an index? A. To enforce foreign key constraints B. To accelerate query performance C. To store large objects D. To provide user authentication Answer: B Explanation: Indexes are used to speed up query performance by quickly locating data without scanning the entire table. Question 55: What is a disadvantage of having too many indexes on a table? A. Increased disk space and slower writes B. Improved query performance C. Reduced backup times D. Better data integrity Answer: A Explanation: Excessive indexes can slow down write operations and consume additional disk space. Question 56: Which advanced data type allows key-value pair storage in PostgreSQL? A. JSONB B. hstore C. XML D. ENUM Answer: B Explanation: The hstore data type is designed for storing sets of key-value pairs, useful for semi- structured data. Question 57: Which SQL language category includes commands like CREATE, ALTER, and DROP? A. DML B. DCL C. DDL

C. SUM()

D. MAX()

Answer: C Explanation: SUM() adds up all values in a numeric column and returns the total. Question 63: What is the purpose of a window function in SQL? A. To create database windows B. To perform calculations across a set of table rows related to the current row C. To change data types D. To manage user sessions Answer: B Explanation: Window functions perform calculations across a set of rows related to the current row without collapsing the result set. Question 64: Which SQL clause is essential for defining partitions within window functions? A. PARTITION BY B. GROUP BY C. ORDER BY D. WINDOW BY Answer: A Explanation: PARTITION BY divides the result set into partitions for which the window function is separately computed. Question 65: What is a characteristic of Data Manipulation Language (DML)? A. It defines database schemas B. It is used to insert, update, and delete data C. It creates user roles D. It configures server parameters Answer: B Explanation: DML commands such as INSERT, UPDATE, and DELETE are used for manipulating data within tables. Question 66: Which SQL command is used to update existing records? A. MODIFY B. UPDATE C. CHANGE D. SET Answer: B Explanation: UPDATE is used to modify existing records in a table. Question 67: Which operator is used to combine the results of two queries in SQL? A. INTERSECT B. UNION C. DIFFERENCE D. MERGE

Answer: B Explanation: The UNION operator combines the result sets of two or more SELECT statements, eliminating duplicates by default. Question 68: What does the EXPLAIN command do in PostgreSQL? A. It backs up data B. It provides the execution plan for a query C. It encrypts database files D. It creates indexes Answer: B Explanation: EXPLAIN shows the execution plan that PostgreSQL uses for a query, helping diagnose performance issues. Question 69: Which of the following is not a DML command? A. INSERT B. DELETE C. CREATE D. UPDATE Answer: C Explanation: CREATE is a DDL command used to define database objects, not manipulate data. Question 70: Which clause would you use to sort query results in SQL? A. GROUP BY B. ORDER BY C. HAVING D. WHERE Answer: B Explanation: ORDER BY sorts the result set of a query based on one or more columns. Question 71: What is the primary purpose of using aliases in SQL queries? A. To create new tables B. To rename columns or tables for readability C. To encrypt data D. To improve database performance Answer: B Explanation: Aliases improve query readability by giving temporary names to columns or tables. Question 72: Which function can be used to count the number of rows in a query result? A. SUM() B. COUNT() C. AVG() D. MAX() Answer: B Explanation: COUNT() returns the number of rows in a query result.

B. WHERE

C. ORDER BY

D. GROUP BY

Answer: B Explanation: The WHERE clause filters rows before any grouping or aggregation occurs in the query. Question 79: What is a key characteristic of window functions compared to aggregate functions? A. They reduce the number of rows returned B. They do not cause rows to collapse C. They only work with numeric data D. They require subqueries Answer: B Explanation: Window functions calculate values across rows while still returning all individual rows. Question 80: Which SQL function is used to compute running totals? A. ROW_NUMBER() B. SUM() OVER C. COUNT() D. LAG() Answer: B Explanation: SUM() OVER is used as a window function to compute running totals without collapsing rows. Question 81: In a recursive CTE, what is the base case used for? A. Terminating the recursion B. Providing the initial dataset for recursion C. Sorting results D. Encrypting data Answer: B Explanation: The base case of a recursive CTE provides the initial dataset that is recursively processed. Question 82: Which clause initiates a Common Table Expression (CTE) in PostgreSQL? A. WITH B. BEGIN C. START D. DEFINE Answer: A Explanation: The WITH clause is used to start a CTE that can be referenced within the main query. Question 83: What is a practical use of recursive queries in PostgreSQL? A. Backing up data

B. Traversing hierarchical data structures C. Encrypting database contents D. Configuring server parameters Answer: B Explanation: Recursive queries are useful for querying hierarchical data such as organizational charts or category trees. Question 84: What feature does PostgreSQL offer for full-text search? A. pg_search_tool B. tsearch C. built-in full-text search D. external search engine only Answer: C Explanation: PostgreSQL has built-in full-text search capabilities that index and search textual data efficiently. Question 85: What is the main purpose of a user-defined function (UDF) in PostgreSQL? A. To create backups B. To encapsulate reusable logic that can be executed within SQL C. To enforce disk quotas D. To configure network settings Answer: B Explanation: UDFs allow developers to encapsulate and reuse business logic within the database. Question 86: Which language is commonly used to write user-defined functions in PostgreSQL? A. HTML B. PL/pgSQL C. CSS D. JavaScript Answer: B Explanation: PL/pgSQL is PostgreSQL’s procedural language used for writing functions and stored procedures. Question 87: How do triggers function in PostgreSQL? A. They schedule backups B. They automatically execute a function in response to a specific event on a table C. They control database access D. They generate random data Answer: B Explanation: Triggers automatically invoke a function when a specified event (INSERT, UPDATE, or DELETE) occurs on a table. Question 88: What is the purpose of rules in PostgreSQL? A. To define user privileges B. To rewrite queries transparently

B. It automatically executes code in response to database events C. It is used exclusively for backup D. It disables concurrency Answer: B Explanation: Event-driven programming in PostgreSQL uses triggers and procedures to execute code when specified events occur. Question 94: Which of the following best describes a Common Table Expression (CTE)? A. A temporary result set used within a single SQL statement B. A permanent table C. An indexing method D. A system log Answer: A Explanation: CTEs provide temporary named result sets for use within a single SQL query. Question 95: In recursive queries, what is the role of the UNION ALL operator? A. It filters out duplicate rows B. It combines the base case and recursive step results C. It sorts the output D. It terminates the recursion Answer: B Explanation: UNION ALL combines the results of the base query and the recursive portion, preserving duplicates as needed. Question 96: Which of the following is an advantage of using full-text search in PostgreSQL? A. It requires no indexing B. It supports natural language queries over large text datasets C. It only works with numeric data D. It automatically encrypts text data Answer: B Explanation: PostgreSQL’s full-text search supports natural language queries over extensive text data sets efficiently. Question 97: What is a key benefit of using stored procedures? A. They reduce code reuse B. They encapsulate complex business logic within the database C. They eliminate the need for client applications D. They slow down execution Answer: B Explanation: Stored procedures allow complex business logic to be encapsulated within the database, simplifying client applications. Question 98: How do triggers enhance data integrity in PostgreSQL? A. By manually auditing data changes B. By automatically enforcing business rules during data modifications

C. By storing data on external servers D. By encrypting database backups Answer: B Explanation: Triggers can automatically enforce rules and constraints during INSERT, UPDATE, or DELETE operations to maintain data integrity. Question 99: Which advanced SQL technique is particularly useful for hierarchical queries? A. Scalar subqueries B. Recursive CTEs C. Temporary tables D. Cross joins Answer: B Explanation: Recursive CTEs are ideal for querying hierarchical data structures such as organizational charts. Question 100: What is the purpose of analytic functions in PostgreSQL? A. To create temporary tables B. To perform complex calculations across rows related to the current row C. To encrypt user data D. To drop database objects Answer: B Explanation: Analytic (window) functions perform calculations across a set of rows, providing advanced analytical capabilities without collapsing the result set. Question 101: Which of the following best describes EXPLAIN ANALYZE? A. A command to backup data B. A tool that executes the query and provides actual run-time statistics C. A command to create indexes D. A command to update table structures Answer: B Explanation: EXPLAIN ANALYZE executes the query and provides detailed run-time information and execution statistics, aiding performance tuning. Question 102: What is the primary goal of query optimization? A. To increase query complexity B. To improve execution performance and reduce resource consumption C. To encrypt the query plan D. To expand the database schema Answer: B Explanation: Query optimization aims to enhance performance by reducing execution time and resource usage. Question 103: Which PostgreSQL tool displays the query execution plan? A. pgAdmin B. EXPLAIN