0% found this document useful (0 votes)
180 views89 pages

Informatics Practicals 12th (Personal)

The document is a bonafide certificate issued by India International School in Mangaf, Kuwait certifying that Ayyub Moideen, a student of class XII-B, has successfully completed and executed his practical record under the guidance and supervision of his Informatics Practices teacher, Mr. Shameer. It includes Ayyub Moideen's declaration that the practical work submitted is original and was completed with the help of his parents and friends to fulfill the requirements for the CBSE. The certificate is signed by the teacher in charge, principal and external examiner.

Uploaded by

Ayyub Moideen
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
180 views89 pages

Informatics Practicals 12th (Personal)

The document is a bonafide certificate issued by India International School in Mangaf, Kuwait certifying that Ayyub Moideen, a student of class XII-B, has successfully completed and executed his practical record under the guidance and supervision of his Informatics Practices teacher, Mr. Shameer. It includes Ayyub Moideen's declaration that the practical work submitted is original and was completed with the help of his parents and friends to fulfill the requirements for the CBSE. The certificate is signed by the teacher in charge, principal and external examiner.

Uploaded by

Ayyub Moideen
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 89

1|Page

INDIA INTERNATIONAL SCHOOL


Mangaf, Kuwait

BONAFIDE CERTIFICATE
This is to certify that the practical record has been
successfully completed and executed by
Ayyub Moideen
Student of class XII- B
Under the guidance and supervision of the informatics practices
teacher
Mr.Shameer

DATE OF SUBMISSION TEACHER IN CHARGE


Submitted for All India Senior Secondary Examination (AISSCE) in Informatics
Practices at India International School, Kuwait.
DATE:

PRINCIPAL EXTERNAL EXAMINER

2|Page
DECLARATION
I, AYYUB MOIDEEN student of India
International School studying in class XII-B
solemnly declare that I have completed my
practical records under the supervision of
Informatics teacher
Mr.Shameer
This practical work is submitted in partial
fulfillment for CBSE
This information incorporated in this practical is
original and genuine.
I would also thank my parents and friends who
have helped me to complete my practicals
within due time
Ayyub Moideen
Class XII B

3|Page
INDEX
SLNO PROGRAM NAME Pg NO
I P
Y
T
H
O
N
P
R
O
G
R
A
M
S
1 P
A
N
D
A
S
E
R
I
E
S
F

4|Page
R
O
M

D
I
C
T
I
O
N
A
R
Y
V
A
L
U
E
S
A
N
D
A
N
N
D
A
R
R
A
Y
2 T
5|Page
O

P
R
I
N
T
E
L
E
M
E
N
T
S
A
B
O
V
E
7
5
P
E
R
C
E
N
T
I
L
E
3 Q
6|Page
U
A
R
T
E
R
L
Y
S
A
L
E
S
4 E
C
O
M
M
E
R
C
E
D
A
T
A
&

G
E
N
E
R
7|Page
A
T
I
V
E
5 E
X
A
M
I
N
A
T
I
O
N
R
E
S
U
L
T
6 F
I
L
T
E
R
O
U
T
D

8|Page
U
P
L
I
C
A
T
E
R
O
W
7 S
U
M

O
R
L
O
W
E
S
T
M
E
A
N
O
F
T
H
E
C
9|Page
O
L
U
M
N
8 T
H
R
E
E
L
A
R
G
E
S
T
V
A
L
U
E
I
N
D
A
T
A
F
R
A
M

10 | P a g e
E
9 S
U
B
T
R
A
C
T
T
H
E
M
E
A
N
O
F
A
R
O
W

I
N
D
F
1 R
0 E
P
L
A
C
11 | P a g e
E
A
L
L
N
E
G
A
T
I
V
E
I
N
D
A
T
A
F
R
A
M
E
W
I
T
H
0
1 R
1 E
P
L

