Definitions of Data and Information
Data: Data usually refers to raw data, or
unprocessed data. It is the basic form of data
that hasn’t been analyzed or processed in any
manner.
Information: Once the data is analyzed, it is
considered as information.
Some differences between data and
information
Data Information
• Data is the raw material. • Information is the product.
• Data is unprocessed facts • Information is processed
and figures data.
• Data is used as input for • Information is the output of
the computer system. data.
• Data doesn’t depend on • Information depends on
Information. data.
• Information is specific.
• Data is not specific.
• Information must carry a
• Data doesn’t carry a
logical meaning.
meaning.
Database: Definition
• Database: A database is an organized collection
of interrelated data that is stored in a computer
system.
Databases allow their users to enter, access,
and analyze their data quickly and easily.
A database is made up of tables. Tables store
similar information
11/7/2022 5
A Database Management System (DBMS) is a
software package designed to store, access,
manipulate and process the data present
within the database easily and efficiently, that
is, manage the data.
11/7/2022 6
Database: Applications
Almost all applications we use in real world
have database!
Banking: transactions
Airlines: reservations, schedules
Universities: registration, grades
Sales: customers, products, purchases
Online retailers: order tracking, customized
recommendations
Manufacturing: production, inventory, orders, supply
chain
Human resources: employee records, salaries, tax
11/7/2022 7
deductions
Entity, attribute and relationship
Entity
An entity is a thing of interest to a system about which
information is stored. An entity is a unique object in
the real world.
An entity can be a person, place, event, or object that
is relevant to a given system.
For example, in a University Database, some likely
entities would include: Student, Instructor, Course.
They are typically nouns.
11/7/2022 8
• Entities are represented by means of
rectangles. Rectangles are named with the
entity set they represent.
University Department Student
11/7/2022 9
• Strong entities exist independently from other entity
types. They always possess one or more attributes
that uniquely distinguish each occurrence of the
entity.
• Weak entities depend on some other entity type.
They don't possess unique attributes (also known as
a primary key) and have no meaning in the diagram
without depending on another entity. This other
entity is known as the owner.
11/7/2022 10
The comparison between Strong Entity
Set and Weak Entity Set is as follows:
•
11/7/2022 11
11/7/2022 12
Attributes
Attributes are characteristics of an entity.
Example : University Management System
Entity : Student
Attributes : StudentID, Name, DOB,
Address, EmailAddress, PhoneNumber
11/7/2022 13
• Attributes are represented by means of
ellipses. Every ellipse represents one attribute
and is directly connected to its entity
(rectangle).
• Multi-valued attributes are those that are capable
of taking more than one value.
Multi-valued attributes are depicted by double
ellipse.
• Derived attributes are attributes whose value can
be calculated from related attribute values.
Derived attributes are depicted by dashed ellipse.
11/7/2022 14
Phone
Address E-mail
Student
Age
DOB Name SID
11/7/2022 15
Relationships
• Relationships are meaningful associations
between or among entities. They are usually
verbs, e.g. assign, take, or teach. A
relationship provides useful information that
could not be determined with just the entity
types.
11/7/2022 16
• Relationships are represented by
diamond-shaped box. Name of the
relationship is written inside the diamond-box.
All the entities (rectangles) participating in a
relationship, are connected to it by a line.
• Weak relationships, or identifying
relationships, are connections that exist
between a weak entity type and its owner.
11/7/2022 17
11/7/2022 18
Entity-Relationship (ER) Diagram
• An entity-relationship (ER) diagram is a graphical
representation of entities and their relationships to
each other, typically used to organize data within
databases or information systems.
• The database is designed from the ER Diagram or we
can say that the ER diagram is converted to the
database.
• Each entity in the ER diagram corresponds to a table in
the database.
• The attributes of an entity corresponds to fields of a
table.
11/7/2022 19
ER Diagram for a College
11/7/2022 20
Database tables, fields, values
In a database, all the data are stored in a
table. For example, Student table.
Columns contains what information is to be
stored, which are called fields.
Each row is called a record, where, values for
each field is stored.
11/7/2022 21
Database tables, fields, records
Field
SID Name DOB Address Phone E-mail
0001 Joynal 25/08/1998 Uttara 0145576 ja@iubat.
Abedin 7781 edu
Record 0002 Mizanur 06/05/1996 Uttara 0145566 mr@iubat
Rahman 9781 .edu
0003 Ayesha 21/10/1997 Tongi 0145566 ah@iubat
Ahmed 7791 .edu
0004 Idris Ali 12/12/1996 Gazipur 0145566 ia@iubat.
7701 edu
0005 Zannatul 05/03/1998 Narsingdi 0145566 zf@iubat.
Ferdous 7751 edu
11/7/2022 22
Entities, attributes and relationships
Relationships
A relationship is an association among several entities. Example: students are
enrolled in courses. Instructor teaches courses.
Example :
1001 (Professor M) teaches CSC103
Instructor entity relationship set Course entity
A Cardinality Constraint defines when a certain relation can only have a certain
number of instances for a relationship.
11/7/2022 23
Entities, attributes and relationships
Different types of cardinalities are:
One-to-one: Where one instance in an entity refers to one and only one
instance in the related entity. Denoted using 1 in both end in the diagram.
(HOD-DEPT)
Many-to-one: Where many instances of an entity can relate to only one
instance of the second entity. (Student-Dept M:1)
One-to-many: One instance in an entity refers to one or more instances
in the related entity. (Dept-Student 1:M)
Many-to-many: Exists when one instance of the first entity (parent) can
relate to many instances of the second entity (child), and one instance of
the second entity can relate to many instances of the first entity.
(Student-Subject M:N)
11/7/2022 24
Entities, attributes and relationships
11/7/2022 25
Keys
❑A key is a field that you use to sort data.
❑ A primary key is a key in a relational database that
is unique for each record. A relational database
must always have one and only one primary key.
Example: {StudentID}
❑ Every table should have a primary key
❑ Column that is 100% unique
❑ No rows can have same primary key
11/7/2022 26
❑ Foreign Key: A foreign key is generally a primary
key from one table that appears as a field in
another table to establish a relation between the
first and second tables.
❑ Example: {CourseId}
11/7/2022 27
Foreign Key
SID Name DOB Address CourseID
0001 Joynal 25/08/1998 Uttara C0010
Abedin
0002 Mizanur 06/05/1996 Uttara C0020
Rahman
0003 Ayesha 21/10/1997 Tongi C0030
Ahmed
Relationship
Primary Key
CourseID CourseName
C0010 Computer
Fundamentals
C0020 Basic Mathematics
C0030 English
11/7/2022 28
Thanks