Question 1
EasyIn an ER diagram, what does a rectangle represent?
- A.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
DBMS
In an ER diagram, what does a rectangle represent?
A relationship
An attribute
An entity set
A key
Answer: C
Rectangles are entity sets, diamonds are relationships and ovals are attributes.
In an ER diagram, what does a diamond represent?
A derived attribute
An entity set
A weak entity
A relationship set
Answer: D
Relationships connect entity sets, for example Student — Enrols — Course.
What is an attribute?
A table
A database user
A property that describes an entity, such as a student's name
A relationship between two entities
Answer: C
Entities have attributes; for example, an Employee has an id, name and salary.
Which attribute is an example of a multivalued attribute?
Phone numbers of a person
Date of birth
Age
Employee ID
Answer: A
A person can have several phone numbers, so the attribute holds multiple values (shown by a double oval).
Which attribute is derived?
Date of birth
Employee ID
Name
Age, calculated from date of birth
Answer: D
A derived attribute can be computed from other attributes and is shown with a dashed oval.
What kind of relationship is 'one student can enrol in many courses, and one course has many students'?
One-to-one
One-to-many
Many-to-one
Many-to-many
Answer: D
Both sides can have many partners, so the relationship is M : N.
What is a composite attribute?
An attribute made of smaller parts, such as Name (first, middle, last)
A key attribute
An attribute calculated from others
An attribute with many values
Answer: A
A composite attribute can be divided into meaningful sub-attributes.
In the ER model, what is an entity?
A SQL command
A real-world object or thing that can be told apart from others, such as a student
A line in a diagram
A database user
Answer: B
Entities are the things the database stores data about.
What is an entity set?
A set of SQL queries
A single attribute
A collection of entities of the same type, such as all students
A relationship between two tables
Answer: C
An entity set usually becomes a table when the design is turned into a database.
In an ER diagram, what does an ellipse (oval) represent?
An entity set
An attribute
A weak entity
A relationship
Answer: B
Ellipses are attached to entity rectangles to show their attributes.