12 | P a g e
A
C
E
A
L
L
M
I
S
S
I
N
G
V
A
L
U
E
S
I
N
D
A
T
A
F
R
A
M
E
W
I
T
13 | P a g e
H
9
9
9
1 I
2 M
P
O
R
T
I
N
G
A
N
D
E
X
P
O
R
T
I
N
G
B
E
T
W
E
E
N

14 | P a g e
P
A
N
D
A
S
A
N
D
C
S
V
1 I
3 M
P
O
R
T
I
N
G
A
N
D
E
X
P
O
R
T
I
N

15 | P a g e
G
B
E
T
W
E
E
N
P
A
N
D
A
S
A
N
D
M
Y
S
Q
L
1 S
4 C
H
O
O
L
R
E
S
U

16 | P a g e
L
T
D
A
T
A
1 P
5 L
O
T
A
P
P
R
O
P
R
I
A
T
E
C
H
A
R
T
S
W
I
T
H
T

17 | P a g e
I
T
L
E
&

L
E
G
E
N
D
S
1 A
6 G
G
R
E
G
A
T
E
A
N
D
S
U
M
M
A
R
I
Z
18 | P a g e
I
N
G
D
A
T
A
O
F
O
U
R
I
N
T
E
R
E
S
T
1 W
7 E
I
G
H
T
M
E
A
S
U
R

19 | P a g e
E
M
E
N
T
S
O
F
F
R
E
N
C
H
F
R
I
E
S
1 L
8 I
N
E
C
H
A
R
T
&

B
A
R
20 | P a g e
C
H
A
R
T
D
E
P
I
C
T
I
N
G
P
R
I
C
E
O
F
A
P
P
S
1 B
9 A
R
C
H
A
R

21 | P a g e
T
D
E
P
I
C
T
I
N
G
D
I
S
T
R
I
B
U
T
I
O
N
O
F
R
A
I
N
F
A
L
L

22 | P a g e
II MYSQL
PROGRAMS
1 STUDENT TABLE
2 CUSTOMER TABLE
3 FINANCE TABLE

23 | P a g e
PYTHON
PROGRAMS

24 | P a g e
25 | P a g e
PYTHON PROGRAMS
Program-1
Q Create a pandas series from dictionary of values and an
ndarray
Source code:
import pandas as pd

import numpy as np

s=pd.Series(np.array([1,3,4,7,8,8,9]))

print(s)

dictionary={'A':10,'B':20,'c':30}

series=pd.Series(dictionary)

print(series)

print(s)

Output:
import pandas as pd

26 | P a g e
import numpy as np

s=pd.Series(np.array([1,3,4,7,8,8,9]))

print(s)

dictionary={'A':10,'B':20,'c':30}

series=pd.Series(dictionary)

print(series)

Program-2
Q2 Given a Series, print all the elements that are above
the 75th percentile
Source code:
import pandas as pd

import numpy as np

s=pd.Series(np.array([1,3,4,7,8,8,9]))

print(s)

res=s.quantile(q=0.75)

print()

print('75th Percentile of the series is:::')

print(res)

print()

print('The elements that are above the 75th percentile::')

27 | P a g e
print(s[s>res])

Output

0 1

1 3

2 4

3 7

4 8

5 8

6 9

dtype: int64

75th Percentile of the series is:::

8.0

The elements that are above the 75th percentile::

6 9

dtype: int64Output:

28 | P a g e
Program-3
Q3 Create a Dataframe quarterly sales where each row
contains the item category,item name, and expenditure.
Group the rows by category
Source code
import pandas as pd

dic={'itemcat':['car','AC','Aircoller','washing machine'],

'itemname':['Ford','Hitachi','Symphony','LG'],

'expenditure':[7000000,50000,12000,14000]}

quartsales=pd.DataFrame(dic)

print(quartsales)

qs=quartsales.groupby('itemcat')

print('Result after filtering Dataframe')

print(qs['itemcat','expenditure'].sum())

Output
itemcat itemname expenditure
29 | P a g e
0 car Ford 7000000

