Dbms Lab Manual
Dbms Lab Manual
LIST OF EXPERIMENTS
1. Create a database table, add constraints (primary key, unique, check, Not null), insert rows, update
2. Create a set of tables, add foreign key constraints and incorporate referential integrity.
3. Query the database tables using different ‘where’ clause conditions and also implement aggregate
functions.
4. Query the database tables and explore sub queries and simple join operations.
5. Query the database tables and explore natural, equi and outer joins.
8. Write SQL Triggers for insert, delete, and update operations in a database table.
9. Create View and index for database tables with a large number of records.
11. Create Document, column and graph based data using NOSQL database tools.
12. Develop a simple GUI based database application and incorporate all the above mentioned
features 13. Case Study using any of the real life database applications from the following list
EX.NO
1. Create a database table, add constraints (primary key, unique, check, Not
null), insert rows, update and delete rows using SQL DDL and DML
commands.
2. Create a set of tables, add foreign key constraints and incorporate
referential integrity.
3. Query the database tables using different ‘where’ clause conditions and
also implement aggregate functions.
4. Query the database tables and explore sub queries and simple join
operations.
5. Query the database tables and explore natural, equi and outer joins.
6. Write user defined functions and stored procedures in SQL.
7. Execute complex transactions and realize DCL and TCL commands.
8. Write SQL Triggers for insert, delete, and update operations in a database
table.
9. Create View and index for database tables with a large number of records.
AIM:
To create a database and how to perform the operations and add constraints.
ALGORITHM:
PROGRAM:
1. CREATE
2. ALTER
3. DROP
4. TRUNCATE
5. COMMENT
6. RENAME
Database changed
2. Create the table:
SQL> CREATE TABLE STUDENT (SNO INT, NAME CHAR (11), POSITION
VARCHAR(8));
Table created.
3. View the table
structure:SQL>
Null? Type
EMPNO INT
ENAME CHAR(11)
POSITION VARCHAR
(8)
Table altered.
SQL> DESC
EMP;
EMPNO INT
ENAME CHAR(11)
POSITION VARCHAR(8)
Table altered.
SQL> DESC
EMP;
EMPNO INT
ENAME CHAR(11)
POSITION VARCHAR(8)
SALARY INT
Table altered.
Table altered.
Table altered
1. SELECT
2. INSERT
3. DELETE
4. UPDATE
1 row created.
(102,”KANNAN”,”PROFESSOR”,50000);
3. Display the records from employee.
1 row updated.
1 row deleted.
SQL> CREATE TABLE CUSTOMERS( ID INT NOT NULL, NAME VARCHAR (20)
NONULL, AGEINT NOT NULL UNIQUE, ADDRESS CHAR (25) , SALARY DECIMAL (18, 2),
CUSTOMERS
ID
NAME
AGE
ADDRESS
Empty
CUSTOMERS
ID NAME AGE ADDRESS
1 Ramesh 32 Ahmedabad
2 Khilan 25 Delhi
3 kaushik 23 Kota
4 Chaitali 25 Mumbai
7. Primary Key:
SQL>CREATE TABLE CUSTOMERS( ID INT NOT NULL, NAME VARCHAR (20) NOT NULL,
AGE INT NOT NULL UNIQUE, ADDRESS CHAR (25) , SALARY DECIMAL (18, 2),PRIMARY
KEY (ID) );
SQL>ALTER TABLE CUSTOMERS DROP PRIMARY KEY ;
RESULT:
The database was created using the various commands and constraints.
EX. NO :2 Database Querying – Foreign key constraints
and referentialintegrity.
AIM:
integrity.
ALGORITHM:
Creating a table for relating databases using constraints
PROGRAM:
Foreign Key constraint:
Foreign Key:
11
Referential integrity:
Table created.
RESULT:
The database was created for relating between databases using the foreign key and referential
constraints.
12
EX.No:3 Aggregate functions
AIM:
To create a database tables using aggregate functions.
ALGORITHM:
PROGRAM:
SQL> desc emp;
6 rows selected.
SQL> desc emp;
Name Null? Type
EMPNO NUMBER(4)
PH_NO NUMBER(8)
emp;EMPNO PH_NO
3737 225301
4545 485565
6544 789663
7575 896652
6555 987777
1) Avg (Average):
SAL=34250
2) Min (Minimum):
3) Max (Maximum):
SUM=205500
4)Count:
COUNT-6
5) Where clause:
RESULT:
The employee database was created and aggregate functions were used.
EX.No:4
Database Querying – Simple queries, Nested queries, Sub
queriesand Joins
AIM:
To create a database using Nested Queries, Sub Queries and different joins
ALGORITHM:
PROGRAM:
SQL> CREATE TABLE CUSTOMERS (ID INT NOT NULL, NAME VARCHAR (20) NOT NULL,AGE
INT NOTNULL, ADDRESS CHAR (25), SALARY DECIMAL (18, 2),
PRIMARY KEY (ID));
1. Sub Queries:
SQL> UPDATE CUSTOMERS SET SALARY = SALARY * 0.25 WHERE AGE IN (SELECTAGE FROM
CUSTOMERS_BKP WHERE AGE >= 27);
+ + + + + +
| ID | NAME | AGE | ADDRESS | SALARY |
+ + + + + +
| 1 | Ramesh | 35 | Ahmedabad | 125.00 |
| 2 | Khilan | 25 | Delhi | 1500.00 |
| 3 | kaushik | 23 | Kota | 2000.00 |
| 4 | Chaitali | 25 | Mumbai | 6500.00 |
| 5 | Hardik | 27 | Bhopal | 2125.00 |
| 6 | Komal | 22 | MP | 4500.00 |
INNER JOIN
LEFT JOIN
RIGHT JOIN:
FULL JOINS:
SELF JOINS:
RESULT:
The database was created for relating between databases using the joins and sub queries.
EX.No:5 DATABASE PROGRAMMING- VIEWS -NATURAL, EQUI AND
OUTERJOINS
AIM:
ALGORITHM:
PROGRAM:
NATURAL JOIN:
SQL>CREATE TABLE customer ( id INT AUTO_INCREMENT PRIMARY KEY, customer_name
VARCHAR(55), account int, email VARCHAR(55));
Table Created
Table Created
Customer
id customer_name account email
1 Stephen 1030 stephen@javatpoint.com
2 Jenifer 2035 jenifer@javatpoint.com
3 Mathew 5564 mathew@javatpoint.com
4 Smith 4534 smith@javatpoint.com
5 David 7648 david@javatpoint.com
Balance
id accoun balance
t
1 1030 50000
2 2035 230000
3 5564 125000
4 4534 80000
5 7648 45000
EQUI JOIN:
id class city
93 Delhi
10 2 Delhi
12 2 Delhi
name id city
Hina 9 Delhi
Megha 9 Delhi
Gouri 9 Delhi
Hina 10 Delhi
Megha 10 Delhi
Gouri 10 Delhi
Hina 12 Delhi
Megha 12 Delhi
Gouri 12 Delhi
SQL>CREATE TABLE college ( id INTEGER, classTeacher TEXT NOT NULL, Strength TEXT
NOT NULL);insert some values INSERT INTO college VALUES (1, 'Alpha', '50');INSERT
INTO college VALUES (2, 'Romeo', '60');INSERT INTO college Values (3, 'Charlie', '55');
Class Teacher
Id
Alpha 1
Romeo 2
Charlie 3
RESULT:
The database was created for relating between databases using the joins and sub queries.
DATABASE PROGRAMMING- PROCEDURES AND
EX.No:6
FUNCTIONS
AIM:
Algorithm:
Function:
SQL>delimiter $$
>Create function func1 (str varchar(20))
>return char(50)
>return CONCAT(‘WELCOME TO’, str)
>end $$
>delimiter $$
>select func1(‘DBMS LAB’);
>$$
Procedure:
SQL> declare
2 ave number(5,2);
3 tot number(3);
4 cursor c_mark is select*from student where mark1>=40 and
mark2>=40 and5 mark3>=40 and mark4>=40 and mark5>=40;
6 begin
7 dbms_output.put_line('regno name mark1 mark2 mark3 mark4 mark5 total
8 average');
9 dbms_output.put_line('
');10 for student in c_mark
11 loop
12 tot:=student.mark1+student.mark2+student.mark3+student.mark4+student.mark5;
13 ave:=tot/5;
14 dbms_output.put_line(student.regno||rpad(student.name,15)
15 ||rpad(student.mark1,6)||rpad(student.mark2,6)||rpad(student.mark3,6)
16 ||rpad(student.mark4,6)||rpad(student.mark5,6)||rpad(tot,8)||rpad(ave,5));
17 end loop;
18 end;
19 /
RESULT:
Thus the program for creation of procedure is executed successfull
EX.No:7
Execute complex transactions and realize DCL and TCL
commands
AIM:
To execute DCL and TCL Commands.
Algorithm:
Step 1: Start a program
Step 2: Enter the input
Step 3: Execute the TCL abd DCL commands.
Step 4: Stop the program
1. Write a query to end your current transaction and make permanent all
changes performed in the transaction.
SQL> commit;
Commit
complete.
Table created.
SQL> insert into goods values(&sno,&itemcode,'&itemname',&cost);
Enter value for sno:1
Enter value for itemcode: 1025
Enter value for itemname: dell moniters
Enter value for cost: 5000
old 1: insert into goods values(&sno,&itemcode,'&itemname',&cost) new 1: insert into goods
values(1,1025,'dell moniters',5000)
values(&sno,&itemcode,'&itemname',&cost);
Enter value for sno: 1
Enter value for itemcode: 1025
Enter value for itemname: moniter
Enter value for cost: 5000
old 1: insert into goods values(&sno,&itemcode,'&itemname',&cost)
new 1: insert into goods values(1,1025,'moniter',5000)
1 row created.
SQL> /
Enter value for sno: 2
Enter value for itemcode: 1026
Enter value for itemname: mouse
Enter value for cost: 250
old 1: insert into goods values(&sno,&itemcode,'&itemname',&cost)
new 1: insert into goods values(1026,1026,'mouse',250)
1 row created.
SQL> /
Enter value for sno: 3
Enter value for itemcode: 1027
Enter value for item name: RAM
Enter value for cost: 1500
old 1: insert into goods values(&sno,&itemcode,'&itemname',&cost)
new 1: insert into goods values(3,1027,'RAM',1500)
1 row created.
SQL> /
Enter value for sno: 4
Enter value for itemcode: 1028
Enter value for itemname: webcam
Enter value for cost: 350
old 1: insert into goods values(&sno,&itemcode,'&itemname',&cost)
new 1: insert into goods values(4,1028,'webcam',350)
1 row created.
SQL> /
Enter value for sno: 5
Enter value for itemcode: 1029
Enter value for itemname: pendrive
Enter value for cost: 500
old 1: insert into goods values(&sno,&itemcode,'&itemname',&cost)
new 1: insert into goods values(5,1029,'pendrive',500)
1 row created.
SQL> select *from goods;
SNO ITEMCODE ITEMNAME COST
SQL> commit;
Commit complete.
3. Write a query to add the record into the table “goods” and set the Savepoint S1, S2 and S3
and verify it.
9 rows selected.
Write a query to Rollback to Save point S2 and verify it.
SQL> rollback to save point s2;
Rollback complete.
DCL Commands:
Grant:
GRANT SELECT, UPDATE ON MY_TABLE TO SOME_USER, ANOTHER_USER;
RESULT:
Thus the TCL and DCL commands in SQL is successfully executed.
EX.No:8 TRIGGERS
AIM:
Algorithm:
Step 1: Start a program by creating table
Step2: Enter the input
Step 3: The output will be displayed based on the queryStep 5: Stop the program
Program:
Delimiter $$
create trigger update_trigger before update on account for each row
begin
if new.sum=50 thenset new.sum=100;
else if new. Sum>50 then set new.sum=200;
end if;
end$$
Output function:
delimiter $$
MySQL> update account set sum=50
$$select * from account;
-> $$
OUTPUT:
+ + +
| sum | amount |
+ + +
| 100 | 20 |
| 100 | 30 |
| 100 | 40 |
+ + +
RESULT:
Thus the program for creation of triggers and functions is executed successfully
EX.No:9 VIEWS AND INDEX
AIM:
To Create views and index for database tables.
PROGRAM:
6 rows selected.
EMPNO NUMBER(4)
PH_NO NUMBER(8)
SQL> select * fromemp;
EMPNO PH_NO
3737 225301
4545 485565
6544 789663
7575 896652
6555 987777
CREATE VIEW
View created from more than one table leading to ‘Read Only’ view.
Priya 225301
priya 485565
santh 789663
Karthi 896652
INDEX:
Index created
ALTER AN INDEX
Index altered
DROP INDEX
Index Dropped
RESULT:
Thus, the database views and indexes were successfully executed.
EX.No:10
XML DATABASE AND XML SCHEMA
AIM:
To create an xml database and validate it using xml schema.
ALGORITHM:
XML file(on the File menu, point to New, and then click File).
3. Add the following data to the XML document to represent a product in a catalog:
<Product ProductID="123">
<ProductName>Rugby jersey
</ProductName>
</Product>
4. Save the file as Product.xml in a folder that you will be able to readily access later.
1. In Visual Studio 2005 or in Visual Studio .NET, point to New on the File menu, and
then clickFile.
3. Add the following DTD declarations to the file to describe the grammar of the XML
document:XML
<!ELEMENT Product (ProductName)>
<!ATTLIST Product ProductID CDATA #REQUIRED>
<!ELEMENT ProductName (#PCDATA)>
4. Save the file as Product.dtd in the same folder as your XML document.
5. Reopen Product.xml in Visual Studio 2005.
3. Add the following XDR schema definitions to the file to describe the grammar of the XML document:
<?xml version="1.0"?>
<Schema name="ProductSchema"
xmlns="urn:schemas-microsoft-com:xml-data"
xmlns:dt="urn:schemas-microsoft-
com:datatypes">
4. Save the file as Product.xdr in the same folder as your XML document.
5. Reopen the original Product.xml, and then link it to the XDR schema, as follows:
66
<ProductName>Rugby jersey</ProductName>
</Product>
6. Save the modified XML document as ProductWithXDR.xm
1. In Visual Studio .NET, point to New on the File menu, and then click File.
2. Select the Text File type, and then click Open.
3. Add the following XSD schema definition to the file to describe the grammar of the XML document:
<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="Product">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="ProductName" type="xsd:string"/>
</xsd:sequence>
<xsd:attribute name="ProductID" use="required" type="xsd:int"/>
</xsd:complexType>
</xsd:element>
</xsd:schema>
4. Save the file as Product.xsd in the same folder as your XML document.
5. Reopen the original Product.xml, and then link it to the XSD schema, as follows:
<?xml version="1.0" encoding="utf-8" ?>
<Product ProductID="123"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"
xsi:noNamespaceSchemaLocation="Product.xsd">
<ProductName>Rugby jersey</ProductName>
</Product>
6. Save the modified XML document as ProductWithXSD.xml.
67
Use namespaces in the XSD schema
1. In Visual Studio 2005 or in Visual Studio .NET, open ProductWithXSD.xml. Declare a default
namespace, urn:MyNamespace, in the document. Modify the XSD linkage to specify the XSD
schema tovalidate content in this namespace, as follows:
<?xml version="1.0" encoding="utf-8"?>
<Product ProductID="123"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance" xmlns="urn:MyNamespace"
xsi:schemaLocation="urn:MyNamespace Product.xsd">
<ProductName>Rugby jersey</ProductName>
</Product>
2. Save ProductWithXSD.xml.
3. Open Product.xsd, click the XML tab, and then modify the xsd:schema start tag as follows, so
that theschema applies to the namespace urn:MyNamespace:
<xsd:schema
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="urn:MyNamespace"
elementFormDefault="qualified">
4. Save Product.xsd.
5. Run the application to validate the XML document by using the XSD schema.
0utput:
<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="Product">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="ProductName" type="xsd:string"/>
68
</xsd:sequence>
<xsd:attribute name="ProductID" use="required" type="xsd:int"/>
</xsd:complexType>
</xsd:element>
</xsd:schema>
RESULT:
The xml database was successfully created by display the web page of validate xml schema
69
Execute complex transactions and realize DCL and TCL commands.
EX.No:11
AIM:
To Create document, column and graph based data using NOSQL database tools
PROGRAM:
Create Database:
>use javatpointdb
Swithched to db javatpointdb
>db
Insert a document:
>db.movie.insert({"name":"javatpoint"})
db.javatpoint.insert(
{
course:
"java",
details: {
duration: "6 months",
Trainer: "Sonoo
jaiswal"
},
Batch: [ { size: "Small", qty: 15 }, { size: "Medium", qty: 25 } ],
81
category: "Programming language"
}
)
WriteResult({ "nInserted": 1})
Drop Database:
> db.dropDatabase()
1}Create collection :
>db.SSSIT.insert({"name" : "seomount"})
>show
collections SSSIT
db.collection_name.find()
Neo4j CQL
Create
nodes:
Open the localhost on the browser: http://localhost:7474/browser/ and use the following code:
CREATE (single);
82
MATCH (n) RETURN (n)
83
CREATE (primary_node), ( secondary_node);
84
RESULT:
Thus the NoSQL database tool successfully designed and executed.
85
EX.NO.12 DATABASE GUI APLLICATION – PAYROLL MANAGEMENT
AIM:
SAMPLE CODE:
Dim db As
DatabaseDim rs As Recordset
Private Sub
cmdADD_Click()
rs.AddNew DtPicker
DOJ.Enabled = True
txtEmpID.Enabled = True
txtFirstName.Enabled = True
txtLastName.Enabled = True
txtAddress.Enabled = True
txtDOJ.Enabled = True
txtSalary.Enabled = True
txtEmpID.SetFocus
txtEmpID.Text = ""
txtFirstName.Text = ""
txtLastName.Text = ""
txtAddress.Text = ""
txtDOJ.Text=Date
txtSalary.Text =""
txtHRA.Text = ""
txtDA.Text = ""
txtTA.Text = ""
txtPF.Text= ""
txtGrossPay.Text = ""
txtNetPay.Text = ""
cmdEdit.Enabled=False
cmdSubmit.Enabled = False
cmdCalculate.Enabled=
FalseEnd Sub
Private Sub
cmdCalculate_Click()If
project"txtSalary.SetFocus Else
txtHRA.Text = 0.15 *
Val(txtSalary.Text)txtDA.Text = 0.17
* Val(txtSalary.Text) txtTA.Text =
= 0.05 * Val(txtSalary.Text)
cmdSubmit.Enabled =
TruecmdADD.Enabled =
False
Else
Cancel=False
rs.Delete
Project"ClearALL
Else
Cancel=True
End If
'rs.MoveNex
tEnd If
End Sub
txtFirstName.Enabled = True
txtLastName.Enabled = True
txtAddress.Enabled = True
txtDOJ.Enabled = True
txtSalary.Enabled= True
rs("FIRSTNAME")
txtFirstName.Textrs("LASTNAME")
txtLastName.Text rs("ADDRESS")
txtAddress.Text
rs("DATEOFJOINING") =txtDOJ.Text
rs("SALARY") =txtSalary.Text
rs("HRA") = txtHRA.Text
rs("DA") = txtDA.Text
rs("TA") =txtTA.Text
Cancel=False
End
Else
Cancel=True
End If
End Sub
Private Sub
cmdFirst_Cli
ck()
rs.MoveFirst
cmdPrev.Ena
bled = False
cmdFirst.En
abled = False
cmdNext.Enabled = True
cmdLast.Enabled = True
End Sub
Private Sub cmdLast_Click()
rs.MoveLast cmdFirst.Enabled = True
cmdPrev.Enabled = True
cmdNext.Enabled = False
cmdLast.Enabled = False
cmdEdit.Enabled = True
GetData
End Sub
cmdEdit.Enabled = True
cmdFirst.Enabled = True
cmdPrev.Enabled=True
rs.MoveNext
If rs.EOF = True
Then
cmdNext.Enabled=False
ecmdLast.Enabled = False
MsgBox "LAST RECORD", vbInformation, "Employees Project"rs.MoveLast
Else GetData
End If
End Sub
Private Sub cmdPrev_Click()cmdEdit.Enabled = True
cmdFirst.Enabled = True
cmdNext.Enabled = True
cmdLast.Enabled = True
rs.MovePrevious
If rs.BOF = True
Then
cmdFirst.Enabled = False
cmdPrev.Enabled = False
MsgBox "FIRST RECORD", vbInformation, "Employees Project"
rs.MoveFirs
tElse
GetData
End If
GetDat
aEnd
Sub
Private Sub
cmdReport_Click()
DataReport1.Show
End Sub
Private Sub
cmdSubmit_Click()On Error
GoTo errhandler2
rs("EMPID")=txtEmpID.Text
rs("FIRSTNAME") = txtFirstName.Text
rs("LASTNAME") = txtLastName.Text
rs("ADDRESS") = txtAddress.Text
rs("DATEOFJOINING") = txtDOJ.Text
rs("SALARY") = txtSalary.Text
rs("HRA") = txtHRA.Text
rs("DA") = txtDA.Text
rs("TA") =txtTA.Text
rs("PF") = txtPF.Text
rs("GROSSPAY") =txtGrossPay.Text
rs("NETPAY") =txtNetpay.Text
Private Sub
txtAddress_Change()
cmdSubmit.Enabled = True
End Sub
Private Sub
txtDOJ_Change()
cmdSubmit.Enabled =
[Private Sub
txtEmpID_Change()
cmdSubmit.Enabled = True
End Sub
KeyAscii = 0
Private Sub
txtFirstName_Change()
cmdSubmit.Enabled = True
End Sub
Private Sub
txtLastName_Change()
cmdSubmit.Enabled = True
End Sub
Private Sub
txtSalary_Change()If
If rs.RecordCount <> 0
Then
txtEmpID.Text = rs("EMPID")
txtFirstName.Text = rs("FIRSTNAME")
txtLastName.Text = rs("LASTNAME")
txtAddress.Text = rs("ADDRESS")
txtDOJ.Text = rs("DATEOFJOINING")
txtSalary.Text = rs("SALARY")
txtHRA.Text = rs("HRA")
txtDA.Text = rs("DA")
txtTA.Text = rs("TA")
txtPF.Text=rs("PF")
txtGrossPay.Text = rs("GROSSPAY")
txtNetPay.Text = rs("NETPAY")
txtEmpID.Enabled = False
txtFirstName.Enabled = False
txtLastName.Enabled = False
txtAddress.Enabled = False
txtDOJ.Enabled = False
txtSalary.Enabled = False
txtHRA.Enabled = False
txtDA.Enabled= False
txtTA.Enabled = False
txtPF.Enabled = False
txtGrossPay.Enabled =False
txtNetPay.Enabled = False
cmdSubmit.Enabled = False
cmdCalculate.Enabled=Fals
DtPickerDOJ.Enabled=False
Else
txtEmpID.Enabled = False
txtFirstName.Enabled = False
txtLastName.Enabled = False
txtAddress.Enabled = False
txtDOJ.Enabled = False
txtSalary.Enabled = False
txtHRA.Enabled = False
txtDA.Enabled = False txtTA.Enabled = False txtPF.Enabled = False
txtGrossPay.Enabled = False
txtNetPay.Enabled = False c
mdSubmit.Enabled = False
cmdCalculate.Enabled = FalseEnd If
End Sub
PrivateSubtxtSalary_KeyPress(KeyAsciiAs
Integer)
If(KeyAscii < 48 Or KeyAscii > 57) Then
KeyAscii = 0
cmdADD.Enabled = True
cmdCalculate.Enabled = False
cmdSubmit.Enabled = False
DATABASE IN MS ACCESS:
10
10
FORMS WHILE EXECUTION:
10
10
10
10
10
10
10
RESULT:
Thus the Student Personal Information System is successfully designed using PHPwith mysql as backend.
EX.NO:13 CASE STUDY E-Mart GroceryShop
AIM:
To create a database for E-mart Grocery shop and apply all sql properties.
SAMPLE CODE:
Cross join:
select *
from grocery_visit
cross join dept_store_visit
where grocery_visit.amount_spent >
and dept_store_visit.amount_spent > 15;
15
RESULT:
Thus the E-mart Grocery Shop is successfully designed.
1..What is DBMS and what is its utility? Explain RDBMS with examples.
2.What is a Database?
3.Mention the issues with traditional file-based systems that make DBMS a better choice?
7.Are NULL values in a database the same as that of blank space or zero?
10.What is meant by an entity-relationship (E-R) model? Explain the terms Entity, Entity Type, and
Entity Set in DBMS.
13.Explain the difference between the DELETE and TRUNCATE command in a DBMS.
14.What is a lock. Explain the major difference between a shared lock and an exclusive lock during a
transaction in a database.