Answer: Entity is a 'thing' in the real world with an independent existence. An entity is something which is described in the database by storing its data, it may be a concrete entity a conceptual entity.
For Example: Every person in a college is an entity, Every room in a college is an entity.
Entity type is a collection (set) of entities that have same attributes. Entities with the same basic attributes are grouped or typed into an entity type. For Example: EMPLOYEE and PROJECT.
Entity set is a collection of all entities of particular entity type in the database. Each entity type will have a collection of entities stored in the database, this is called entity set.
- Rahul, Ajay & Rohit are each categorized as Entity.
- Employee will be the Entity type.
- Entity set will be {Rahul, Ajay, Rohit} - i.e. set of instances of entity.
27) What Is An Attribute? Also Define What Is A Domain?
Answer: Attribute is a particular property, which describes the entity. Attribute will have a name and a value for each entity. Attributes are also called columns or fields in DBMS.
A domain defines a set of permitted values for a attribute or a set of allowable value for an attribute defines the domain of that attribute.
EXAMPLE:
- Colour is an attribute.
- Domain of Colour attribute would be {Blue, Green, Violet, yellow, Red, Black, White, Orange….}
28) What Are The Different Types Of Attributes In DBMS?
Answer: The three different types of attributes in DBMS are:
- Simple
- Composite
- Multi-Valued.
29) Differentiate Between Simple, Composite & Multi-Valued Attributes In DBMS?
Answer:
Simple attribute is one in where each entity has a single atomic value for the attribute.
For example, SSN, Sex, Title.
Composite attribute is one where an attribute may be composed of several components.
For example:
Address (Flat No., Wing No., Building No., Street, City, State, Pin code, Country), or Name(First Name, Middle Name, Last Name).
Composition may form a hierarchy where some components are themselves composite.
Multi-Valued attribute is one where an entity may have multiple values for that attribute.
For example, Color of a CAR or Previous Degrees of a STUDENT. Denoted as {Color} or {Previous Degrees}.
In general, composite and multi-valued attributes may be nested arbitrarily to any number of levels, although this is rare.
For example, Previous Degrees of a STUDENT is a composite multi-valued attribute denoted by { Previous Degrees (College, Year, Degree, Field) }
Multiple Previous Degrees values can exist. Each has four subcomponent attributes: College, Year, Degree, Field.
30) What Are Relation Schema & A Relation?
Answer: A relation Schema, denoted by R (A1, A2… An) is made up of the relation name R and the list of attributes Ai that it contains. A relation is defined as a set of tuples (rows). Let r be the relation which contains set tuples (t1, t2, t3... tn). Each tuple (row) is an ordered list of n-values t= (v1, v2... vn).
A relation schema is a named relation defined by a set of attribute and domain name pairs. A relational database schema is a set of relation schemas, each with a distinct name.
Relations are also called as tables in DBMS.
ALSO CHECK THE BELOW FAQ's:
31) What Is Degree Of A Relation?
32) Discuss The Properties Of A Relation?
33) What Is Relationship, Relationship Type & Relationship Set?
34) What Is Degree Of Relationship Type?
35) What Is A Recursive Relationship Type?
36) What Is An Extension Of Entity Type?
37) What Is Weak Entity Set?
38) What Is An Entity? Differentiate Between Strong & Weak Entity?
39) What Is An Attribute? What Are The Types Of Attributes?
40) Differentiate Between The Different Types Of Attributes?
... Return To HR Interview Questions With Answers Main Page.
Comments
Post a Comment
Please share your opinions and suggestions or your experience in the comments section. This way we can all help each other...
Experienced guys can share their resumes at admin@interview-made-easy.com