Skip to main content

Define the following terms: Entity, Attribute, Attribute Value, Relationship Instance, Composite Attribute, Multi-valued Attribute, Derived Attribute, Complex Attribute, Key Attribute, Value set(Domain), Recursive Relationships?

Entity – An entity can be a real-world object, either animate or inanimate, that can be easily identifiable. For example, in a school database, students, teachers, classes, and courses offered can be considered as entities. All these entities have some attributes or properties that give them their identity.

Attribute – In general, an attribute is a characteristic. In a database management system (DBMS), an attribute refers to a database component, such as a table. It also may refer to a database field. Attributes describe the instances in the row of a database.

Attribute Value – Attribute value is the real data of a particular entity for each of its attributes. In other word, associated with each real world entities are certain attributes that describe that entity; value of these attributes for any entity is called attribute value. For example, attribute value of first_name of attribute of student_name can be Gyanendra. 

Relationship Instance – Each relationship instance ri in R is an association of entities, where the association includes exactly one entity from each participating entity type. Each such relationship instance ri represent the fact that the entities participating in ri are related in some way in the corresponding miniworld situation. For example, in relationship type WORKS_FOR associates one EMPLOYEE and DEPARTMENT, which associates each employee with the department for which the employee works. Each relationship instance in the relationship set WORKS_FOR associates one EMPLOYEE and one DEPARTMENT.

Composite Attributes – Composite attribute is an attribute that can be divided into smaller subparts, which represent more basic attributes with dependent meanings, is called a composite attribute. For example, the Address attribute consists of several domains such as house number, street number, city, country, etc. 

Multivalued Attribute – A multi-valued attribute can have more than one value at one time. For example, address of a person is a multi-valued attribute since a person can have more than one address such as Present and Permanent address. Upper and lower bounds may be placed on the number of values in a multi-valued attribute. For example, a bank may limit the number of addresses recorded for a single customer to two.

Derived Attribute -  If an attribute’s value can be determined from the values of other attributes, then the attribute is derivable, and is said to be a derived attribute. Example: consider attributes for an employee: birth date, current age; here, age is derivable by subtracting the birth date from the current date.

Complex Attribute  – Composite and multivalued attribute can be nested arbitrarily. Arbitrary nesting can be represented by grouping components of a composite attribute between parenthesis and separating the components with commas and by displaying multivalued attributes between braces. Such attributes are called composite attributes. For example, if a person has more than one address and each residence has multiple phones and address_phone attribute can be specifies as: {AddressPhone((Phone{AreaCode,PhoneNumber)},Address(StreetAddress(Number,Street,ApartmentNumber), City, State, Zip) ) }

Key Attribute – Each real world entity is unique in itself. There are certain attributes whose value is different for all similar type of entities. Those attributes are called key attributes. These attributes are used to specify uniqueness constraint in relation. For example, a house has a registration number. This is a key of all entity of house. 

 Value Set(Domain) – There is a range of values from which a particular attribute can take value for a attribute of a real world entity. For example, salary attribute of an employee must have value, let, from $2000 to $12000, and then all integers in range $2000 to $12000 are domain of attribute salary.

Recursive relationships – a relationship has always been between occurrences in two different entities. However, it is possible for the same entity to participate in the relationship. This is termed a recursive relationship. Let us take the example of an employee who is also a manager.


Comments

Popular posts from this blog

Define Primary Key, Candidate Key and Super Key?

Super Key Super Key is defined as a set of attributes within a table that uniquely identifies each record within a table. Super Key is a super-set of Candidate key. Example - Suppose we have a table that holds all the managers in a company, and that table is called Managers. The table has columns called ManagerID, Name, Title, and DepartmentID. Every manager has his/her own ManagerID, so that value is always unique in each and every row. This means that if we combine the ManagerID column value for any given row with any other column value, then we will have a unique set of values. So, for the combinations of (ManagerID, Name), (ManagerID, TItle), (ManagerID, DepartmentID), (ManagerID, Name, DepartmentID), etc – there will be no two rows in the table that share the exact same combination of values, because the ManagerID will always be unique and different for each row. This means that pairing the Manager ID with any other column(s) will ensure that the ...

Discuss the difference between the ER model and Relational Model?

E-R Model and Relational Model both are the types of Data Model. Data Model describes a way to design database at physical, logical and view level. The main difference between E-R Model and Relational Model is that E-R Model is entityspecific, and Relational Model is table specific. Let us discuss some differences between E-R Model and Relation model with the help of comparison chart shown below.