0% found this document useful (0 votes)
15 views8 pages

Tips - For CS and IP

The document provides tips and guidelines for computer science and informatics practices exams, including how to approach questions, show work, and common SQL concepts. It also defines several important computer networking concepts like topologies, network devices, transmission media, and protocols. Key differences are outlined for SQL and MySQL, DDL and DML commands, and ORDER BY and GROUP BY clauses.

Uploaded by

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

Tips - For CS and IP

The document provides tips and guidelines for computer science and informatics practices exams, including how to approach questions, show work, and common SQL concepts. It also defines several important computer networking concepts like topologies, network devices, transmission media, and protocols. Key differences are outlined for SQL and MySQL, DDL and DML commands, and ORDER BY and GROUP BY clauses.

Uploaded by

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

Tips for Computer Science and Informatics Practices

• Read and understand the concern of question carefully


• Write correct Serial number against the attempted questions. Serial number must be correct
• Write your answers in presentable form with proper example and output of each SQL
concept.
• Check your paper before submitting that you have attempted all answers and review it
carefully.
FOR COMPUTER SCIENCE ONLY
• For push() – append() , pop use pop()
• In pop function- check underflow condition in if part and pop in else part
• top=len(stack)-1 updation in push and pop (optional)
• fetchone- returns tuple, if no record then None
• fetchmany()- returns list of tuples
• fetchall()- returns all records in list of tuples
• commit() – in insert , update and delete( DML commands)
• conobj.commit()
• rowcount- total records fetched by cursor object
• connect(host=’localhost’,user=’root’,passwd=’tiger’,database=’hello’) database is optional
• cursor is used to execute the query and retrieve the records and store it on temporary basis

• Do not forget to put semicolon at the end of each SQL Query.


• While giving outputs, do write the column headers mentioned in SELECT command
• Do not get confuse between substr and instr. Substr gives substring and instr gives position
of the first occurrence of the substring.
• While giving length of string, do count all the spaces leading,trailing and middle as space is
also counted as character
• Do not forget to put character and date values in quotes.
• Both quotes are acceptable. ‘’ and “ “
• Do remember the syntax of SELECT command
• SELECT colnames FROM tablename WHERE condition Order by colname asc/desc
• SELECT colnames FROM tablename WHERE condition GROUP BY colname
• SELECT colnames FROM tablename WHERE condition GROUP BY colname ORDER BY
colname
• SELECT colnames FROM tablename WHERE condition GROUP BY colname HAVING condition
• SELECT colnames FROM tablename WHERE condition GROUP BY colname HAVING condition
• ORDER BY colname
• For multiple ordering
• SELECT colnames FROM tablename WHERE condition Order by colname1 asc/desc,colname2
asc/desc;
• Date format is ‘YYYY-MM-DD’ or ‘YYYY/MM/DD’
• 0 means value and NULL means no value
• Is null and is not null used to check for blank entries or any value respectively
• Now() and curdate() does not accept any parameters, rest all methods do accept one or two
parameters.
• Single row gives single output for single row and multiple rows gives single output for
multiple rows
• Where clause can contain single row methods not multiple row
• Where clause can be used by group by but not after it
• Having clause can be used after group by but not before it.
• Having can contain only the column given in group by or any aggregate method
• Count(*) gives total rows including null values but count(col) gives only non-null values
• Year(), month(), day() gives integer value
• Like year(dob)=2002 and dob is character value
• Identification of group by clause: - as per , according to , wise, by each
• Increase and decrease any value- use update command
• Only display in calculation not permanent change- select expression as ‘alias’
• DDL commands: create table, create database, drop, alter table
• DML- insert into, update, delete,select

Difference between

1. Update and Alter table

2. DDL and DML commands

3. SQL and MYSQL

4. Degree and cardinality

5. Primary and unique (similarly and difference)

6. Candidate and alternate key

7. Use of foreign key

8. Delete and Drop command

9. Order by and group by clause

10. Where and having Clause

Name the methods/keywords:

