Informatics Practices
Write MySQL statements for the following :
(i) To create a database named FOOD.
(ii) To create a table named Nutrients based on the following specification :
| Column Name | Data Type | Constraints |
|---|---|---|
| Food_Item | Varchar(20) | Primary Key |
| Calorie | Integer |
DDL & DML
4 Likes
Answer
(i)
CREATE DATABASE FOOD;
(ii)
CREATE TABLE Nutrients
(Food_Item Varchar(20) Primary Key,
Calorie integer);
Answered By
1 Like
Related Questions
Predict the output of the following queries based on the table CAR_SALES given below :
NUMBER SEGMENT FUEL QT1 QT2 1 Compact HatchBack Petrol 56000 70000 2 Compact HatchBack Diesel 34000 40000 3 MUV Petrol 33000 35000 4 MUV Diesel 14000 15000 5 SUV Petrol 27000 54000 6 SUV Diesel 18000 30000 7 Sedan Petrol 8000 10000 8 Sedan Diesel 1000 5000 (i) SELECT LEFT(SEGMENT, 2) FROM CAR_SALES WHERE FUEL= "PETROL";
(ii) SELECT (QT2-QT1)/2 "AVG SALE" FROM CAR_SALES WHERE SEGMENT= "SUV";
(iii) SELECT SUM(QT1) "TOT SALE" FROM CAR_SALES WHERE FUEL= "DIESEL";
Create a DataFrame in Python from the given list :
[['Divya', 'HR', 95000], ['Mamta', 'Marketing', 97000], ['Payal', 'IT', 980000], ['Deepak', 'Sales', 79000]]
Also give appropriate column headings as shown below :
Name Department Salary 0 Divya HR 95000 1 Mamta Marketing 97000 2 Payal IT 980000 3 Deepak Sales 79000 Richa, recently started using her social media account. Within a few days, she befriends many people she knows and some that she does not know. After some time, she starts getting negative comments on her posts. She also finds that her pictures are being shared online without her permission.
Based on the given information, answer the questions given below :
(i) Identify the type of cyber crime she is a victim of.
(ii) Under which act, she can lodge a complaint to the relevant authorities ?
(iii) Suggest her any two precautionary measures which she should take in future while being online to avoid any such situations.
Mention any three health hazards associated with inappropriate and excessive use of gadgets.