1 AC Hitachi 50000

2 Aircoller Symphony 12000

3 washing machine LG 14000

Result after filtering Dataframe

expenditure

itemcat

AC 50000

Aircoller 12000

car 7000000

washing machine 14000

30 | P a g e
Program-4
Q4 Create a dataframe based on ecommerce data and
generate descriptive statistics(mean,mode,quartile and
variance)
Source code
import pandas as pd

sales={'invoiceno':[1001,1002,1003,1004,1005,1006,1007],

'Productname':['LED','AC','Deodrant','jeans','Books','Shoes','jacket'],

'Quantity':[2,1,2,1,2,1,1],

'price':[6500,5500,500,2500,950,3000,2200]}

df=pd.DataFrame(sales)

print(df['price'].describe().round(2))

Output
count 7.00

mean 3021.43

std 2230.07

31 | P a g e
min 500.00

25% 1575.00

50% 2500.00

75% 4250.00

max 6500.00

Program-5
Q5 Create a data frame for examination result and
display row labels,columns label data types of each
column and the dimensions
Source code
import pandas as pd

dic={'class':['I','II','III','IV','V','VI','VII','VIII','IX','X','XI','XII'],

'pass percentage':[100,100,100,100,100,100,100,100,100,98.6,100,99]}

result=pd.DataFrame(dic)

print (result)

print(result.dtypes)

print('shape of the dataframe is :::::')

print(result.shape)

Output
class pass percentage

0 I 100.0

32 | P a g e
1 II 100.0

2 III 100.0

3 IV 100.0

4 V 100.0

5 VI 100.0

6 VII 100.0

7 VIII 100.0

8 IX 100.0

9 X 98.6

10 XI 100.0

11 XII 99.0

class object

pass percentage float64

dtype: object

shape of the dataframe is :::::

(12, 2)

33 | P a g e
Program-6
Q6 Filter out row based on different criteria such as
duplicate rows
Source code:
import pandas as pd

dic={'Name':['Rohit','Mohit','Deepak','Rohit','Deepak','Sohit','Geeta'],

'MarksinIP':[85,45,92,85,92,96,84]}

marks=pd.DataFrame(dic)

#find duplicate rows

duplicateRow=marks[marks.duplicated(keep=False)]

print(duplicateRow)

Output:
Name MarksinIP

0 Rohit 85

2 Deepak 92

3 Rohit 85
34 | P a g e
4 Deepak 92

Program 7
Q7 Find the sum of each column, or find the column with
lowest mean
Source code
import pandas as pd

Profit={'TCS':{'Qtr1':2500,'Qtr2':2000,'Qtr3':3000,'Qtr4':2000},

'WIPRO':{'Qtr1':2800,'Qtr2':2400,'Qtr3':3600,'Qtr4':2400},

'L&T':{'Qtr1':2100,'Qtr2':5700,'Qtr3':35000,'Qtr4':2100}}

df=pd.DataFrame(Profit)

print(df)

print()

print('Column wise sum in dataframe is :::')

print(df.sum(axis=0))

#Print mean value of each column

print()

print('Column wise mean value are :::::::::')

35 | P a g e
print(df.mean(axis=0))

#Return column with minimum mean value

print()

print('Column with minimum value is ::::::::::::')

df.mean(axis=0).idxmin()

Output:
TCS WIPRO L&T

Qtr1 2500 2800 2100

Qtr2 2000 2400 5700

Qtr3 3000 3600 35000

Qtr4 2000 2400 2100

Column wise sum in dataframe is :::

TCS 9500

WIPRO 11200

L&T 44900

dtype: int64

Column wise mean value are :::::::::

TCS 2375.0

WIPRO 2800.0

36 | P a g e
L&T 11225.0

dtype: float64

Column with minimum value is ::::::::::::

TCS

Program-8
Q8 Locate the three largest value in dataframe
Source code
import pandas as pd

