🌐
Acme Collins School
acmecollinsschool.com › postgresql12.html
30 Multiple Choice Questions on PostgreSQL 12
Test your knowledge of PostgreSQL 12 with these 30 multiple choice questions covering topics such as data types, SQL commands, indexes, and more.
🌐
Java Guides
javaguides.net › 2023 › 09 › postgresql-quiz.html
PostgreSQL Quiz - MCQ - Multiple Choice Questions
September 16, 2023 - Welcome to the PostgreSQL Quiz for beginners! Whether you're testing your knowledge or looking to learn something new, this quiz has you covered. We will be covering the fundamental concepts of PostgreSQL through 40+ multiple-choice questions.
🌐
W3Schools
w3schools.com › postgresql › postgresql_quiz.php
PostgreSQL Quiz
You can test your PostgreSQL skills with W3Schools' Quiz.
🌐
MindMajix
mindmajix.com › quiz › postgresql-quiz
Top PostgreSQL Quiz Questions *2023
PostgreSQL Quiz - Test Your Knowledge on PostgreSQL ✔️Quizes on Basic to Advanced PostgreSQL concepts ✔️Register & Participate Now
🌐
Tutorials Link
tutorialslink.com › mcq-quiz › postgresql-mcq-quiz-multiple-choice-questions-and-answers
PostgreSQL MCQ Quiz (Multiple Choice Questions And Answers) | Tutorials Link
There is a wealth of information to be found describing how to install and use PostgreSQL through the official documentation. The PostgreSQL community provides many helpful places to become familiar with the technology, discover how it works, and find career opportunities. In this Quiz, you’ll find the most asked and FAQ based PostgreSQL for your next interview.
🌐
FreshersNow
freshersnow.com › home › technical quiz › postgresql mcqs and answers with explanation | postgresql quiz
PostgreSQL MCQs and Answers | PostgreSQL Quiz
February 17, 2025 - Here in this article, you will be able to gather the PostgreSQL MCQ Quiz that tests your comprehension of PostgreSQL’s design, SQL queries, data types, and other sophisticated capabilities. We’ll give you a complete set of PostgreSQL Multiple Choice Questions in this article so you can ...
🌐
Java Guides
multiplechoicequestions.org › home › postgresql mcq
PostgreSQL MCQ - Multiple Choice Questions
September 14, 2023 - Welcome to the PostgreSQL Quiz for beginners! Whether you’re testing your knowledge or looking to learn something new, this quiz has you covered. We will be covering the fundamental concepts of PostgreSQL through 40+ multiple choice questions.
🌐
Tests4geeks
tests4geeks.com › postgresql-online-test
PostgreSQL Assessment Test (15 Questions) - Tests4Geeks
Multiple-choice questions built around real code snippets test exactly this. The test is primarily created for mid and senior-level developers. Resumes are easy to inflate, and "senior" means very different things at different companies. This PostgreSQL skills test is a fast, objective way to find out who can actually deliver what they claim on paper.
Find elsewhere
🌐
Quizack
quizack.com › postgresql › questions-and-answers
PostgreSQL MCQ Questions Answers
PostgreSQL MCQs evaluate skills as per standards. Prepare instantly for the IT exam, Employment test, or Interview by following PostgreSQL multiple choice questions
🌐
Java Guides
javaguides.net › 2024 › 05 › postgresql-online-test-mcq-questions.html
PostgreSQL Online Test - MCQ Questions
May 5, 2024 - Welcome to the PostgreSQL Online Test! We will present 25 MCQs (Multiple-Choice Questions) to test your knowledge of the PostgreSQL database.
🌐
Daily Recruitment
dailyrecruitment.in › home › postgresql mcq quiz questions and answers
PostgreSQL MCQ Quiz Questions and Answers
July 19, 2023 - PostgreSQL MCQ Quiz: It was originally named POSTGRES and the project was renamed to PostgreSQL to reflect its support for SQL. It is a highly stable database management system. Here, we have described the PostgreSQL MCQ Questions and Answer. Applicant check your knowledge by using these PostgreSQL Multiple choice questions and answers.
🌐
Onlineinterviewquestions.com
onlineinterviewquestions.com › postgresql-mcq
PostgreSQL MCQ Quiz & Online Test 2023
June 16, 2022 - We have listed below the best PostgreSQL MCQ Questions, that checks your basic knowledge of PostgreSQL. This PostgreSQL MCQ Test contains 20 Multiple Choice Questions. You have to select the right answer to check your final preparation for the PostgreSQL Exam/Interviews.
Top answer
1 of 1
1

Denormalized method (do not do this)

First, we create the first two tables

CREATE TABLE people    ( pid serial PRIMARY KEY, name text, contact text );
CREATE TABLE questions ( qid serial PRIMARY KEY, question text );

One method of doing this is just expanding the check statement to satisfy all permissible variants.

