-
Data & It's types, Information
-
Data Storage Approach
-
Manual Data Storage Approach
-
Computerized Data Storage Approach
-
File Based System
-
Database System
-
Disadvantages of File based System
-
Advantages of Database System
-
Disadvantages of Database System
-
Database Application
-
DBMS
-
Functions of DBMS
-
Features of DBMS
-
-
Components of Database System
-
E-R Model
-
Entity & It's types
-
Attribute & It's types
-
Relationship & It's types
-
Identifiers
-
-
Key or Constraint
-
Unique Key
-
Not Null Key
-
Primary Key
-
Foreign Key
-
Candidate Key
-
Alternate Key
-
Check Constraint
-
Default Constraint
-
-
Relational Database & RDBMS
RDBMS FUNDAMENTALS
E-R MODEL
• A model that is used to represent entities and their relationship is called E-R model.
• It stands for Entity-Relationship model.
• An E-R model uses different symbols to represent entities, attributes and relationship.
• Example:-
Elements of E-R model
• The following are various elements of E-R model:-
1. Entity
2. Attribute
3. Relationship
4. Identifier
Entity
o An entity is a real world object that has physical or logical existence.
o It may represent a boy, a girl, a fan, a man, etc.
o It is represented by a rectangular symbol with the name of entity written in capital letter.
o Syntax:-
o Example:-
o An entity has two parts:-
I. Entity instance:-
It represents a part of an entity.
II. Entity type:-
It represents the common behavior among entity instances.
o Types of entity:-
There are 2 types of entity:
I. Strong entity:-
• An entity that does not depend on other entities is called as strong entity or super entity.
• A strong entity must have an attribute that can be used as primary key.
• It is represented by rectangular symbol.
• Example:-
II. Weak entity:-
• An entity that depends on other entities is called weak entity or sub entity.
• It may not have a primary key.
• It is represented by double rectangular symbol.
• Example:-
Attribute
o Attributes are the properties of an entity.
o The one or more fields that are used to describe an entity are called as attributes.
o It is represented by oval shape.
o Syntax:-
o Example:-
o Types of attribute:-
I. Single valued attribute/simple attribute:-
• An attribute that can store only one value at a time is called as single valued attribute/simple attribute.
• Example:- roll, name, etc.
II. Multi-valued attribute:-
• An attribute that can store more than one value at a time is called as multi-valued attribute.
• Multi-valued attributes are represented by double oval shape.
• Example:-
III. Composite attribute:-
• An attribute that can be decomposed into sub-attributes is called as composite attribute.
• Example:- name, address, etc.
IV. Stored attribute:-
• It is an attribute that has its own value.
• It means it has its own existence.
• Example:- salary, mark, etc.
V. Derived attribute:-
• It is an attribute which can be derived from stored attribute.
• It is represented by dotted oval shape.
• Example:- total_mark
Relationship
o A relationship is the link between two or more entities.
o It represents the common attribute or behavior among entity instances.
o It is represented by a diamond symbol.
o Types of relationship:-
There are following types of relationship:-
I. One-to-one relationship:
• In one-to-one relationship, an instance of an entity links with a single instance of an another entity.
II. One-to-many/many-to-one relationship:
• In one-to-many relationship, an instance of an entity links with number of instances of another entity.
• The reverse of one-to-many relationship is called as many-to-one relationship.
III. Many-to-many relationship:
• In many-to-many relationship, two or more instances of an entity may link with two or more instances of an another entity.
Identifier
o An identifier is one or more attributes that can uniquely identify an entity.
o It can be represented by an underline symbol with the attribute.
o All the attributes may not be identifiers but all the identifiers must be attributes.
Related Topics:
-
Data & It's types, Information
-
Data Storage Approach
-
Manual Data Storage Approach
-
Computerized Data Storage Approach
-
File Based System
-
Database System
-
Disadvantages of File based System
-
Advantages of Database System
-
Disadvantages of Database System
-
Database Application
-
DBMS
-
Functions of DBMS
-
Features of DBMS
-
-
Components of Database System
-
E-R Model
-
Entity & It's types
-
Attribute & It's types
-
Relationship & It's types
-
Identifiers
-
-
Key or Constraint
-
Unique Key
-
Not Null Key
-
Primary Key
-
Foreign Key
-
Candidate Key
-
Alternate Key
-
Check Constraint
-
Default Constraint
-
-
Relational Database & RDBMS