dic={'Name':['Rohit','Mohit','Deepak','Anil','Pankaj','Sohit','Geeta'],

'MarksinIP':[85,45,92,85,98,96,84]}

marks=pd.DataFrame(dic)

#Find 3 Largest Value for MarksinIP Column

print(marks.nlargest(3,['MarksinIP']))

Output
Name MarksinIP

4 Pankaj 98

5 Sohit 96

2 Deepak 92

37 | P a g e
Program-9
Q9Subtract the mean of a row from element of the row
in Dataframe
Source Code
import pandas as pd

Profit={'TCS':{'Qtr1':2500,'Qtr2':2000,'Qtr3':3000,'Qtr4':2000},

'WIPRO':{'Qtr1':2800,'Qtr2':2400,'Qtr3':3600,'Qtr4':2400},

'L&T':{'Qtr1':2100,'Qtr2':5700,'Qtr3':35000,'Qtr4':2100}}

df=pd.DataFrame(Profit)

print(df)

print()

print('Mean of each row is :::::::::')

print(df.mean(axis=1))

print()

print('Dataframe after Subtracting mean value of each row from each element of
the row is :::')

38 | P a g e
print(df.sub(df.mean(axis=1),axis=0))

Output
TCS WIPRO L&T

Qtr1 2500 2800 2100

Qtr2 2000 2400 5700

Qtr3 3000 3600 35000

Qtr4 2000 2400 2100

Mean of each row is :::::::::

Qtr1 2466.666667

Qtr2 3366.666667

Qtr3 13866.666667

Qtr4 2166.666667

dtype: float64

Dataframe after Subtracting mean value of each row from each element of the
row is :::

TCS WIPRO L&T

Qtr1 33.333333 333.333333 -366.666667

Qtr2 -1366.666667 -966.666667 2333.333333

Qtr3 -10866.666667 -10266.666667 21133.333333

Qtr4 -166.666667 233.333333 -66.666667

39 | P a g e
Program-10
Q10 Replace all negative in dataframe with a 0
import pandas as pd

dic={'Data':[-5,-2,5,8,9,-6],

'Data':[2,4,10,15,-5,-8]}

df=pd.DataFrame(dic)

print(df)

print()

print('dataframe after replacing negative values with 0:::')

df[df<0]=0

print(df)

Output
Data

0 2

1 4

2 10

40 | P a g e
3 15

4 -5

5 -8

dataframe after replacing negative values with 0:::

Data

0 2

1 4

2 10

3 15

4 0

5 0

41 | P a g e
Program-11

Q11 Replace all missing values in a dataframe with


999
Source Code
import pandas as pd

import numpy as np

empdata={'emp':[101,102,103,104,105,106],

'ename':['Sachin','Vinod','Lakhbir',np.nan,'devinder','Umaselvi'],

'Doj':['12-01-2012','15-01-2012','05-09-2007','17-01-2012',np.nan,'16-01-
2012']}

df=pd.DataFrame(empdata)

print(df)

df=df.fillna({'ename':999,'Doj':999})

print()

print(df)

Output
42 | P a g e
emp ename Doj

0 101 Sachin 12-01-2012

1 102 Vinod 15-01-2012

2 103 Lakhbir 05-09-2007

3 104 NaN 17-01-2012

4 105 devinder NaN

5 106 Umaselvi 16-01-2012

emp ename Doj

0 101 Sachin 12-01-2012

1 102 Vinod 15-01-2012

2 103 Lakhbir 05-09-2007

3 104 999 17-01-2012

4 105 devinder 999

5 106 Umaselvi 16-01-2012

43 | P a g e
Program-12
Q12 Importing and exporting data between pandas and
csv file.
Importing:
Source Code:
import pandas as pd

df1=pd.read_csv(r'D:\empl.csv')

print(df1)

Output:

Exporting:
import pandas as pd

df=[{ 'Name' : 'Sachin', 'Surname' : 'Bhardwaj'},

44 | P a g e
{'Name' : 'Vinod', 'Surname' : 'Varma'}]

df1= pd.DataFrame(df)

df1.to_csv(r'D:\DataFrame1.csv')

print(df1)

Output:

45 | P a g e
Program-13
Q13 Importing and exporting data between pandas and
Mysql database.

Importing Data from mysql to Dataframe

46 | P a g e
Exporting data from Data Frame from Mysql

47 | P a g e
48 | P a g e
Program-14
Q14. Given the school result data, analyse the
performance of the student on different parameters, e.g
subject wise or class wise
Source code:
import matplotlib.pyplot as plt

Subject=['Physics','Chemistry','hindi','Biology','ComputerSc']

Percentage=[85,78,65,90,100]

plt.bar(Subject,Percentage,align='center',color='green')

plt.xlabel('SUBJECTS NAME')

plt.ylabel('PASS PERCENTAGE')

plt.title('Bar Graph For Result Analysis')

plt.show()

Output:

49 | P a g e
Program-15
Q15 For the dataframes created above, analyse and plot
appropriate charts with title and legend
Source Code:
import matplotlib.pyplot as plt

import numpy as np

s=['1st','2nd','3rd']

per_sc=[95,89,77]

per_com=[90,93,75]

per_hum=[97,92,77]

x=np.arange(len(s))

plt.bar(x,per_sc,label='Science',width=0.25,color='green')

plt.bar(x+0.25,per_com,label='commerce',width=0.25,color='red')

plt.bar(x+0.50,per_hum,label='humanities',width=0.25,color='gold')

plt.xticks(x,s)

plt.xlabel('Position')

plt.ylabel('Percentage')

plt.title('Bar Graph For Result Analysis')

plt.legend()

plt.show()

50 | P a g e
Output:

51 | P a g e
Program-16
Q 16.To take data of our interest from an open source,
aggregate and summarize it. Then plot functions of the
matplotlib.
Source Code:

52 | P a g e
Output:

53 | P a g e
Program- 17
Q17 Questions given below are based on the following
data, weight measurements for 16 small order of French
fries(in grams).
a) Create a simple histogram from the above data
b) Create a horizontal histogram from the above data
c) Create a step type of histogram from the above data
d) Create a cumulative histogram from the above data
Source code:
import matplotlib.pyplot as plt
import numpy as np
import seaborn as sns
sns.set()
weight=[78,72,69,81,63,67,65,75,
       79,74,71,83,71,79,80,69]
