Computer Science, asked by gjtyjeeucfgiygkds, 3 months ago

Practical File - SQL
1. A departmental store MyStore is considering to maintain their inventory using SQL to store the data. As a database administer, Abhay has decided that :
Name of the database - mystore Name of the table - STORE
The attributes of STORE are as follows:
ItemNo - numeric
ItemName character of size 20
Scode - numeric
Quantity numeric
Table : STORE
ItemNo ItemName Scode Quantity
2005 Sharpener Classic 23 60
2003 Ball Pen 0.25 22 50
2002 Get Pen Premium 21 150
2006 Get Pen Classic 21 250
2001 Eraser Small 22 220
2004 Eraser Big 22 110
2009 Ball Pen 0.5 21 180
(a) Identify the attribute best suitable to be declared as a primary key,
(b) Write the degree and cardinality of the table STORE.
(c) Insert the following data into the attributes ItemNo, ItemName and SCode respectively in the given table STORE.


(d) Abhay want to remove the table STORE from the database MyStore. Which command will he use from the following:
a) DELETE FROM store;
b) DROP TABLE store;
c) DROP DATABASE mystore;
d) DELETE store FROM mystore;
(e) Now Abhay wants to display the structure of the table STORE, i.e, name of the attributes and their respective data types that he has used in the table. Write the query to display the same.


Write SQL commands for the following queries (i) to (v) based on the relations Teacher and Posting given below:
Table : Teacher
T_ID Name Age Department Date_of_join Salary Gender
1 Jugal 34 Computer
Sc 10/01/2017 12000 M
2 Sharmila 31 History 24/03/2008 20000 F
3 Sandeep 32 Mathematics 12/12/2016 30000 M
4 Sangeeta 35 History 01/07/2015 40000 F
5 Rakesh 42 Mathematics 05/09/2007 25000 M
6 Shyam 50 History 27/06/2008 30000 M
7 Shiv Om 44 Computer
Sc 25/02/2017 21000 M
8 Shalakha 33 Mathematics 31/07/2018 20000 F
i. To show all information about the teacher of History department.
ii. To list the names of female teachers who are in Mathematics department.
iii. To list the names of all teachers with their date of joining in ascending order.
iv. only.
v. To display name, bonus for each teacher where bonus is 10% of salary.


there are some tables in between

Answers

Answered by annu6210
0

Answer:

5. Read the following situations and identify the type of cybercrimes associated with each:

2/x4=10

Suman's English teacher asked her to write an essay on "Benefits of effective

communications'. She googled the topic and browsed some websites. Instead of taking

only some ideas from the website, she copied the available content from the net and

.

presented it as her own.

ii. Brijesh computer was running slower than usually and not working properly. What

problem in his computer name it.

ii. Shreya wants to save her photos for future which device she will use it.

Harshita want to give present to her parents but she has no time for market which

i

Similar questions