1.Insert Query
$sql = "INSERT INTO persons (first_name, last_name, email) VALUES ('Peter', 'Parker', 'peterparker@mail.com')";
if(mysqli_query($link, $sql)){ echo "Records inserted successfully."; } else{ echo "ERROR: Could not able to execute $sql. " . mysqli_error($link); }3.Delete Query
$sql = "DELETE FROM persons WHERE first_name='John'"; if(mysqli_query($link, $sql)){ echo "Records were deleted successfully."; } else{ echo "ERROR: Could not able to execute $sql. " . mysqli_error($link); }
* ADVANTAGES OF DATABASE MANAGEMENT SYSTEM *
2. Sharing
data :
A database allows the
sharing of data under its control
by any number of application programs or users
3. Consistency
of data
:
The reduced data redundancy minimizes the presence of the
same data in different files which will lead to consistency of data .
4. Flexibility
of file
system :
In a database approach, the database is designed based on
bottom up approach which ensures that the end users have all the reports. As
and when some changes in reports requirements occur. Corresponding revision of
the database can be done with minor changes in the database.
5. Better
Enforcement of standards :
Since different files of the database are designed at a
time, there will be better enforcement of standards in terms of defining filed
names, filed width, filed type etc.
Comments
Post a Comment