You are on page 1of 7

What is Data?

Data is a collection of information.

It can be used in a variety of forms like

Text, numbers, media, bytes, etc.

It can be stored in pieces of paper or electronic memory, etc.

Data is information that can be translated into one form to


another form

What is Database?

A database is an organized collection of data, so that it can be


easily accessed and managed.

You can organize data into tables, rows, columns, and index it to
make it easier to find relevant information.

Database handlers create a database in such a way that only


one set of software program provides access of data to all the users.

The main purpose of the database is to operate a large amount


of information by storing, retrieving, and managing data.
There are many databases available like

1. MySQL,

2. Sybase,
3. Oracle,
4. Mongo DB,
5. Informix,

6. SQL Server, etc.


SQL or Structured Query Language is used to operate on the data stored
in a database. 
Difference between File System and DBMS
1. File System : 
File system is basically a way of arranging the files in a storage
medium like hard disk or external devices.
File system organizes the files and helps in retrieval of files when
they are required.
File systems consists of different files which are grouped into
directories.
2. DBMS(Database Management System) : 
Database Management System is basically software that manages
the collection of related data.

It is used for storing data and retrieving the data effectively when
it is needed. It also provides proper security measures for protecting the
data from unauthorized access.
1. DATABASE CONCEPTS
1.1 Introduction
A database is an organized collection of data.
The data are typically organized to model relevant aspects of reality in a
way that supports processes requiring this information.
It is an electronic storage of data.
It stores information and relationship among different things.

Basic terms to examine the structure of a Database


The terms are entity, data, attributes, entity set and relationship.
Entity:
A person, place, event or item is called an entity. Example:
Customer, Transaction, Employee, Library, etc.,

Data:
The facts describing an entity are known as data. Example: For a
Customer, custno, custname, address…, etc., are maintained in a register
which describes the characteristics of the entity Customer.
CUSTNO CUSTNAME ADDRESS
1 A X
2 B Y
3 C Z

Attributes:
Each entity can be described by its characteristics, which are
known as attributes.
Example: For a Student, name, regno, class, address etc….

Entity Set:
All the related entities are collected together to form an entity set.
An entity set is given a singular noun.
Example: The student entity set contains data about student only.
All related entity in the STUDENT entity set is student. Similarly a
company keeps track all of its employees is an entity set called
EMPLOYEES. The EMPLOYEE entity set does not contain about the
company’s customers, because it would not make any sense.

Database:
A database is a collection of entity sets.
Example: A college database may include entities such as student,
faculty, course, term, office, building, exam etc., the entities in a database
are likely to interact with other entities.

Relationship:
The interactions between the entity sets are called relationship.
Example: A faculty member teaches in a college, so the relationship
between FACULTY and COLLEGE is teaches.
1.2 Relationship
The interactions between the entity sets are called relationship.

Example: A faculty member teaches in a building, so the relationship between


FACULTY and BUILDING is teaches.

Types of Relationships
The database design requires creating various entity sets and establishing
the relationship between the entity sets within the database. The different
database management software packages handle the creation and use of
relationship in different manners. Depending upon the type on interaction, the
relationship is classified in to three categories.
1. One –to-one relationship:
A one-to-one relationship is written as 1:1 in short form.
It exists between two entity sets X and Y. If an entity set X has only one
matching entity in entity set Y, and vice versa.
Example: A College has one Principal. A Department is led by one
Head.
2. One-to-Many relationship:
A one-to-one relationship is written as 1:M in short form.
It exists between two entity sets X and Y. If an entity in entity set X has
many matching entities in entity set Y, but an entity in entity set Y has only one
matching entity in entity set X.
Example: A faculty teaches to Many Students of a class room, but the
students had a relationship with one faculty member.

3. Many-to-Many relationship:
It also write in M:N (or) M:M
It exists of two entity set X and Y. If an entity in entity set X has many
matching entities in entity set Y and an entity in entity set Y has many matching
entities in entity set X.
Example: Many Courses availed for Many Students.

To determine the type of relationship, consider the following two questions.

1. Does an entity in entity set X have more than one matching entity in entity set Y?
2. Does an entity in entity set Y have more than one matching entity in entity set X?

The answer for both the questions is NO, and then the relationship lies in 1:1
The answer for the first question is Yes and second question is NO, then the
relationship lies in 1:M
The answer for both the questions is Yes, then the relationship lies in M:M (or)
M:N

You might also like