Q1
True / FalseIn ORACLE, an Entity-Relationship Diagram (ERD) is used to visually represent the structure of a database.
An ERD is a visual representation of the entities in a database and the relationships between them, which helps in designing and understanding the database structure.
Q2
True / FalseIn an ORACLE ERD, entities are represented by rectangles.
In an ERD, entities, which represent tables or objects in a database, are typically depicted as rectangles.
Q3
True / FalseIn ORACLE, a relationship in an ERD can be many-to-many.
A many-to-many relationship in an ERD indicates that multiple records in one entity are related to multiple records in another entity, usually requiring a junction table in the database schema.
Q4
True / FalseIn ORACLE, attributes in an ERD are depicted using ovals.
Attributes, which describe properties of entities, are often depicted as ovals connected to their respective entities.
Q5
True / FalseIn an ORACLE ERD, primary keys are indicated by underlining the attribute name.
Primary keys, which uniquely identify records in an entity, are typically indicated by underlining the attribute name in an ERD.
Q6
True / FalseIn ORACLE, foreign keys are used to establish relationships between entities in an ERD.
Foreign keys are attributes in one entity that reference primary keys in another entity, establishing relationships between the entities.
Q7
True / FalseIn ORACLE ERD, a weak entity does not have its own primary key.
A weak entity has a primary key, but it relies on a strong entity's primary key to form a composite key. It cannot exist without the strong entity.
Q8
True / FalseIn ORACLE ERD, a derived attribute is an attribute that can be calculated from other attributes.
Derived attributes are not stored in the database; they are calculated based on other stored attributes.
Q9
True / FalseIn ORACLE, an ERD can include both physical and logical data models.
An ERD can represent both logical data models (focusing on business requirements and relationships) and physical data models (focusing on the actual implementation in the database).
Q10
True / FalseIn ORACLE, identifying relationships in an ERD imply that the child entity is dependent on the parent entity for its identity.
In an identifying relationship, the child entity's primary key includes the parent entity's primary key, signifying dependency and a strong association.
Q11
Multiple ChoiceWhich SQL code snippet demonstrates creating a table based on an ERD where the primary key is a composite key?
SQL Code
CREATE TABLE enrollment (
student_id NUMBER,
course_id NUMBER,
enrollment_date DATE,
PRIMARY KEY (student_id, course_id)
);
Options A, B, and C correctly demonstrate the creation of a table with a composite primary key based on the ERD. Option D is incorrect because it defines a single-column primary key.
Q13
Multiple ChoiceWhich SQL code snippet demonstrates creating a many-to-many relationship in a database based on an ERD?
SQL Code
CREATE TABLE student_course (
student_id NUMBER,
course_id NUMBER,
PRIMARY KEY (student_id, course_id),
FOREIGN KEY (student_id) REFERENCES students(student_id),
FOREIGN KEY (course_id) REFERENCES courses(course_id)
);
Options A, B, and C correctly demonstrate creating a many-to-many relationship between students and courses based on the ERD model. Option D is incorrect because it lacks the foreign key constraints.
Q14
Multiple ChoiceWhich SQL code snippet demonstrates creating an ERD-based table with a self-referencing foreign key?
SQL Code
CREATE TABLE employees (
employee_id NUMBER PRIMARY KEY,
manager_id NUMBER,
FOREIGN KEY (manager_id) REFERENCES employees(employee_id)
);
Options A, B, and C correctly demonstrate creating a table with a self-referencing foreign key based on an ERD model. Option D is incorrect because it does not define the foreign key constraint.
Q15
Multiple ChoiceWhich SQL code snippet demonstrates the creation of a hierarchical relationship between tables based on an ERD model?
SQL Code
CREATE TABLE departments (
department_id NUMBER PRIMARY KEY,
parent_department_id NUMBER,
FOREIGN KEY (parent_department_id) REFERENCES departments(department_id)
);
Options A, B, and C correctly demonstrate creating a hierarchical relationship between departments based on an ERD model. Option D is incorrect because it does not define the foreign key constraint.
Q16
Multiple ChoiceWhich SQL code snippet demonstrates advanced creation of an ERD-based table with multiple foreign keys?
SQL Code
CREATE TABLE project_assignment (
assignment_id NUMBER PRIMARY KEY,
employee_id NUMBER,
project_id NUMBER,
FOREIGN KEY (employee_id) REFERENCES employees(employee_id),
FOREIGN KEY (project_id) REFERENCES projects(project_id)
);
Options A, B, and C correctly demonstrate creating a table with multiple foreign keys based on an ERD model. Option D is incorrect because it lacks one of the foreign key constraints.
Q17
Multiple ChoiceWhich SQL code snippet demonstrates creating an advanced ERD-based table with a unique constraint on a composite key?
SQL Code
CREATE TABLE employee_contact (
employee_id NUMBER,
contact_type VARCHAR2(50),
contact_value VARCHAR2(100),
PRIMARY KEY (employee_id, contact_type),
UNIQUE (employee_id, contact_value)
);
Options A, B, and C correctly demonstrate creating a table with a unique constraint on a composite key based on an ERD model. Option D is incorrect because it does not define the unique constraint.
Q18
Multiple ChoiceWhich SQL code snippet demonstrates certification-level creation of an ERD-based table with multiple composite keys and foreign key constraints?
SQL Code
CREATE TABLE task_assignment (
task_id NUMBER,
employee_id NUMBER,
project_id NUMBER,
PRIMARY KEY (task_id, employee_id),
FOREIGN KEY (employee_id, project_id) REFERENCES project_assignment(employee_id, project_id)
);
Options A, B, and C correctly demonstrate certification-level creation of a table with multiple composite keys and foreign key constraints based on an ERD model. Option D is incorrect because it does not define the foreign key constraints correctly.
Q19
Multiple ChoiceWhich SQL code snippet demonstrates certification-level creation of a table with an ERD-based complex foreign key relationship?
SQL Code
CREATE TABLE order_items (
order_id NUMBER,
item_id NUMBER,
quantity NUMBER,
PRIMARY KEY (order_id, item_id),
FOREIGN KEY (order_id) REFERENCES orders(order_id),
FOREIGN KEY (item_id) REFERENCES items(item_id)
);
Options A, B, and C correctly demonstrate certification-level creation of a table with a complex foreign key relationship based on an ERD model. Option D is incorrect because it does not define the foreign key constraints correctly.
Q20
Multiple ChoiceWhich SQL code snippet demonstrates certification-level use of ERD concepts to create a normalized table structure with foreign key constraints?
SQL Code
CREATE TABLE product_category (
category_id NUMBER PRIMARY KEY,
parent_category_id NUMBER,
category_name VARCHAR2(50),
FOREIGN KEY (parent_category_id) REFERENCES product_category(category_id)
);
Options A, B, and C correctly demonstrate certification-level creation of a normalized table structure with foreign key constraints based on ERD concepts. Option D is incorrect because it does not define the foreign key constraint.