Q1
True / FalseIn PostgreSQL, a table is in First Normal Form (1NF) if it contains duplicate rows.
A table is in 1NF if it does not contain duplicate rows and each row is unique.
Q2
True / FalseIn PostgreSQL, a table must have a primary key to be in First Normal Form (1NF).
Having a primary key ensures that each row is unique, which is a requirement for 1NF.
Q3
True / FalseIn PostgreSQL, a table is in First Normal Form (1NF) if it contains only atomic (indivisible) values.
1NF requires that all columns contain atomic values, meaning each value is indivisible.
Q4
True / FalseIn PostgreSQL, a table with repeating groups or arrays in a column is not in First Normal Form (1NF).
Repeating groups or arrays violate the 1NF requirement of having atomic values in each column.
Q5
True / FalseIn PostgreSQL, a table with multi-valued attributes in a single column is considered normalized to First Normal Form (1NF).
Multi-valued attributes in a single column violate the principle of atomicity required by 1NF.
Q6
True / FalseIn PostgreSQL, a table that meets the requirements of First Normal Form (1NF) can still have redundancy issues.
1NF focuses on the atomicity of values and uniqueness of rows but does not address redundancy or other normalization issues which are dealt with in higher normal forms.
Q7
True / FalseIn PostgreSQL, converting a table to First Normal Form (1NF) may require splitting a column into multiple columns.
To achieve 1NF, a table might need to be restructured by splitting columns containing multiple values into separate columns each containing a single value.
Q8
True / FalseIn PostgreSQL, tables that are not in First Normal Form (1NF) can still be used efficiently in certain applications.
While not ideal for relational database design, non-1NF tables can still be used efficiently in some applications, though they may complicate querying and data integrity.
Q9
True / FalseIn PostgreSQL, a composite key can violate the First Normal Form (1NF).
A composite key does not violate 1NF as long as the composite key itself is atomic and the table meets other 1NF requirements.
Q10
True / FalseIn PostgreSQL, ensuring a table is in First Normal Form (1NF) includes making sure that each column contains only scalar values, such as integers or strings, but not arrays or records.
1NF requires that each column in a table contains only scalar values (atomic values), meaning no arrays or records should be present in any column.
Q22
Multiple ChoiceWhich normalization form eliminates partial dependency in a PostgreSQL table?
SQL Code
Given a table 'order_details' with columns 'order_id', 'product_id', and 'product_price', normalize it to 2NF by creating separate tables for orders and products.
CREATE TABLE orders (
order_id SERIAL PRIMARY KEY,
order_date DATE
);
CREATE TABLE products (
product_id SERIAL PRIMARY KEY,
product_name VARCHAR(100),
product_price NUMERIC(10, 2)
);
CREATE TABLE order_details (
order_detail_id SERIAL PRIMARY KEY,
order_id INT REFERENCES orders(order_id),
product_id INT REFERENCES products(product_id)
);
The Second Normal Form (2NF) eliminates partial dependencies, meaning that no non-prime attribute should be functionally dependent on a part of a candidate key.