Sunday 22 December 2019

12th Class Computer Science Python Pre-Board Papers & CBSE Board Papers and Result analysis


 * CBSE Board sample paper 2019-20 with marking scheme (14 pages): Click Here


 * Ist Pre-Board Question Paper(RO Bengaluru)-2019-20 ( 6 pages) : Click Here

 * Ist Pre-Board Marking Scheme-(RO Bengaluru)- 2019-20 (9 pages): Click Here

 * Ist Pre-Board Result analysis-2019-20 (1 page-30 students) : click Here

* IInd Pre-Board Question Paper with Marking Scheme(RO Bengaluru):Click Here




* Sample Paper-1 (Question Paper): Click Here
* Sample Paper-1 (Marking scheme): Click Here

* Sample Paper-2 (Question Paper):Click Here
* Sample Paper-2 (Marking scheme): Click Here

* Sample Paper-3 (Question Paper with Marking scheme): Click Here







12th class Q.No.-1 Revision of python and Function -12 marks Section-A


Q.No.-1 (12 marks) Ch-1 Revision of the basics of python and Ch-2 Function

Click Here

12th class Q.No.-2 File handling to Data structure -18 marks section-A

Q. No.- 2 (18 marks) ch-3 File handling, ch-4 Python Libraries,
ch-5 Recursion, ch-6 Idea of efficiency,
ch-7 Data visualization using pyplot & ch-8 Data structure


Click Here

12th class Q.No.-3 unit-2 Computer Network (15 marks) section-B

Q.No. 3 (15 marks) unit-2 Ch-9 & Ch-10 Computer Network(C N) section-B

click Here

12th class Q.No.-4 unit-3 Data Management sql and django (15 marks)

Q. No.-4 (15 marks) October unit-3 Data management & SQL (DM-2) section-c ch-11 Django, ch-12 Interface python with an Sql database & ch-13 Sql commands: Aggregate function

click here

12th class Q.No.-5 Unit-4 Society Law and Ethics (10 marks)

Q.No.-5 (10 marks) November-unit-4 society, Law and ethics(SLE-2) Ch-14 society, Law and ethics. section-D

Clik Here

Thursday 5 December 2019

11th Class RDBMS information








1. Concept of  a data:
 --  A Database System is basically a record keeping system.
 –   Collected form of data is known as database.
 – “Database is actually a collection of interrelated data so that it can be used by various applications.

2. Relation:
A table is a combination of rows and columns which is also known as Relation.
Relation :  Basically a relation is a table. Its a collection of data in rows and columns

3.Attributes:
 columns of a table are known as attributes

4. Tuples:
 rows of a table are known as tuples

5. Candidate key
 Its a group of attributes which have the properties to be selected as a primary key i.e. These attributes shows their candidature to be a Primary Key.

6. Primary key
It is a group of one or more attributes which are used to uniquely identify records of a relation and can be used to establish relationship with other relation.  Generally all master tables have primary keys. For ex- RollNo in Student table.

7.  Alternate key

 A candidate key which is not a primary key is known as  alternate key.

8. Degree of the table
   In a relation, number of attributes or columns is known as its Degree.

9. Cardinality of  the table
 In a relation, number of tuples or rows is known as its Cardinality.

10. Foreign key
In a table, a non-key attribute which is derived from primary key of some other table is known as foreign key in present table.


DDL and DML Commands:
DDL
-- Command under this category are used to create or modify scheme of database.  It is used to create data dictionary.
– Data Dictionary is a kind of metadata means Data about Data.

 A standard DDL  should have following functions
 – It should identify the types of data division.
 – It should give a unique name of each data item.
 – It should specify the proper data type.
 – It may define the length of data items.
 – It may define the range of values of Data items.

Following commands are under this category-
 – Create, alter and drop schema Objects • Create table,  create database, 
• Alter Table  • Drop Table 

DML
– Data manipulation means- 
 • Accessing the stored data from a Database.
 • Insertion of new information into the Database.
 • Deletion of information from the Database.
 • modification of information in the Database.



Wednesday 4 December 2019

11th class Python SQL Programming

Queries for Aggregate functions- SUM( ), AVG( ), MIN( ), MAX( ), COUNT( )

 Table Name: Student1920




password: root


mysql>show databases;

mysql>create database school;

mysql> use school;

mysql>show tables;

mysql>show databases:



-> Use SQL DDL/DML




a)CREATE TABLE



  create table student1920 

    (

     RollNo int(2) primary key,
     Name char(20),
     Class char(3),
     DOB date,
     Gender char(1),
     City char(10),
     Marks int(3)
     );


mysql>desc student1920;


b)INSERT IN TO


insert into student1920 values(1,"Nanda","X","1995/06/06","M","Agra",551);
insert into student1920 values(2,"Saurabh","XII","1993/05/07","M","Mumbai",462);
insert into student1920 values(3,"Sanal","XI","1994/05/06","F","Delhi",400);
insert into student1920 values(4,"Trisla","XII","1995/08/08","F","Mumbai",450);
insert into student1920 values(5,"Store","XII","1995/10/08","M","Delhi",369);
insert into student1920 values(6,"Marisla","XI","1994/12/12","F","Dubai",250);
insert into student1920 values(7,"Neha","X","1995/12/08","F","Moscow",377);
insert into student1920 values(8,"Nishant","X","1995/06/12","M","Moscow",489);


