×
NOTE!
Click on MENU to Browse between Subjects...
Advertisement
17CS664 - PYTHON APPLICATION PROGRAMMING
Answer Script for Module 5
Solved Previous Year Question Paper
CBCS SCHEME
PYTHON APPLICATION PROGRAMMING
[As per Choice Based Credit System (CBCS) scheme]
(Effective from the academic year 2017 - 2018)
SEMESTER - VI
Subject Code 17CS664
IA Marks 40
Number of Lecture Hours/Week 3
Exam Marks 60
Advertisement
These Questions are being framed for helping the students in the "FINAL Exams" Only
(Remember for Internals the Question Paper is set by your respective teachers).
Questions may be repeated, just to show students how VTU can frame Questions.
- ADMIN
×
CLICK ON THE QUESTIONS TO VIEW ANSWER
ANSWER :
6.1 Using JOIN to Retrieve Data:
When we follow the rules of database normalization and have data separated into multiple tables, linked together using primary and foreign keys, we need to be able to build a SELECT that reassembles the data across the tables. SQL uses the JOIN clause to reconnect these tables. In the JOIN clause you specify the fields that are used to reconnect the rows between the tables.
Consider the following program which creates two tables tblStudent and tblMarks as discussed in the previous section. Few records are inserted into both the tables. Then we extract the marks of students who are studying in 6th semester.


>
The query joins two tables and extracts the records where RollNo and sem matches in both the tables, and sem must be 6.
Advertisement
ANSWER :
In the previous Question 1, we retrieved the text data from the webpage. Similar logic can be used to extract images on the webpage using HTTP. In the following program, we extract the image data in the chunks of 5120 bytes at a time, store that data in a string, trim off the headers and then store the image file on the disk.



When we run the above program, the amount of data (in bytes) retrieved from the internet is displayed in a cumulative format. At the end, the image file 'stuff.jpg' will be stored in the current working directory. (One has to verify it by looking at current working directory of the program).
ANSWER :
Refer 4th Question & Answer (With Program if provided) or Click Here
Advertisement
ANSWER :
JSON |
XML |
It is JavaScript Object Notation |
It is Extensible markup language |
It is based on JavaScript language. |
It is derived from SGML. |
It is a way of representing objects. |
It is a markup language and uses tag structure to represent data items. |
It does not provides any support for namespaces. |
It supports namespaces. |
It supports array. |
It doesn't supports array. |
Its files are very easy to read as compared to XML. |
Its documents are comparatively difficult to read and interpret. |
It doesn't use end tag. |
It has start and end tags. |
It is less secured. |
It is more secured than JSON. |
It doesn't supports comments. |
It supports comments. |
It supports only UTF-8 encoding. |
It supports various encoding. |
ANSWER :
9.1 Application Programming Interface (API) / Service-Oriented
Architecture (SOA)
Application Programming Interface defines and documents the contracts between the applications. When we use an API, generally one program makes a set of services available for use by other applications and publishes the APIs (i.e., the "rules") that must be followed to access the services provided by the program.
When we begin to build our programs where the functionality of our program
includes access to services provided by other programs, we call the
approach a Service-Oriented
Architecture
(SOA). A SOA approach is one where
our overall application makes use of the services of other applications. A
non-SOA approach is where the application is a single stand-alone
application which contains all of the code necessary to implement the
application.
Consider an example of SOA: Through a single website, we can book flight tickets and hotels. The data related to hotels is not stored in the airline servers. Instead, airline servers contact the services on hotel servers and retrieve the data from there and present it to the user. When the user agrees to make a hotel reservation using the airline site, the airline site uses another web service on the hotel systems to actually make the reservation. Similarly, to reach airport, we may book a cab through a cab rental service. And when it comes time to charge your credit card for the whole transaction, still other computers become involved in the process. This process is depicted in Figure 9.1.

Fig 9.1 Service-oriented architecture
SOA has following major advantages:
i. we always maintain only one copy of data (this is particularly important for things like hotel reservations where we do not want to over-commit)
ii. the owners of the data can set the rules about the use of their data.
With these advantages, an SOA system must be carefully designed to have
good performance and meet the user's needs. When an application makes a set
of services in its API available over the web, then it is called as web services.
Advertisement
×
NOTE: Each Page Provides only 5 Questions & Answer
Below Page NAVIGATION Links are Provided...
All the Questions on Question Bank Is SOLVED
Below Page NAVIGATION Links are Provided...
All the Questions on Question Bank Is SOLVED
lIKE OUR CONTENT SUPPORT US BY FOLLOWING US ON INSTAGRAM : @futurevisionbie
For immediate Notification Join the Telegram Channel
×
SUGGESTION: SHARE WITH ALL THE STUDENTS AND FRIENDS -ADMIN