(i) Write an SQL statement to create a table named PRODUCTS with the following specifications:
| Column Name | Data Type | Key |
|---|---|---|
| PID | Integer | Primary Key |
| PName | Varchar of size 30 | |
| PCat | Char of size 15 | |
| Price | Decimal Number |
(ii) Write an SQL query to increase the price of all items by 100, whose product category is Grocery, in the table PRODUCTS.
CREATE TABLE PRODUCTS (
PID INT PRIMARY KEY,
PName VARCHAR(30),
PCat CHAR(15),
Price DECIMAL(8,2)
); UPDATE PRODUCTS
SET Price = Price + 100
WHERE PCat = 'Grocery'; State whether the following statement is True or False:
In Pandas Series, the Positional index can be a string or an integer.
We can add a new row to a DataFrame DF using the ______ method.
Naveen discarded various types of waste material without realizing that e-waste contains harmful substances that could pollute the environment. He wants to know which of the following will be considered as e-waste?
In which scenario is a bar chart preferred over a line chart?
Which of the following network topology uses a central cable (backbone) to connect all devices?
Which of the following is the correct expanded form of DML?
Define the following terms with respect to RDBMS:
a. Domain
b. Tuple
Consider the table LIBRARY as given below.
| BookId | Title | Genre | Price |
|---|---|---|---|
| 101 | Python Basics | Technology | 278 |
| 201 | The Silent Patient | Fiction | 340 |
| 301 | Data Science | Technology | 291 |
| 401 | Oceans | Marine Life | NULL |
(I) Which attribute(s) can be considered as the Candidate keys(s)? Justify your answer.
(II) Write an SQL query to insert a new record with the following values: BookId: 501, Title: AI for ALL, Genre: Technology, Price: 589
(III) Write an SQL query to add a new column Author that is a character data type of size 20.