c)UPDATE TABLE
mysql> UPDATE <TableName>  SET <ColName>=<NewValue>      WHERE  <Condition> 

update student1920 set Class = XII where Name="Nanda";

select  *  from student1920;

d)DELETE FROM
mysql> DELETE FROM <TableName> WHERE <Condition>
DELETE  FROM STUDENT1920 WHERE ROLLNO=4;

select  *  from student1920;

create table stu as(select Name, Marks from student1920 );


DELETE FROM TABLE_NAME;
DELETE FROM STU;

select  *  from student1920;


e) ALTER TABLE

ALTER TABLE table_name ADD column_name datatype;
ex: ALTER TABLE STUDENT1920 ADD MOB CHAR(10);

select  *  from student1920;

f) MODIFY TABLE
ALTER TABLE table_name MODIFY COLUMN column_name datatype;
EX: ALTER TABLE STUDENT1920 MODIFY COLUMN MOB CHAR(11);

select  *  from student1920;

g) DROP TABLE
Syntax for creation of a table from another table is -
 mysql>CREATE TABLE <TableName>    AS (SELECT <Cols> FROM <ExistingTable>   WHERE <Condition>); 

create table stu as(select Name, Marks from student1920 );


Syntax: DROP TABLE TABLE_NAME;
EX: DROP TABLE STU;


h) SELECT-FROM-WHERE-ORDER BY ->BETWEEN, IN, LIKE

Select * from Student1920 Order by name DESC;
Select * from Student1920 Order by name;
Select * from Student1920 Order by name ASC;

select  *  from student1920;

SELECT name, marks, City FROM Student1920 Where Name LIKE "Sa%" ORDER BY Class;
SELECT name, marks, City FROM Student1920 Where Name NOT LIKE "Sa%" ORDER BY Class;

select  *  from student1920;

SELECT name, marks, City FROM Student1920 Where Name LIKE "_____" ORDER BY Class;
SELECT name, marks, City FROM Student1920 Where Name NOT LIKE "_____" ORDER BY Class;

select  *  from student1920;

SELECT name,marks, city FROM student1920 WHERE marks BETWEEN 300 AND 489;

mysql> SELECT name,marks, city FROM student1920 WHERE marks NOT BETWEEN 300 AND 489;
+-------- -+---------+----------+
| name    | marks | city      |
+------- --+----------+---------+
| Nanda  |   551    | Agra    |
| Marisla |   250    | Dubai  |
+---------+-------+-------+-----+

2 rows in set (0.00 sec)



mysql> SELECT * FROM student1920 WHERE city IN('Delhi','Mumbai');
+--------+---------+-------+------------+--------+--------+-------+
| RollNo | Name    | Class | DOB        | Gender | City   | Marks |
+--------+---------+-------+------------+--------+--------+-------+
|      2 | Saurabh | XII   | 1993-05-07 | M      | Mumbai |   462 |
|      3 | Sanal   | XI    | 1994-05-06 | F      | Delhi  |   400 |
|      4 | Trisla  | XII   | 1995-08-08 | F      | Mumbai |   450 |
|      5 | Store   | XII   | 1995-10-08 | M      | Delhi  |   369 |
+--------+---------+-------+------------+--------+--------+-------+
4 rows in set (0.04 sec)

mysql> SELECT * FROM student1920 WHERE city NOT IN('Delhi','Mumbai');
+--------+---------+-------+------------+--------+--------+-------+
| RollNo | Name    | Class | DOB        | Gender | City   | Marks |
+--------+---------+-------+------------+--------+--------+-------+
|      1 | Nanda   | X     | 1995-06-06 | M      | Agra   |   551 |
|      6 | Marisla | XI    | 1994-12-12 | F      | Dubai  |   250 |
|      7 | Neha    | X     | 1995-12-08 | F      | Moscow |   377 |
|      8 | Nishant | X     | 1995-06-12 | M      | Moscow |   489 |
+--------+---------+-------+------------+--------+--------+-------+

4 rows in set (0.00 sec)

-> Aggregate functions: MIN, MAX, AVG, COUNT,SUM

a. Find the minimum marks of a female students in student1920 table.

Solution:- SELECT  min(marks) FROM student1920  WHERE Gender="F";


Select city,Min(marks) from student1920 Group By City;

b. Find the maximum marks of a male students in student1920 table.

Solution:- SELECT name, max(marks) FROM student1920 WHERE Gender="M";


SELECT name, max(marks) FROM student1920 WHERE Gender="F";

mysql> Select Max(marks) from student1920; 
mysql> Select city,Max(marks) from student1920 where City="Delhi";
mysql> Select city,Max(marks) from student1920 Group By City;

c. Find the average marks of the students in student1920 table.

Solution:- SELECT avg(marks) from student1920;


d. Find the number of tuples in the student1920 relation.

Solution:- SELECT count(*) FROM student1920;


e. Find the total marks of those students who work in Delhi city.

Solution:- SELECT sum(marks) FROM student1920 WHERE city="Delhi";






Additional

Syntax for creation of a table from another table is -
 mysql>CREATE TABLE <TableName>    AS (SELECT <Cols> FROM <ExistingTable>   WHERE <Condition>); 

create table stu as(select Name, Marks from student1920 where city='Mumbai');