IICT Quiz 2 - SafiullahRehmani - 12413 - 105726

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

Q.1 What is the difference between following?

• Record and Tuple


• Data Dictionary and Data Schema

O.2 What is SQL?


Write the purpose with at least 3 different example of the following SQL commands
Insert, Delete, Select, Update

Answers
Ques#1 Answer:-
Tuple and Record:-

Tuple:-
1. Tuple contains all the data for an individual record.
2.The information in a database can be as of a spreadsheet.Like in rows and columns
3.Each row/column is associated with a single record.

Record:-
1. A record is a database entry that may contain one or more values.
2. Groups of records are stored in a table.
3. It contains multiple tables in which each contain multiple records.
4. Records can be easily created, modified, and deleted without affecting other data
in the database.

Data dictionary and Data Schema:-

Data Dictionary:-
1. A Data Dictionary contains information about attributes or fields of a certain data
set.
2. It contains:
• Names of all Tables.
• Names of all Indexes and the columns.
• Information about the tables including their storage location.

Data Schema:-
1.A description of the structure of an entire database, used by database software to
maintain the database
2. It defines how the data is organized and how the relations among them are
associated.
3. Database designers who design the schema to help programmers understand the
database and make it useful.

Ques#2 Answer:-
SQl:-
SQL is Structured Query Language, which is a computer language for storing,
manipulating and retrieving data stored in a relational database.
The SQL commands to interact with relational databases are SELECT, INSERT, UPDAT
DELETE.

Select:-
Retrieves certain records from one or more tables.
For Example:-
SQL statement Selects the "CustomerName" and "City" columns from the
"Customers" table.
Update:-
Modifies the records.
Example:-
SQL statement Updates the "CustomerName" and "City" columns from the
"Customers" table.
Delete:-
Deletes records.
For Example:-
SQL statement Deletes the "CustomerName" and "City" columns from the
"Customers" table.
Insert:
Creates a record.
Example:-
SQL statement Inserts and Adds another "CustomerName" and "City" columns to th
"Customers" table.

You might also like