CREATE TABLE answers (
  pid       int  REFERENCES people,
  qid       int  REFERENCES questions,
  option_a  bool NOT NULL DEFAULT false,
  option_b  bool NOT NULL DEFAULT false,
  option_c  bool NOT NULL DEFAULT false,
  option_d  bool NOT NULL DEFAULT false,
  PRIMARY KEY ( pid, qid ),
  CHECK (
       (    option_a AND NOT option_b AND NOT option_c AND NOT option_d)
    OR (NOT option_a AND     option_b AND NOT option_c AND NOT option_d)
    OR (NOT option_a AND NOT option_b AND     option_c AND NOT option_d)
    OR (NOT option_a AND NOT option_b AND NOT option_c AND     option_d)
  )
);

That can be simplified a bit.

CREATE TABLE answers (
  pid       int  REFERENCES people,
  qid       int  REFERENCES questions,
  option_a  bool NOT NULL DEFAULT false,
  option_b  bool NOT NULL DEFAULT false,
  option_c  bool NOT NULL DEFAULT false,
  option_d  bool NOT NULL DEFAULT false,
  PRIMARY KEY ( pid, qid ),
  CHECK (
       (    option_a AND NOT   option_b AND NOT option_c   AND NOT option_d)
    OR (NOT option_a AND (     option_b AND NOT option_c   AND NOT option_d)
                     OR  ( NOT option_b AND (     option_c AND NOT option_d)
                                        OR  ( NOT option_c AND     option_d)))
  )
);

Alas, none of this is normalized. To normalize this design just do this..

CREATE TABLE answers (
  aid           serial PRIMARY KEY,
  description   text
);
CREATE TABLE question_answers (
  pid    int  NOT NULL REFERENCES people,
  qid    int  NOT NULL REFERENCES questions,
  aid    int  NOT NULL REFERENCES answers,
  value  bool NOT NULL DEFAULT false,
  PRIMARY KEY (qid, aid, pid)
);

Normalized Method

Now, if you wish to stop more than one value from being true in the above you can use a PARTIAL UNIQUE INDEX

CREATE UNIQUE INDEX
  ON question_answers(pid,qid,aid,value)
  WHERE value = true; -- (or just WHERE value)
🌐
Intervue
intervue.io › technical-assessment-test › postgresql
PostgreSQL Test | Intervue
The PostgreSQL test evaluates candidates based on skills: PostgreSQL consisting of 45 MCQ questions with a duration of 30 min. This test is of an advanced difficulty level and is taken by candidates with 5+ years of experience. ... You want to calculate the cumulative sum of sales amounts for ...
🌐
iMocha
imocha.io › home › sql tests › postgresql test
PostgreSQL Online Test to Assess and Hire PostgreSQL Expert
This PostgreSQL test may contain MCQs (Multiple Choice Questions), MAQs (Multiple Answer Questions), Fill in the Blanks, Whiteboard Questions, Audio / Video Questions, AI-LogicBox (Pseudo-Coding Platform), Coding Simulators, True or False Questions, etc.
🌐
Reddit
reddit.com › r/postgresql › how to model a multiple choice question database?
r/PostgreSQL on Reddit: How to model a Multiple Choice Question Database?
October 10, 2023 -

I am going to create an multiple choice based examination system. I am new to database design and want your help to answer a few questions. How to model the questions and answers?

  • Each question will have four options and only one correct answer. option 1:

create a table for questions, options and answer:
question:
  question_text varchar

options:
  question_id int primary_key,
  options_text varchar

question_answer: for storing the correct answer
  question_id int foreign_key,
  answer_id int foreign_key

user_question_answer:  # for storing the response of user.
  user_id int foreign_key,
  question_id int foreign_key,
  answer_id int foreign_key

option 2: store question, options and correct_answer in a single table.

question:
  question_text char,
	option_1 varchar,
	option_2 varchar,
	option_3 varchar,
	option_4 varchar,
    answer enum(1,2,3,4)

user_response:
  user_id int foreign_key,
  question_id int foreign_key,
  answer enum(1,2,3,4)
🌐
Fatskills
fatskills.com › home › databases › quizzes › postgresql fundamentals test
PostgreSQL Fundamentals Test | Practice Test / Quiz / MCQs | Fatskills.com
This Fatskills quiz has 82 questions to help you review key ideas in PostgreSQL Fundamentals Test. Practice multiple-choice questions, check answers instantly, and see which topics to revise.
🌐
PythonSkillset
pythonskillset.com › home › quizzes › postgresql › views quiz
Views Quiz — PostgreSQL · Free Timed Test | PythonSkillset
Test your knowledge of Views — intermediate postgresql quiz with accurate multiple-choice questions, explanations, and interview-style traps.
🌐
Pgexercises
pgexercises.com
PostgreSQL Exercises
Welcome to PostgreSQL Exercises! This site was born when I noticed that there's a load of material out there to help people learn about SQL, but not a great deal to make it easy to learn by doing. PGExercises provides a series of questions and explanations built on a single, simple dataset.