plt.hist(weight,bins=[60,70,80,90],edgecolor='black',color='red',width=3)
plt.show()
print()
plt.hist(weight,bins=[60,70,80,90],edgecolor='black',color='yellow',orient
ation='horizontal')
plt.show()
print()
plt.hist(weight,bins=[60,70,80,90],edgecolor='black',color='green',histtyp
e='step')
plt.show()
print()
plt.hist(weight,bins=[60,70,80,90],edgecolor='black',color='blue',width=3,
cumulative=True)
plt.show()
print(),
array= np.linspace(60,85,16,dtype='int32')

54 | P a g e
print(array)
print()
plt.hist([weight,array],bins=[60,70,80,90],edgecolor='black',color=['red',
'blue'],width=3)
plt.show()
print()
plt.hist([weight,array],bins=[60,70,80,90],edgecolor='black',color=['green
','yellow'],cumulative=True)
plt.show()
print()
plt.hist([weight,array],bins=[60,70,80,90],edgecolor='black',color=['black
','yellow'],orientation='horizontal')
plt.show()
print()

Output:

55 | P a g e
56 | P a g e
57 | P a g e
Program- 18
Q18.Create a line chart depicting the price of the apps
Source code:
import pandas as pd

import numpy as np

import matplotlib.pyplot as plt

df1=pd.DataFrame({'APPNAME':['AngryBirds','TeamTitans','Marvel
Comics','ColourMe','PUBG','CraxyTaxi','Instagram','WhatsApp','SnapChat'],

'App Price':[75,120,190,245,550,55,175,75,140],

'Total Downloads':
[197000,209000,414000,196000,272000,311000,213000,455000,278000]})

print(df1)

plt.figure(figsize=(15,7))

plt.plot(df1['App Price'])

plt.title('App Price in Rs')

plt.xticks(np.arange(9),df1['APPNAME'])

plt.xlabel('App Name')

plt.ylabel('Price')

plt.show()

58 | P a g e
Output:

Q19 A bar chart depicting the downloads of the app


Source code:
import pandas as pd

import numpy as np

import matplotlib.pyplot as plt

df1=pd.DataFrame({'APPNAME':['AngryBirds','TeamTitans','Marvel
Comics','ColourMe','PUBG','CraxyTaxi','Instagram','WhatsApp','SnapChat'],

'App Price':[75,120,190,245,550,55,175,75,140],

'Total Downloads':
[197000,209000,414000,196000,272000,311000,213000,455000,278000]})

plt.figure(figsize=(15,7))

59 | P a g e
plt.bar(df1['APPNAME'],df1['Total Downloads'])

plt.title('Total Downloads of the App')

plt.xticks(np.arange(9),df1['APPNAME'])

plt.xlabel('App Name')

plt.ylabel('Total Downloads')

plt.show()

Source Code:

Q20. Convert the ESD downloads sequence that has each


download value divided 1000.Create a bar chart for
prices as well ESD downloads.
Source code:
import pandas as pd

import numpy as np

60 | P a g e
import matplotlib.pyplot as plt

df1=pd.DataFrame({'APPNAME':['AngryBirds','TeamTitans','Marvel
Comics','ColourMe','PUBG','CraxyTaxi','Instagram','WhatsApp','SnapChat'],

'App Price':[75,120,190,245,550,55,175,75,140],

'Total Downloads':
[197000,209000,414000,196000,272000,311000,213000,455000,278000]})

plt.figure(figsize=(15,7))

est=df1['Total Downloads']/1000

x1=np.arange(9)

x2=x1+0.2

plt.bar(x1,df1['App Price'],width=0.2,label='App Price')

plt.bar(x2,est,color='r',width=0.2,label='Est Downloads')

plt.title('Est Downloads')

plt.xticks(np.arange(9),df1['APPNAME'])

plt.ylabel('App Name')

plt.legend(loc='upper right')

plt.show()

61 | P a g e
Output:

62 | P a g e
PROGRAM-19
Q21 Create a barcharts to see the distribution of rainfall
from Jan to Dec for all the zones
Source Code:
import pandas as pd

import numpy as np

import matplotlib.pyplot as plt

df=pd.DataFrame({'zones':['North','South','East','West','Central'],

'Jan':[140,160,140,180,110],

'Feb':[130,200,180,150,160],

'Mar':[130,130,150,200,130],

'Apr':[190,200,170,120,110],

'May':[160,200,170,120,110],

'Jun':[200,170,140,140,170],

'Jul':[150,110,170,110,130],

'Aug':[170,160,180,130,200],

'Sep':[190,130,190,150,160],

'Oct':[170,140,150,190,160],

'Nov':[150,170,140,110,170],

'Dec':[120,200,170,140,130]})

print(df)

63 | P a g e
df.plot.bar()

plt.show()

Output:

64 | P a g e
MYSQl
PROGRAMS

65 | P a g e
Program-1
Q17.Create a table with the student id, name, and marks
as attributes where the student id is primary key

Q18.Insert the details of a new student in the above


table

Q19.Delete the details of a particular student in the


above table

Q20 Use the select command to get the details of the


students with marks more than 80.

66 | P a g e
Q21 Create a new table(order ID, customer Name, order
Date) by joining two tables(order ID,customer ID, and
order Date) and (customer ID,customer)

67 | P a g e
Q22 Create a foreign key in one of the two tables
mentioned above

Q23 Find the min,max,sum and average of the marks in a


student marks table.

Q24 Find the total numbers of customers from each


country in the table (customer ID,customer
Name,country) using group by

Q25 Create a new table(name,date of birth) by joining


two tables(student id,name) and (student id,date of
birth)

68 | P a g e
Q26. Write a SQL query to order the(student ID,marks)
table in descending order of the marks

69 | P a g e
Program-2
AIM: Create a MYSQL program
OBJECTIVES:
1. Create table FINANCE.

2. Display the structure of table Finance.

3. Insert records/tuples in it.

70 | P a g e
4. Display the details of all the rows from Finance table.

5. Display the rows containing Accno, Bname, Cname &


Lamount columns.

71 | P a g e
6. Display details of all the finance records whose
installment is less than 200.

7. Display the Accno, Bname, Cname & Lamount of all the


records which started before ‘2011-01-01’.

8. Display the Accno, Bname, Cname & Lamount of all the


finance records whose interest rate is more than and
equal to 10.00.

72 | P a g e
9. Display the details of all the loans whose rate of
interest is NULL.

10. Display the details of all the loans whose rate of


interest is not NULL.

11. Display the name of banks whose finance various


loans from table FINANCE.

73 | P a g e
12. Display the different interest rates that banks are
charging for various loans excluding NULL.

13. Display the details of the entire finance amount


which started after 2010-12-31 and for which the
number of installments is more than 150.

14. Display the CName and Lamount for all those records
for which either instalments are less than 150 or bank
name is SBI.
74 | P a g e
15. Display the Cname and Lamount for all those loans
amount is either less than 1200000 or irate is more than
11.50.

16. Display the details of all the loans which are financed
in the year 2010.

75 | P a g e
17. Display the details of all the loans whose Lamount is
the range between 800000 and 1500000.

18. Display the details of all the loans whose rate is the
range between 11.00 and 12.00.

19. Display the Cust_Name and Loan_Amount for all the


loans for which the number of instalments are 140,165
and 190.

76 | P a g e
20. Display the details of all the amounts whose Lamount
is the range 800000 to 1500000.

21. Display the details of all the loans whose rate of


interest is the range 10.00 to 12.00.

22. Display Accno,C_name and Lamount for all the loans


for which the C_Name ends with ’sen’.

23. Display Accno,C_name and Lamount for all the loans


for which the C_Name ends with ’a’.
77 | P a g e
24. Display Accno,C_name and Lamount for all the loans
for which the C_Name ends with ’e’.

25. Display Accno,C_name and Lamount for all the loans


for which the C_Name ends with ’n’.

78 | P a g e
26. Display Accno,C_name and Lamount for all the loans
for which the C_Name contains ’e’ as the last character.

27. Display the details of all the loans in ascending order


of their Lamount.

79 | P a g e
28. Display the details of all the loans in descending order
of their ISdate.

29. Display the details of all the loans in ascending order


of their Lamount and within Lamount in the descending
order of their Start_Date.

80 | P a g e
30. Put the interest rate 11.50 for all the loans for which
the interest rate is NULL.

31. Increase the interest rate by 0.2 for all the loans for
which loan amount is more than 1000000.

32. Delete records of all the loans whose start date is


before 2007.

81 | P a g e
33. Delete records of all the loans of ‘yabin’.

34. Add another column category of type char(1) in the


finance table.

Informatics Activity
Q1: Identify the network topology in your school?
The network topology used in school is Star topology.

82 | P a g e
i)What is a star topology?
In a star topology, each node is directly connected to a central
device like a hub or switch. It is most popular topology to form Local
Area Network(LAN).

ii) why star topology is used in schools?


The star topology is used eliminate a lot of possible points of failure
on your network. . Unlike other topologies (eg, Ring Topology)
where a network problem on one node has the potential to affect the
whole network, the Star Topology will confine the problem to that
logical unit
From a troubleshooting perspective the Star Topology ensures that
network admin work sequentially (referencing against say, the OSI
or TCP/IP models) to identify and quickly resolve network
problems.

83 | P a g e
 Characteristics of Star Topology
 All cables run to a central connection point.
 If one cable breaks or fails, only the computer that is connected to
that cable is unable to use the network.
 A star topology is scalable.
 As the network grows or changes, computers are simply added or
removed from the central connection point, which is usually a
hub or a switch.

 Cost Factor
there is so much cabling used to connect individual computers to a
central point, this may increase the cost of expanding and
maintaining the network.

 Advantages
 Easy to setup and expand
 Easy to locate fault in case of network failure.
 It offers centralized control over the network
 Disadvantages
 Increases cabling cost since each node is directly
connected to the centre node .
 Difficult to expand due to limited connecting points at
centre node or device

84 | P a g e
 All nodes are dependant on central node. If the central
device(switch) goes down then entire network breaks
down.

 Major Drawback
 While star networks are simple in structure, the central
supervisory computer node is a critical point in the
system and failure of this means total failure of the
whole system.
 When any device in the network needs to communicate
with another device, a request has to be made to the
central supervisory computer and all data transferred is
routed through this central node.
 If the central node is inoperational for any reason then
data communication in the network is stopped.

Q2: Identify the open source used in our school?


The open source used in our school is mysql.
 What is mysql?
 MySQL is an open-source relational database management
system (RDBMS). A relational database organizes data
85 | P a g e
into one or more data tables in which data types may be
related to each other; these relations help structure the
data. SQL is a language programmers use to create, modify
and extract data from the relational database, as well as
control user access to the database. In addition to
relational databases and SQL, an RDBMS like MySQL
works with an operating system to implement a relational
database in a computer's storage system, manages users,
allows for network access and facilitates testing database
integrity and creation of backups.
 Types of functions
 Built-in functions
MySQL comes bundled with a number of built in functions.
Built in functions are simply functions come already
implemented in the MySQL server. These functions allow us
to perform different types of manipulations on the data. The
built in functions can be basically categorized into the
following most used categories.
Strings functions - operate on string data types
Numeric functions - operate on numeric data types
Date functions - operate on date data types
Aggregate functions - operate on all of the above data types
and produce summarized result sets.

86 | P a g e
Other functions - MySQL also supports other types of built in
functions but we will limit our lesson to the above named
functions only.

 Where mysql is used?


 The application is used for a wide range of purposes,
including data warehousing, e-commerce, and logging
applications.
 The most common use for mySQL however, is for the
purpose of a web database. It can be used to store
anything from a single record of information to an entire
inventory of available products for an online store.
 In association with a scripting language such as PHP or
Perl (both offered on our hosting accounts) it is possible
to create websites which will interact in real-time with a
mySQL database to rapidly display categorised and
searchable information to a website user.

 Some of the most important SQL Commands


 SELECT - extracts data from a database
 UPDATE - updates data in a database
 DELETE - deletes data from a database
 INSERT INTO - inserts new data into a database

87 | P a g e
 CREATE DATABASE - creates a new database
 ALTER DATABASE - modifies a database
 CREATE TABLE - creates a new table
 ALTER TABLE - modifies a table
 DROP TABLE - deletes a table
 CREATE INDEX - creates an index (search key)
 DROP INDEX - deletes an index

 ADVANTAGES
 It’s Easy To Use
 Support Is Readily Available Whenever Necessary
 It’s Open-Source (Sort Of)
 It’s Incredibly Inexpensive
 It’s An Industry Standard (And Still Extremely Popular)
 DISADVANTAGES
 It’s Got A Few Stability Issues
 It Suffers From Relatively Poor Performance Scaling
 Development Is Not Community Driven – and Hence
Has Lagged
 Its Functionality Tends To Be Heavily Dependant On
Addons
 Developers May Find Some Of Its Limitations To Be
Frustrating

88 | P a g e
89 | P a g e

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy