0% found this document useful (0 votes)
3 views

sql

Uploaded by

w15612431
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

sql

Uploaded by

w15612431
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Sql

other name for attribute.


1. ans ... degree

2. Different between primary key and foreign key


ans Primary Key Foreign Key
Uniquely identifies each record in a table. Links two tables by referring
to the primary key in another table.
Ensures no duplicate or null values in the column. Allows duplicate
and null values (unless specified otherwise).
There is only one primary key in a table. A table can have multiple
foreign keys.
Defined in the same table where it is used. Defined in a table but
points to the primary key of another table.

3. What is the purpose of primary key??


ans The primary key serves as a unique identifier for each record in a
database table

4.what is dml
ans Data Manipulation Language.

.What is insert, update, display, delete


ans. INSERT
The INSERT operation is used to add new records (rows) into a
database table.
UPDATE
The UPDATE operation modifies existing records in a table.
DISPLAY (or SELECT)
The DISPLAY operation retrieves and shows data from a table using
the SELECT command.
DELETE
The DELETE operation removes specific records from a table.
Mu»
what is the full form of SQl
Structured Query Language.

types of SQL
DDL (Data Definition Language)
DML (Data Manipulation Language)

how to delete a database


DROP DATABASE database_name;

Delete is an ddl or dml command?


DELETE is a DML (Data Manipulation Language)

Cardinality and degree of your table??


Cardinality: The number of rows (records) in a
table. For example, if a table has 5 rows, the
cardinality is 5.
• Degree: The number of columns (attributes) in
a table. For example, if a table has 4 columns,
the degree is 4.

Another name for table


relation
what is cardinality?
Rows of the table

What is candidate key???


A Candidate Key is a column or a combination of columns in a table that
can uniquely identify each row (record) in the table

Which Command is Used to Arrange Values in SQL?


The ORDER BY command is used in SQL to arrange (sort) values in either
ascending or descending order.
• Syntax:SELECT column_name FROM table_name ORDER BY
column_name [ASC I DESC];

Is select a DDL or DML Command?


The SELECT command is a DML (Data Manipulation Language) command.

Example of rdbms ??
Relational DBMS (RDBMS)

These databases store data in tables with relationships between them:


• MySQL
• Oracle Database
• PostgreSQL
• Microsoft SQL Server
• SQLite

You might also like