1. CA 1
Name: Adesh Hazra
Course: BCA
SEM: 4th semester
Subject: Database Management
System
University roll No:18301221022
2. What is DBMS?
A database management system (or DBMS) is essentially
nothing more than a computerized data-keeping system.
Users of the system are given facilities to perform several
kinds of operations on such a system for either
manipulation of the data in the database or the
management of the database structure itself. Database
Management Systems (DBMSs) are categorized according
to their data structures or types.
DBMS allows users to create their own databases as per their
requirements. The term “DBMS” includes the use of
a database and other application programs. It provides an
interface between the data and the software application.
3. 1. Improved data sharing and data security
Database management systems help users share data quickly,
effectively, and securely across an organization. By providing
quick solutions to database queries, a data management system
enables faster access to more accurate data.
2. Effective data integration
Implementing a database management system will promote a
more integrated picture of your operations by easily illustrating
how processes in one segment of the organization affect other
segments. What once was done completely manually now can be
fully automated and more accurate.
3. Consistent, reliable data
Data inconsistency occurs when different versions of matching
data exist in different places in an organization. For example, one
group has a client’s correct email, and another the correct phone
number..
4. Data that comply with privacy regulations
Database management systems provide a better framework for
the enforcement of privacy and security policies. By orchestrating
data in a unified manner, companies can manage privacy and
data security centrally, helping unify their systems of record and
lowering the risk of regulatory violations.
Advantages of DBMS
4. Various SQL commands
1. Data Definition Language (DDL)
•DDL changes the structure of the table like creating a table,
deleting a table, altering a table, etc.
•All the command of DDL are auto-committed which means it
permanently saves all the changes in the database.
Here are some commands that come under DDL:
•CREATE
•ALTER
•DROP
•TRUNCATE
a. CREATE It is used to create a new table in the database.
Syntax:
CREATE TABLE EMPLOYEE(Name VARCHAR2(20), Email VARCHA
R2(100), DOB DATE);
1.DROP TABLE table_name;
To add a new column in the table
1.ALTER TABLE table_name ADD column_name COLUMN-
definition;
a. INSERT: The INSERT statement is a SQL query. It is used to
insert data into the row of a table.
Syntax:
1.INSERT INTO TABLE_NAME
2.(col1, col2, col3,.... col N)
3.VALUES (value1, value2, value3, .... value);
b. UPDATE: This command is used to update or modify the
value of a column in the table.
Syntax:
1.UPDATE table_name SET [column_name1= value1,...colum
n_nameN = valueN] [WHERE CONDITION]
5. Key constraints
•NOT NULL constraints
NOT NULL constraints prevent null values from being entered into a column.
•Unique constraints
Unique constraints ensure that the values in a set of columns are unique and not null
for all rows in the table. The columns specified in a unique constraint must be defined
as NOT NULL. The database manager uses a unique index to enforce the uniqueness of
the key during changes to the columns of the unique constraint.
•Primary key constraints
You can use the primary key and foreign key constraints to define relationships between
tables.
•(Table) Check constraints
A check constraint (also referred to as a table check constraint) is a database rule that
specifies the values allowed in one or more columns of every row of a table. Specifying
check constraints is done through a restricted form of a search condition.
•Foreign key (referential) constraints
Foreign key constraints (also known as referential constraints or referential integrity
constraints) enable you to define required relationships between and within tables.
•Informational constraints
An informational constraint is a constraint attribute that can be used by the SQL
compiler to improve the access to data. Informational constraints are not enforced by
the database manager, and are not used for additional verification of data; rather, they
are used to improve query performance.