1. Which checks for any numeric range:between and not between

2. Checks for any specified values or list of values :in and not in

3. Used for pattern matching :Like and not like

4. Used for checking null values :is null

5. For non null values : is not null

6. For displaying unique values in a column: Distinct

Name the commands:

1. To make database active or open: use databasename

2. to see the structure of a table :desc tablename


Or

Describe tablename

3. To modify the records :update

4. To add col and remove col, add primary key, change data type, rename colname:

Alter table

5. To remove records :Delete command , DML comamnd

6. To remove table or database:Drop database databasename , a DDL command

Drop table tablename

Name the clause

1. To mention the table :From

2. To put conditions on individual rows:Where

3. To arrange or order the values in a column:Order by colname asc

Order by colname desc,Order by colname

(Default order is asc)

For multiple columns ordering

Order by name asc, fees desc

4. To group the rows based on identical values in a column :Group by colname

5. To specify condition on grouped rows:Having

FOR IP only
USE OF POW()

Pow(base, exponent)
We can use pow or power ()
SELECT POW(5, 2);
Result:
25

SELECT POW(-5, 2);


Result:
25
However, if you raise a negative number to the power of an odd number, the result is negative:

SELECT POW(-5, 3);


Result
-125

POW(5, -2)
0.04
POW(5, -3);
Result:
0.008

SELECT
POW(-5, -2)
0.04

POW(-5, -3);
Result:
-0.008

USE OF MOD()
MOD(11,2)- 1 ( remainder)
MOD(-11,2)
-1

USE OF ROUND()
Round(45677.344)- whole integer- 45677
Round(45677.674,0)- whole integer- 45678
Round(45677.344,1)- 45677.3
Round(45677.674,2)- 45677.67
Round(45677.677,2)- 45677.68
Round(45677.677,3)- 45677.677
Round(45677.677,4)- 45677.677
Round(45677.677,-1)- 45680
Round(45677.677,-2)- 45700
Round(45643.677,-2)- 45600
Round(45643.677,-4)-50000
Round(45643.677,-5)-0
Round(45643.677,-6)-0
Round(55643.677,-5)-100000

Networking:

Server is to be made where the number of computers is maximum, make star topology and keep
server in center.

Use of network devices:

Modem- Analog to digital and digital to analog, connect computers via Telephone lines

Hub- Connect computers and broadcast , does not filter, cheaper, share bandwidth

Switch- intelligent hub, filter and retransmits the corrupted signals, dedicated bandwidth, unicast
and sends only to intended node, different LAN segments of a large network

Router- connects LANs and to Internet, routes the same network to multiple devices, operates on IP
address

Bridge:- Connect similar LANS and segments of LANS , works on MAC address with filtering
Gateway- Acts as an Entry and Exit point to one network , connects dissimilar LANs, Eg. ISP

Repeater- Regenerates, Amplify, boost weak signals, above 70 m

LAN to Internet: Gateway/ Router

Type of network:

Within building and up to few meters or 3 KM, suggest LAN

Within city or different branches of city- MAN

Across city , countries- WAN

Transmission Media

Wired: Ethernet, Coaxial , Optical Fiber

Economic and high speed- Coaxial

Best, Effective,Faster,High Speed-Optical Fiber

Wireless

Radio waves, Microwave, Satellite

Radio waves- Hilly area , omnidirectional and Economic

Microwave-Direct line of path, no obstacles, plain areas, across city

Satellite- faster, Effective, Countries

Placement:

Repeater- above 70 m , if two net

Hub/switch- within each building to connect all the computers or devices within a network

Modem/Antivirus/Firewall- Server

Internet availability- Broadband connection, if connection via telephones lines/dial up, suggest
modem also

Plugins/Addons

Plugins- Needs to be installed like Flash Player

Addons- Extensions or tools to enhance the functionality of browser like pdf to doc

Examples:

Web browser: Google Chrome, Mozilla Firefox

Web Server- Apache( Free and Open source), IIS ( Internet Information Server, Proprietary by
Microsoft)

