Computer
Computer
Sample Paper 08
Computer Science (083)
CLASS XII 2024-25
Time: 3 Hours Max. Marks: 70
General Instructions:
1. This question paper contains 37 questions.
2. All questions are compulsory. However, internal choices have been provided in some questions. Attempt
only one of the choices in such questions
3. The paper is divided into 5 Sections- A, B, C, D and E.
4. Section A consists of 21 questions (1 to 21). Each question carries 1 Mark.
5. Section B consists of 7 questions (22 to 28). Each question carries 2 Marks.
6. Section C consists of 3 questions (29 to 31). Each question carries 3 Marks.
7. Section D consists of 4 questions (32 to 35). Each question carries 4 Marks.
8. Section E consists of 2 questions (36 to 37). Each question carries 5 Marks.
9. All programming questions are to be answered using Python Language only.
10. In case of MCQ, text of the correct answer should also be written.
SECTION A
3. The __________ mode opens a file for both reading and writing.
(a) wr (b) rw
(c) r+ (d) a+
4. Give the output for the following program segment given below.
for i in range (-5,-7,-1):
print (i + 1)
(a) -7,-6,-5 (b) -5,-6,-7
(c) No output (d) Error
12. To ensure that values in the Salary column of a table are restricted to being more than 50000, which
constraint should be used?
(a) NULL (b) PRIMARY KEY
(c) CHECK (d) NOT NULL
13. To insert a record from Python to a mysql database the...........function needs to be executed.
(a) execute() (b) executeUpdate()
(c) executeQuery() (d) None of these
14. You can repeat the elements of the tuple using which operator?
(a) * (b) +
(c) ** (d) %
Directions (Q. Nos. 20-21) are Assertion and Reason based questions.
20. Assertion (A) : Default parameters to a function are not compulsory but are a good practice to specify.
Reason (R) : If default parameters are specified the formal parameters will take the default values , if any
of the actual parameters are not passed.
(a) Both A and R are true and R is the correct explanation for A.
(b) Both A and R are true and R is not the correct explanation for A.
(c) A is true but R is false.
(d) A is false but R is true.
SECTION B
22. Determine the output for the following Python expressions:
(i) ‘amazing’.center(15, ‘#’)
(ii) ‘python123’.isalnum()
Keys Values
A One
B Two
C Three
D Four
SECTION C
29. Write a method Filterwords() to find and display words from the text file NewsLetter.txt that have a length
of less than 4 characters.
o
Write a method countAN() that checks the number of occurrance of “A” and “N” in a text file “Story.txt”.
31. Write a user-defined function patterns(n) to display the following pattern for n lines, based on the number
passed to the function. The number should be entered in the main() function..
Example :
Enter a number : 4
4
44
444
4444
Enter a number 5
5
55
555
Page 6 Sample Paper 08 NODIA APP
5555
55555
o
A user defined method to open a text file “para.txt” and display count of number of ‘c’ or ‘C’ and number
of ‘e’ or ‘E’ separately.
def test():
f=open(“Para.TXT”)
n1=0
n2=0
while True:
1=........... //Statement
if not 1:
break
for i in 1:
if (i ==‘E’ or i ==‘e’):
n1=n1+1
elif(i==‘C’ or i==‘c’):
n2=n2+1
print(n1)
print(n2)
f.close()
(a) Which module needs to be imported to use text file handling functions?
(b) Write the functionname to close a file object.
(c) Write the code best suitable for statement as marked.
SECTION D
32. (a) Write a program to find all numbers between 200 and 300 (inclusive) that are divisible by 7 but not
multiples of 5.
(b) Consider the table Faculty whose columns’ name are
F_ID, Fname, Lname, Hire_date,
Salary, Course_name
Write the code to insert the following record into the above table.
o
(a) Identify which of the following names are invalid and explain why:
(i) PaidInterest
(ii) S-num
(iii) Percent
(iv) 123
(b) What is the utility of fetchall() method? Write a code to fetch all the records of a Student table from
PythonDB Database.
Note :
CBSC 12th Computer Science Sample Paper 08 Page 7
Host : localhost
Database : PythonDB
User : root
Password:arihant
Table : Student
34. (a) Consider the tables EMP and SALGRADE storing details of employees and their salaries.
Table: EMP
empno ename sal date
110 Priya 7000 11-11-2010
111 Seema 14000 15-02-2014
151 Sachin 30000 18-04-2015
142 Deepa 25000 20-05-2015
Table : SALGRADE
empno city lowsal hisal grade
110 Delhi 5000 10000 2
111 NCR 11000 13000 1
142 Meerut 10000 20000 5
With respect to the tables given above write a command to display the Employee names and the corresponding
cities.
(b) With respect to the tables given above , write commands for the following :
(i) To display the average salaries of all employees who are not from Delhi.
(ii) To display, maximum salary from the EMP table among employees whose date is after “2014”
(iii) To find the count of employees who are from “Delhi”
(iv) To display each employee’s name and Grade.
TABLE: BOOKS
Book_Id Book Name Author_Name Publishers Price Type Qty
F0001 The Tears William Hopkins First Publ 750 Fiction 10
F0002 Thunder bolts Anna Roberts First Publ 700 Fiction 5
T0001 My First C++ Brain & Brooke EPB 250 Text 10
T0002 C++ Brainworks A.W. Rossaine TDH 325 Text 5
C0001 Fast Cook Lata Kapoor EPB 350 Cookery 8
TABLE : ISSUED
Book_Id Quantity_Issued
F0001 3
T0001 1
C0001 5
(i) To show Book name, Author name and Price of books of EPB Publishers.
(ii) To list the names from books of Fiction type.
(iii) To display the names and price of the books in descending order of their price.
(iv) To increase the price of all books of First Publ Publishers by 50.
o
Write the command to remove all the records of the BOOKS table keeping the structure.
SECTION E
36. G.R.K International Inc. is planning to connect its Bengaluru Office Setup with its Head Office in Delhi.
The Bengaluru Office G.R.K. International Inc. is spread across an area of approx. 1 square kilometres
consisting of 3 blocks. Human Resources, Academics and Administration. You as a network expert have to
suggest answers to the questions (i) to (v) raised by them.
Note Keep the distances between blocks and number of computers in each block in mind, while providing
them the solutions.
TABLE : PATIENTS
No Name Age Department Dateofadm Charges Sex
1 Kettu 16 ENT 24/02/23 300 F
2 Ankita 29 Cardiology 20/02/23 800 F
3 Rekha 45 Gynaecology 22/02/23 300 F
4 Kushi 19 Cardiology 13/01/23 800 M
5 Antim 31 Nuclear Medicine 19/02/23 400 M
(i) What should be the width of the Dateofadm field?
(ii) Write commands to remove the records of “Cardiology” department.
(iii) Write statements to :
(a) Display a report showing Name, charges and discount (15%) for all patients.
(b) Display names of female patients .
o
(option for part (iii) only)
(a) Which function will find the total charges of all patients?
(b) Name the constraint that will restrict duplicate values in Name column.
EN
CBSC 12th Computer Science Sample Paper 09 Page 1
Sample Paper 09
Computer Science (083)
CLASS XII 2024-25
Time: 3 Hours Max. Marks: 70
General Instructions:
1. This question paper contains 37 questions.
2. All questions are compulsory. However, internal choices have been provided in some questions. Attempt
only one of the choices in such questions
3. The paper is divided into 5 Sections- A, B, C, D and E.
4. Section A consists of 21 questions (1 to 21). Each question carries 1 Mark.
5. Section B consists of 7 questions (22 to 28). Each question carries 2 Marks.
6. Section C consists of 3 questions (29 to 31). Each question carries 3 Marks.
7. Section D consists of 4 questions (32 to 35). Each question carries 4 Marks.
8. Section E consists of 2 questions (36 to 37). Each question carries 5 Marks.
9. All programming questions are to be answered using Python Language only.
10. In case of MCQ, text of the correct answer should also be written.
SECTION A
8. Which of the following modes open a text file, such that the new data is written in it keeping the existing
contents ?
(a) r+ (b) rw+
(c) w+ (d) a
10. Complete the code by filling in the blank with the appropriate line to move the file pointer:
file = open(“output.txt”, “r”)
data = file.read(20)
file.seek(5) # Move the file pointer to position 5
next_data = file.read(10)
file.close()
12. Which type of network is typically used for a single site, covering a small range around an individual, such
as in a home or office setup?
(a) DSL (b) RAM
(c) WAN (d) PAN
14. The_____clause with GROUP BY, can filter groups from the query output.
(a) WHERE (b) FILTER
(c) HAVING (d) CHECK
CBSC 12th Computer Science Sample Paper 09 Page 3
15. Given a list L= [6,12,9,40,2,1]. Which of the following statements will arrange the list in reverse order
(a) L.arrange() (b) L.sort()
(c) L.sort(reverse=True) (d) L.sort(reverse=False)
16. Which method returns the next row from the result set as a tuple?
(a) fetchone( ) (b) fetchmany( )
(c) fetchall( ) (d) rowcount
18. Which SQL category provides statements for manipulating database objects?
(a) DDL (b) DML
(c) DCL (d) TCL
19. Which attribute is used to return access mode with that file was opened?
(a) file.mode (b) mode.file
(c) file*mode (d) None of these
Directions : (Q. Nos. 20 and 21) are Assertion and Reason based questions.
20. Assertion (A) : A python function can return more than one value to the calling function.
Reason (R) : The return statement takes only a list as parameter.
(a) Both A and R are true and R is the correct explanation of A.
(b) Both A and R are true but R is not the correct explanation of A.
(c) A is true but R is false.
(d) A is false but R is true.
21. Assertion (A) : While opening a binary file the mode may not be specified.
Reason (R) : The open function for file opening by default takes the mode parameter as ‘rb’ for binary files,
if no mode is specified.
(a) Both A and R are true and R is the correct explanation of A.
(b) Both A and R are true but R is not the correct explanation of A.
(c) A is true but R is false.
(d) A is false but R is true.
SECTION B
22. Find the output of the following code :
i = 1
while(i < 5):
print(i)
i = i * 2
25. Explain the UPDATE command in SQL, including its basic syntax and an example.
SECTION C
29. Write a Python function that accepts a sentence and counts the occurrences of the words “is” and “was”.
Example
Input: “It is what it is. The situation was complex and still is.”
Output:
Number of “is”: 3
Number of “was”: 1
o
Write a definition of a function that takes input a sentence and display the list of words that start with a
lowercase vowel and list of words that start with a uppercase vowel separately.
Example
Input : A quick black elephant enters Into a jungle.
Output
List of words starting with lowercase vowels [‘elephant’, ‘enters’, ‘a’]
List of words starting with uppercase vowels [‘A’, ‘Into’]
30. How can you create a Python function to repeatedly accept person names and add them to a list, ensuring
that each name only contains letters, spaces, and periods (.) without any digits?
o
Find the final contents of a stack that encounters the following tokens.
Assume that an operand is pushed to stack and a binary operator pops two operands from stack and pushes
the result to the stack.
100,8,3,*,50,2,+,+,*
31. Write a program that calculates the sum and mean of a series of numbers entered by the user.
o
A user-defined method to open a text file “para.txt” and write its contents to another file fter removing the
3rd line
def Func():
with open (‘Para.txt’, ‘r’) as f:
l=f.readlines()
f.close()
print(l)
del l[3]
print(l)
f=open (‘Para.txt’, ‘w’)
f...........
f.close()
(a) Which module needs to be imported to use operating system functions like rename() and remove().
(b) Write the function name to open a text file.
(c) Fill the blank as marked in above code.
SECTION D
32. (a) Write a Python program to find maximum and minimum elements in a tuple.
(b) Consider the table MobileStock with following fields
M_Id, M_Name, M_Qty, M_Supplier
Write the Python code to fetch all records with fields M_Id, M_Name and M_Supplier from database
Mobile.
o
(a) Which of the following are invalid names and why?
(i) Paidlnterest (ii) S-num
(iii) Percent (iv) 123
(b) Write the steps for Database connectivity with short explanation of each step.
TABLE : PRODUCT
PID ProductName Manufacturer Price
TP01 Powder LAK 40
FW05 Face Cleaner ABC 45
BS01 Liquid Soap ABC 55
SH06 Dove Shampoo XYZ 120
FW12 Face Wash XYZ 95
TABLE : CLIENT
C_ID ClientName City P_ID
01 Cosmetic Shop Delhi FW05
06 Total Health Mumbai BS01
12 Life care Delhi SH06
15 Pretty Store Delhi FW12
16 Dreams Bengaluru TP01
(a) To display the ClientName, City from table CLIENT and ProductName and Price from table PRODUCT,
with their corresponding matching P_ID.
(b) Write SQL queries for statements (i) to (iv)
CBSC 12th Computer Science Sample Paper 09 Page 7
35. Write SQL commands (i) to (iv) for the following tables :
TABLE : STUDENT
S NO NAME STREAM FEES AGE SEX AID
1 RAJAN KUMAR COMPUTER 750.00 17 M A1
2 DEEPA JENEJA COMPUTER 750.00 18 F A2
3 KESHAR MEHRA BIOLOGY 500.00 16 M A2
4 SACHIN SINGH ENG. DR 350.00 18 M A1
5 PRACHI ECONOMICS 300.00 19 F A3
6 NISHA ARORA COMPUTER 750.00 15 F A3
7 NEEL KUMAR ECONOMICS 300.00 16 M A1
8 SARIKA VASWANI BIOLOGY 500.00 15 F A1
TABLE: ADDRESS
AID City
Al Jaipur
A2 Bengaluru
A3 Delhi
(i) List the name of all the students, who have taken stream as COMPUTER.
(ii) To count the number of female students.
(iii) To display the number of students stream wise.
(iv) To display names of the students with corresponding cities.
o
Write the command to display all the tables in the database.
SECTION E
36. Expertia Professional Global (EPG) is an online corporate training provider specializing in IT-related
courses. The company is establishing a new campus in Mumbai, and as a network expert, you are tasked
with analyzing the physical layout of various buildings and determining the optimal number of computers
to be installed in each location. During the planning phase, you must provide the most effective solutions
for the queries (i) to (v) that have been raised by the company..
Physical locations of the buildings of EPG
From To Distance
Administrative Building Finance Building 60
Administrative Building Faculty Studio Building 120
Finance Building Faculty Studio Building 70
Expected computers to be installed in each building
Buildings Computers
Administrative Building 20
Finance Building 40
Faculty Studio Building 120
(i) Suggest the most appropriate building, where EPG should plan to install the server.
(ii) Suggest the most appropriate building to building cable layout to connect all three buildings for efficient
communication.
(iii) Which type of network out of the following is formed by connection the computers of these three
buildings?
(a) LAN (b) MAN (c) WAN
(iv) Write the difference between LAN and MAN.
(v) Expand the following
(a) WAN (b) MAN
TABLE : ORDERS
O_Id Order Date OrderPrice Customer
1 2008/11/12 1000 Hansen
2 2008/10/23 1600 Nilsen
3 2008/09/02 700 Hansen
4 2008/09/03 300 Hansen
5 2008/08/30 2000 Jensen
6 2008/10/04 100 Nilsen
(i) Write a statement to create the above table.
(ii) Write a command to change the width of Customer column to varchar(30)
(iii) Write statements to :
(a) Display the field names, their type , size and constraints .
(b) Display details of orders where orderprice is in the range 500 to 1500
(Option for part iii only)
o
(a) Write a command to increase orderprice of all orders by 15%.
(b) Name the constraint that will restrict both NULL and DUPLICATE values in the O_Id field.
EN
CBSC 12th Computer Science Sample Paper 10 Page 1
Sample Paper 10
Computer Science (083)
CLASS XII 2024-25
Time: 3 Hours Max. Marks: 70
General Instructions:
1. This question paper contains 37 questions.
2. All questions are compulsory. However, internal choices have been provided in some questions. Attempt
only one of the choices in such questions
3. The paper is divided into 5 Sections- A, B, C, D and E.
4. Section A consists of 21 questions (1 to 21). Each question carries 1 Mark.
5. Section B consists of 7 questions (22 to 28). Each question carries 2 Marks.
6. Section C consists of 3 questions (29 to 31). Each question carries 3 Marks.
7. Section D consists of 4 questions (32 to 35). Each question carries 4 Marks.
8. Section E consists of 2 questions (36 to 37). Each question carries 5 Marks.
9. All programming questions are to be answered using Python Language only.
10. In case of MCQ, text of the correct answer should also be written.
SECTION A
4. Two friends have connected their computers but are experiencing weak signals. Which device should they
use to improve signal strength?
(a) Repeater (b) Hub
(c) Switch (d) Modem
6. ______method creates a cursor object while connecting a Python application with a Mysql database.
(a) connection( ) (b) connect( )
(c) cursor( ) (d) None of these
8. Which attribute is used to return access mode with that file was opened?
(a) mode.file (b) mode.file.name
(c) file.mode (d) file.mode.type
9. Identify the option that is not a DDL (Data Definition Language) command:
(a) ALTER (b) CREATE
(c) DROP (d) DELETE
13. The.........command can be used to remove all records of a table along with the table structure.
(a) DELETE TABLE (b) DROP TABLE
(c) REMOVE TABLE (d) None of these
15. Which function is used to generate a sequence of numbers over a period of time?
(a) range() (b) len()
(c) limit() (d) lim()
17. Given a list Lst= [65,182,90,420,20,10]. What will be the correct statement to take out the 3rd element from
the list?
(a) Lst.pop(2) (b) L.find(2)
(c) L.pop(–1) (d) L.del(90)
18. What is the relationship between Primary key, Candidate key, and Alternate key?
(a) Primary key = Candidate key - Alternate key
(b) Candidate key= Primary key - Alternate key
(c) Alternate key= Primary key+ Candidate key
(d) None of the above
19. The first integrity rule for relational databases ensures that_____
(a) Primary key is unique
(b) Foreign key is unique
(c) Primary key is unique and NOT NULL
(d) There is only one candidate key
21. Assertion (A) : Python supports addition of data in file , preserving the previous data.
Reason (R) : The write mode erases all previous data of a pre-existing file.
(a) Both A and R are true and R is the correct explanation for A.
(b) Both A and R are true but R is not the correct explanation for A.
(c) A is true but R is false.
(d) A is false but R is true.
Page 4 Sample Paper 10 NODIA APP
SECTION B
22. Write the corresponding Python expression for the following mathematical expression.
a
(i) z = a + b – d2
(ii) z = x2 + y 3
23. (a) Identify which of the following identifiers are valid. If any are invalid, provide the reason..
(i) name_1 (ii) _SUM
(iii) $Sum (iv) num ^ 2
(b) Find the output of the following code
i=1
while (i<4):
print(i)
i=i*2
24. Mr. GopiNath, Associate Manager of Unit Nations corporate, recently discovered that the communication
between his company’s accounts office and HR office is extremely slow, and signals drop quite frequently.
These offices are 120 meters apart and connected by an Ethernet cable.
(i) Suggest him a device which can be installed in between the office for smooth communication.
(ii) What type of network is formed by having this kind of connectivity out of LAN, MAN and WAN?
o
Define hub and write its functions and types.
25. Differentiate between char(n) and varchar(n) data types with respect to databases.
26. (a) Mention any two advantages of E-mail over conventional, mail.
(b) Mr. Lal owns a factory which manufactures automobile spare parts. Suggest him the advantages of
having a web page for his factory
SECTION C
29. Write a method countFile() that counts and displays the number of lines starting with the word “FILE”
(considering both lowercase and uppercase) in the text file “start.txt”.
e.g. If the file “start.txt” contains the following lines:
Get the data value to be deleted,
Open the file for reading from it.
Read the complete file into a list
Delete the data from the list
Open the file
Open same file for writing into it
Write the modified list into file.
Close the file.
The method should display
Total lines started with word ‘FILE’ is/are: 0
o
Define a function that takes a sentence as input and displays a list of words that end with a lowercase vowel
and a list of words that end with a lowercase consonant.
30. Write the Push operation for a stack that stores person names. Ensure that the names only accept characters,
spaces, and periods (.), excluding digits. Assume that Pname is an instance attribute of the class.
o
Determine the final contents of a stack that processes the following tokens. Assume that an operand is
pushed onto the stack, and a binary operator pops two operands from the stack, performs the operation,
and then pushes the result back onto the stack..
(100, 8, 3, *, 50, 2, +, +, *)
31. Write a program that counts how often each element appears in a list provided by the user.
o
A user-defined method to open the text file “Author.txt” and display the lines that contain an even number
of words.
def evenwords():
f=open(“Author.txt”)
ln=f.readlines()
for line in ln:
linex=............// Statement
if len(linex)%2==0:
print(line)
f.close()
(a) How is readline() method different from readlines() method in Python?
(b) Write the use of the reader object in csv file operations.
(c) Fill the blank as marked statement.
SECTION D
32. (a) Write a Python program to merge the following dictionaries into a new one:
d1 = {‘X’: 15, ‘Y’: 25}
d2 = {‘Z’: 35, ‘W’: 45}
d3 = {‘P’: 55, ‘Q’: 65}
(b) Consider the table MobileStock with following fields
M_Id, M_Name, M_Qty, M_Supplier
Write the Python code to fetch all records with fields M_Id, M_Name and M_Supplier from database
Mobile.
o
(a) Sohan has a list containing 8 integers as marks of subject Science. You need to help him to create a
program with separate user defined function to perform the following operations based on the list.
(i) Push those marks into a stack which are greater than 75.
(ii) Pop and display the content of the stack.
Simple Input
Marks = [75, 80, 56, 90, 45, 62, 76, 72]
Sample Output
80 90 76
(b) Consider the following table Traders with following fields
TABLE FAMILY
No Name Female Members Male Members Income Occup-ationId
1 Mishra 3 2 7000 O1
2 Gupta 4 1 50000 O2
3 Khan 6 3 8000 O2
4 Chaddha 2 2 25000 O1
CBSC 12th Computer Science Sample Paper 10 Page 7
5 Yadav 7 2 20000 O3
6 Joshi 3 2 14000 O2
7 Maurya 6 3 5000 O1
8 Rao 5 2 10000 O3
Table : OCCUPATION
Occupationld Type
O1 Service
O2 Business
O3 Mixed
(a) To display Family name , corresponding occupation and income where male members are more than 2.
(b) Write SQL queries for statements (i) to (iv) based on tables FAMILY and Occupation.
(i) To select all the information of family, whose Occupation is Service.
(ii) To list the name of family, where female members are more than 3.
(iii) To list all names of family with income in ascending order.
(iv) To count the number of family, whose income is less than 10000.
35. Study the following tables DOCTOR and SALARY and write SQL commands for the questions (i) to (iv).
TABLE: DOCTOR
ID NAME DEPT SEX EXPER-IENCE
101 John ENT M 12
104 Smith ORTHOPEDIC M 5
107 George CARDIOLOGY M 10
114 Lara SKIN F 3
109 K George MEDICINE F 9
105 Johnson ORTHOPEDIC M 10
117 Lucy ENT F 3
111 Bill MEDICINE F 12
130 Morphy ORTHOPEDIC M 15
TABLE: SALARY
ID BASIC ALLOWANCE CONSULTATION
101 12000 1000 300
104 23000 2300 500
107 32000 4000 500
114 12000 5200 100
109 42000 1700 200
105 18900 1690 300
130 21700 2600 300
Page 8 Sample Paper 10 NODIA APP
(i) Display NAME of all doctors who are in MEDICINE department having more than 10yrs experience
from the table DOCTOR.
(ii) Display the average salary of all doctors working in ENT department using the tables DOCTOR and
SALARY. SALARY = BASIC + ALLOWANCE.
(iii) Display the minimum ALLOWANCE of female doctors.
(iv) Display the highest consultation fee among all male doctors.
o
Write the command to change the data type of consultation to double(8,3).
SECTION E
36. Workalot Consultants are establishing a secure network for their office campus in Gurgaon to support
their daily office and web-based activities. They plan to set up connectivity between three buildings on the
campus and the head office located in Mumbai. Please answer the questions (i) to (v) after reviewing the
building positions and other details provided below.
Building GREEN 32
Building RED 150
Building BLUE 45
Head Office 10
(i) Suggest the most suitable place (i.e. building) to house the server of this organisation. Also, give a
reason to justify your suggested location.
(ii) Suggest a cable layout of connections between the buildings inside the campus.
(iii) Suggest the placement of the following devices with justification :
(a) Switch
CBSC 12th Computer Science Sample Paper 10 Page 9
(b) Repeater
(iv) Write the use of Modem in a network.
(v) What is the use of firewall in network?
TABLE : FLIGHTS
FL_NO STARTING ENDING NO_FLIGHT NO_STOPS
IC301 MUMBAI DELHI 8 0
IC799 BENGALURU DELHI 2 1
MC101 INDORE MUMBAI 3 0
IC302 DELHI MUMBAI 8 0
AB812 KANPUR BENGA- LURU 3 1
IC899 MUMBAI KOCHI 1 4
AM501 DELHI TRIVAN- DRUM 1 5
MU499 MUMBAI MADRAS 3 3
IC701 DELHI AHME- DABAD 4 0
(i) The command to create the table was written as :
Create table FLIGHTS( FL_NO integer, STARTING char(20), ENDING char(30), NO_FLIGHT
integer, NO_STOPS integer);
What is wrong with command ?
(ii) What is the cardinality of the table ?
(iii) Which functions will be used to :
(a) Display total number of flights .
(b) Display number of flights whose FL_NO starts with “IC”
o
(option for part (iii) only)
Write function names to :
(a) Show the average Number of stops.
(b) Show the maximum number of stops.
EN