DBMS UNIT_1
DBMS UNIT_1
Example –
Let’s say a table teacher in our database name school, the
teacher table require the name, dob, doj in their table so we
design a structure as :
Teacher table
name: String
doj: date
dob: date
1. Real-world entity
2. Relational databases
For example:
If you want to keep track of your personal details then you will
need three different attributes namely name, address, phone
number. All of these attributes together form a single row in a
table. This means that every time we add new information into
our database, we must insert multiple rows into the same
table.
If we do not follow this rule then we may end up having
duplicate entries in our database. So relational databases
allow us to organize data using relations between objects.
5. ACID properties
8. Transactional processing
9. Data mining
Introduction
It mainly concerned
It mainly concern about about the structure or
how the data is stored the changing data
into the system. definition.
It is difficult to retrieve
because the data is
mainly dependent on the
It is easy to retrieve. logical structure of data.
As compared to the
As compared to the physical independence it
logical independence it is is not easy to achieve
easy to achieve physical logical data
data independence. independence.
Example: Change in
compression techniques Example: Add/Modify or
and storage devices etc. Delete a new attribute.
a child node.
2. Network model
The network model is a type of database
3. E-R model
The ER model is used to describe the
consist of attributes.
course.
What is ER Diagram?
ER Diagram stands for Entity Relationship Diagram,
also known as ERD is a diagram that displays the
relationship of entity sets stored in a database. In
other words, ER diagrams help to explain the logical
structure of databases. ER diagrams are created
based on three basic concepts: entities, attributes
and relationships.
ER Diagrams contain different symbols that use
rectangles to represent entities, ovals to define
attributes and diamond shapes to represent
relationships.
ER Diagram Symbols
Entities
Attributes
Relationships
WHAT IS ENTITY?
A real-world thing either living or non-living that is
easily recognizable and nonrecognizable. It is
anything in the enterprise that is to be represented in
our database. It may be a physical thing or simply a
fact about the enterprise or an event that happens in
the real world.
An entity can be place, person, object, event or a
concept, which stores data in the database. The
characteristics of entities are must have an attribute,
and a unique key. Every entity is made up of some
‘attributes’ which represent that entity.
Examples of entities:
Person: Employee, Student, Patient
Place: Store, Building
Object: Machine, product, and Car
Event: Sale, Registration, Renewal
Concept: Account, Course
Relationship
Relationship is nothing but an association among two or more entities. E.g.,
Tom works in the Chemistry department.
Entities take part in relationships. We can often identify relationships with verbs
or verb phrases.
For example:
Weak Entities
A weak entity is a type of entity which doesn’t have its key attribute. It can be
identified uniquely by considering the primary key of another entity. For that,
weak entity sets need to have participation.
In above ER Diagram examples, “Trans No” is a discriminator within a group of
transactions in an ATM.
Let’s learn more about a weak entity by comparing it with a Strong Entity
It is represented by a double
It is represented by a rectangle symbol.
rectangle symbol.
The member of a strong entity set is called as The member of a weak entity set
dominant entity set. called as a subordinate entity set.
For example, a lecture might have attributes: time, date, duration, place, etc.
Multivalued attribute Multivalued attributes can have more than one values.
For example, a student can have more than one mobile number,
email address, etc.
4. Relational model
In this data model, the data tables are used
Conclusion
For representing the database there is a