Web hosting services:- Godaddy.com, Amazon Web Services

URL: Always starts with a protocol

Parts of URL:
Protocol, name of the website, domain names, address of web page

https://www.cbse.nic.in/aboutus.php

Website: www.cbse.nic.in

Domain name: cbse.nic.in

Cbse- Name of the website

Top level- in

Sub domain nic

Protocols used:

To transfer data on WEB- HTTP/HTTPS

Downloading and uploading files- FTP

Sending Mails: SMTP

Receiving and Storing Mails:- POP/POP3

Remote Login: TELNET

Chat: IRC and VoIP

TCP/IP: language of INTERNET , used by each device on network or Internet

TCP- Breaks the message into smaller data packets and arranges/rearranges at sender or receiver
end

IP- Transmits the data packets from sender to receiver based on IP address mentioned on Data
packets

Video Conferencing: IRC, VoIP, SIP

Video conferencing Softwares/ VoIP softwares:

WhatsApp, Messenger, google Meet, Zoom, Skype etc.

Antivirus: QuickHeal, Norton

MAC address- Period after every two digits: - 00.00.0A.BB.28.FC, 6 bytes, physical, static, can’t be
changed

IP address- 4 bytes, 192.168.1.1, 0 to 255 , dynamic, can be changed by ISP or Administrator

FULL FORMS

• ARPANET: Advanced Research Projects Agency NETwork


• NSFnet: National Science Foundation network
• Internet: Inter networking
• TCP/IP: Transmission Control Protocol / Internet Protocol
• NIU: Network Interface Unit
• TAP: Terminal Access Point
• NIC: Network Interface Card
• MAC Address: Media Access Control Address
• bps: bits per second
• Bps: Bytes per second
• kbps: kilo bits per second
• Kbps: Kilo bytes per second
• mbps: mega bits per second
• Mbps: mega bytes per second
• kHz: kilohertz
• MHz: megahertz
• GHz: gigahertz
• THz: terahertz
• LAN: Local Area Network
• UTP: Unshielded Twisted Pair Cable
• CAT1: Category 1 UTP cable (same acronym for other CATs)
• STP: Shielded Twisted Pair Cable
• LEDs: Light Emitting Diodes
• PDAs: Personal Digital Assistants / Personal Data Assistant
• WAN: Wide Area Network
• MAN: Metropolitan Area Network
• PAN: Personal Area Network
• P-P link: Point to Point Link
• Modem: Modulator – Demodulator
• RJ-45: Registered Jack-45
RJ-11: Registered Jack-11
• ISP: Internet Service Provider
• IP address: Internet Protocol Address
• HTTP: Hypertext Transfer Protocol
• WWW: World Wide Web
• URI: Uniform Resource Identifier
• URL: Uniform Resource Locator
• URN: Uniform Resource Name
• FTP: File Transfer Protocol
• SLIP: Serial Line Internet Protocol
• PPP: Point to Point Protocols
• GUI: Graphical User Interface
• GSM: Global System for Mobile communications
• SIM: Subscriber Identification Module / Subscriber Identity Module
• GPRS: General Packet Radio Service
• SMS: Short Message Service
• IRC: Internet Relay Chat
• SIP: Session Initiation Protocol
• VoIP: Voice over Internet Protocol
• Wi-Fi: Wireless Fidelity
• Telnet: Teletype Network
• HTML: Hypertext Markup Language
• DNS: Domain Name System
• POP: Post Office Protocol
• XML: eXtensible Markup Language
• DHTML: Dynamic HTML
• E-mail: Electronic Mail
• Cc: Carbon Copy
• Bcc: Blind Carbon Copy
• IIS: Internet Information Services
• FSF: Free Software Foundation
• W3C: World Wide Web Consortium
• OSS: Open Source Software
• HTTP: HyperText Transfer Protocol
• HTTPS: HyperText Transfer Protocol Secure
• SMTP : Simple Mail Transfer Protocol
• MAC- Media Access Control

You might also like