Sei sulla pagina 1di 19

Some Basic Terms

Enterprise: any kind of organization such as bank, a university or a hospital etc. Entity: it is a person, place, thing, event or concept about which information can be recorded. In banking environment customers, bank accounts etc are the entities. Attribute : it specifies the characteristics of the entity. In other words every entity has some basic attributes that characterize it.

Types of attributes
Single valued versus multi valued attributes : an attribute which has single value for a particular entity is called single valued example age. The attributes which have a set of values for the same entity are called as multi valued example colors of a car entity. Composite vs Simple(atomic): the attributes that can be divided into smaller independent sub attributes are called as composite(address) and that cannot be divided into smaller are called as Simple(age) Stored vs derived: An attribute that can be divided from another attribute is called derived example age if current date is known and DOB is known. An attribute that cannot be derived is called as stored

Types of attributes
Null value: an attribute of an entity has null value if its value is not known or not applicable to that entity. Complex attribute: if an attribute has composite and multi valued attributes then it is called as complex attributes. Domain : is a pool of values from which the actual value appearing in the columns (attributes) are drawn.

Entity Type
An entity type is the collection of entities that have the same attributes Entity set : the collection of all the entity type in the database at any point in time is called an entity set. Strong vs entity type: entity type that have key attribute are called strong entity type and that do not have key attribute called weak entity type, it is also called child entity type or subordinate entity type.

RELATIONSHIP TYPE
Relationships which connect entities and represent meaningful dependencies between them. The way in which two or more entity types are related is called relation type. For example the relationship type is Work_for between the two entity type EMPLOYEE & DEPARTMENT. The number of participating entity types is known as the degree of relationship type. A relationship type of degree two is called binary for example work_for. Ternary relationship in which entity type are three example relation Supply and entity types are PROJECT, SUPPLIER, PART.

Relationship Constraints
Two relationship constraints: Participation constraints and Cardinality ratio Total participation: every entity in the entity set must depend on another entity example if there is constraint that every employee must work for some department in an organization. Partial participation: in it some entities in the entity set are depend on another entity for example it is not required that all the employees manage some department, so the participation of EMPLOYEE in the Manages relationship type is partial.

Relation Model
Keys: Primary key, secondary Key, Foreign key, Super key, Unique key, Alternate key, Candidate key. Constraints : Domain Constraints : states that every value of an attribute should be atomic Tuple uniqueness constraint : tuple should be unique no redundancy

Constraints in relation model


Key Constraints : primary key should be unique Integrity Rule 1(Entity Integrity) : no value for a primary key can be null Integrity Rule 2(Referential Integrity rule): value of foreign key in the table A must be null or be available in the table B.

Potrebbero piacerti anche