Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Rimsha Ahamad
Submitted To:
SIR Asad Saleem
Subject:
Database
Registration No:
SP19-MCS-019
Assignment No.01
Submission Date:
4-Feb-2019
COMSATS UNIVERSITY ISLAMABAD,
SAHIWAL CAMPUS
Question 1:
The NOT NULL constraint enforces a column to NOT accept NULL values.
This enforces a field to always contain a value, which means that you cannot
insert a new record, or update a record without adding a value to this field.
FOREIGN KEY:
A FOREIGN KEY is a field (or collection of fields) in one table that refers to the
PRIMARY KEY in another table.
The table containing the foreign key is called the child table, and the table
containing the candidate key is called the referenced or parent table.
i)Not NULL is a column level constraint to ensure that any value in that column is not null,
hence can't be used as a table level constraint. One can however use it on multiple columns
as per the need.
ii)
Question 2:
What is Data Control Language? Why it is used ?
implement its commands and paste the Screenshots.
A data control language (DCL) is a syntax similar to a computer programming
language used to control access to data stored in a database (Authorization). In
particular, it is a component of Structured Query Language (SQL).
Examples of DCL commands include:
GRANT to allow specified users to perform specified tasks, means that the
administrator is granting the permission to access the database. It gives the user
previleges to the database.
Syntax:
GRANT<Previleges list>
To <user/role list>;
REVOKE<Previleges list>
A popular data manipulation language is that of Structured Query Language (SQL), which is used to
retrieve and manipulate data in a relational database. Other forms of DML are those used
by IMS/DLI, CODASYL databases, such as IDMS and others.