4. DBM S-
A database management system (DBMS)
is system software for creating and
managing databases. The DBMS
provides users and programmers with a
systematic way to create, retrieve,
update and manage data.
Overall we can say that a dbms is a
system that is responsible for
holding,retriving,and manipulating of data
with presence of some constraints
5. About– ER-MODEL
Entity relationship model also called e-r model
and it is a high level model.
This model is used to define the data elements
and relationship for a specified system.
It develops a conceptual design for the
database. It also develops a very simple and
easy to design view of data.
In ER modeling, the database structure is
portrayed as a diagram called an entity-
8. Entity
An entity may be any object, class, person or
place.
In the ER diagram, an entity can be
represented as rectangles.
9. An entity can be of two types (by existance):-
•Tangible Entity : Entities that exist in the real world physically.
Example: Person, car, etc.
•Intangible Entity : Entities that exist only logically and have
no physical existence. Example: Bank Account, etc.
10. Weak Entity-
An entity that depends on another entity
called a weak entity.
The weak entity doesn't contain any key
attribute of its own.it has discriminator.
The weak entity is represented by a double
rectangle.
11. Strong Entity:
A strong entity is not dependent on any other
entity in the schema. A strong entity will always
have a primary key. Strong entities are
represented by a single rectangle. The relationship
of two strong entities is represented by a single
diamond.
12. Attribute-
The attribute is used to describe the
property of an entity.
For example - id, age, contact number,
name, etc. can be attributes of a student.
13. KeyAttribute-
The key attribute is used to represent the
main characteristics of an entity.
It represents a primary key.
The key attribute is represented by an oval shape
with the text underlined.
14. Different types of keys
The different types of keys in the database
management system (DBMS) are as follows −
•Primary key
•Super key
•Candidate key
•Alternate key
•Artificial key
•Foreign key
15. Candidate key
It is an attribute whose values uniquely identify
each record of a table. A table can have more than
one candidate key.
StdNo Name Branch Branch
01 Hari Cse A
02 Pinky Ece B
03 Bob Civil A
Let’s consider a table −
Candidate key satisfy some conditions which are as follows −
•Different records cannot be identical.
•Subset of the candidate key cannot be a key.
16. Primary Key
From many candidate keys, the database designer
selects one candidate key for his database called as
primary key. The primary key uniquely identifies
each record in a table and must never be the same
for two records.
•Uniqueness (two different records cannot be
identical).
•NOT NULL (null value is not allowed).
•Value in a primary key column can never be
modified or updated, if any foreign key refers to
that primary key
17. Alternate Key
Candidate keys which are not selected for primary
keys are called alternate keys. That is, except for
the primary key the remaining candidate keys are
alternate keys.
Super key
It is the superset of the candidate key. The combine
attributes where the first attribute always have
uniqueness and second attribute may or may not
have uniqueness.
18. Artificial key
It is used in the form of indexes. If the size of the
database is large and no attribute can be specified
as a key field then the index or artificial key is
applied on the given database.
19. Foreign key
In a relation, the column whose data values
correspond to the values of a key column in
another relation is called a foreign key. In a
relational database, the foreign key of a relation
may be the primary key of another relation.
21. Multivalued Attribute-
An attribute can have more than one value.
These attributes are known as a
multivalued attribute.
The double oval is used to represent
multivalued attribute.
22. Derived Attribute-
An attribute that can be derived from other
attribute is known as a derived attribute.
It can be represented by a dashed oval.
23. Relationship-
A relationship is used to describe the
relation between entities.
Diamond shape is used to represent
the relationship.
There are two types one is strong relation
and second is weak relation.
Strong relationship represented by a single
diamond where weak relationship represented by
double diamond
24. Types of relationship -
1.One-to-One Relationship
When only one instance of an entity is
associated with the relationship, then it is
known as one to one relationship.
For example, A female can marry to one
male, and a male can marry to one female.
25. 2.One-to-many relationship
When only one instance of the entity on the left,
and more than one instance of an entity on the
right associates with the relationship then this is
known as a one-to-many relationship.
For example, Scientist can invent many
inventions, but the invention is done by the only
specific scientist.
26. 3.Many-to-one relationship
When more than one instance of the entity on the
left, and only one instance of an entity on the right
associates with the relationship then it is known as
a many-to-one relationship.
For example, Student enrolls for only one course,
but a course can have many students.
27. 4.Many-to-many relationship
When more than one instance of the entity on the
left, and more than one instance of an entity on the
right associates with the relationship then it is known
as a many- to-many relationship.
For example, Employee can assign by many
projects and project can have many employees.