Dbms
Dbms
Data:
● Facts or figures to be processed which are in the form of text,
observations, figures, images, numbers, graphs, or symbols.
● Data is a raw facts wich are composed of alphabet, number and
some symbols.
● It may or may not give any sense.
Information
It refers to data that has been processed or organized in a meaningful
way.
1 Sabin Lamjung
Database:
Database is a collection of interrelated data of entities or objects which is
stored in a computer in a such a way that it can be easily accessed by
user.
Example:
Phone diary, result sheet etc.
DATABASE MANAGEMENT SYSTEM
User may be persons or application from external environment that supplies various
requests to the system. The database system checks for the requests and performs
various activities as per the need of users.
Objective of Database:
Advantages of DBMS:
• Data Centralization: DBMS allows for centralizing data storage, eliminating
the need for multiple copies of the same data. This promotes data
consistency and reduces data redundancy.
• Data Sharing: DBMS enables multiple users to access and share data
concurrently. User can access the same database for different purpose.
• Reduced data redundancy: the same data can be duplicated at many times or
places, is called data redundancy. DBMS reduces such type of duplication of
data from database.
• Data back up and recovery: DBMS provides backup facilities to store data for
future use. If any file list in any computer, it is possible to restore them from
database server.
DATABASE MANAGEMENT SYSTEM
Disadvantages of DBMS:
Complexity: DBMS can be complex to design, set up, and manage. It requires a
deep understanding of database concepts.
Changing technology: user have to learn new updates regularly because of the
change in technology.
Backup is needed: data stored in database needs to backup which adds cost
as new storage space are needed.
DATABASE MANAGEMENT SYSTEM
Fields:
Fields, also known as columns or attributes, represent the individual data elements
within a table. Each field holds a specific type of data, such as numbers, text,
dates, or binary data.
For example, in a table representing student information, fields could include
“S_ID," “S_Name," "Email," and "Phone"
Records:
A record, also called a row or tuple, is a complete set of related data within a table.
It consists of a collection of values that correspond to the fields defined in the
table.
Example: 15," “sabin," “[email protected]," and “01 22222"
Tables:
A table is a structured collection of related records, organized in rows and
columns. Tables are used to store and manage data in a structured manner,
providing a way to retrieve, update, and manipulate information.
DATABASE MANAGEMENT SYSTEM
Table: student
In this example, the table “student" has four fields: “S_ID," “s_Name,"
"Email," and "Phone." Each row represents a record, and the table contains
two records with specific values for each field.
DATABASE MANAGEMENT SYSTEM
Database language:
Syntax:
Example:
CREATE TABLE Student (
s_id INT,
s_name VARCHAR(100)
);
DATABASE MANAGEMENT SYSTEM
Syntax:
Example:
It includes commands such as GRANT and REVOKE which mainly deal with
the rights, permissions, and other controls of the database system.
Primary key
• A set of rules and standards that define how the database organizes data is
called database model.
• It shows the logical structure of a database including the relationships, data
types structure of tables.
• It provide us with a transparent picture of data which helps us in creating an
actual database.
Advantage:
Disadvantages:
Advantages:
Disadvantages:
Advantages:
● Breaking of complex database table into simple database table
becomes possible .
● Database processing is faster than other model.
● There is very less redundancy (repetition of data).
● It maintains data integrity.
Disadvantages:
● It is more complex than others models.
● There are too many rules because of complex relationship.
● It needs more powerful computers and data storage devices.
● Cost is high for hardware and softwares.
Normalization of Data
What is Normalization?:
Benefits of Normalization:
● Minimize data redundancy.
● dependency between data field is identified.
● maintains data consistency and data integrity.
● improves database performance.
● simplifies the structure of tables.
● avoids the loss of information.
Normalization Process:
NSS102 Ram Oli , Sri Oli CS202, CS203 Computer Science 15/01/2024 22/01/2024
Normal forms are used to ensure that various types of anomalies and
inconsistencies are removed from the database.
First-Normal form(1-NF)
• A relation will be 1NF if it contains an atomic attribute/field
name.
• Every column in the table must be uniquely named.
• It states that an attribute of a table can not hold multiple values
in a record which means it must hold only single-value.
• It eliminates duplicate rows and columns from the same table.
Let us consider the following Student, Class and Subject tables as the reference
table which is in 2NF.
S_ID First Last C_ID C_ID Class Class Book_Name
Name Name
NSS100 Sabin Bagale C10 C10 10 10 Computer Science
Access Control: Controlling who can access the database and what
actions they can perform. This involves user authentication (verifying users'
identities) and authorization (determining what actions users are allowed to
perform).