Computer Science XII
Computer Science XII
Computer Science XII
GRADE XII
Dipak Pudasaini
Him Koirala
Manoi Kumar Karn
Ramesh Rimal
-----<
5 Object-oriented 5.1 Programming paradigms: procedural, structural and object oriented 10
Programming 5.2 Features of OOP: Class, Object, Polymorphism and Inheritance
(OOP) 5.3 Advantages of COP
5.4 Application of OOP
Total 80
CHAPTER 1 2.10 Some Basic Terms and Tools 56
2.11 Network Tool: Packet Tracer, Remote
DATABASE MANAGEMENT Login 59
SYSTEM (DBMS) 2.12 Network Connecting Devices 61
1.1 Introduction: Data, Information, Database
2.13 Network Topologies 62
and DBMS 2
2.14 Basic Concept OSI Reference Model 65
1.2 Field, Record, Objects, Primary Key,
Alternate key, Candidate key 3 2.15 Internet Protocol Addressing 66
1.3 Advantages and Disadvantages of DBMS 4 Keywords 68
1.4 DDL (Data Definition Language) and DML Exercise 69
(Data Manipulation Language) 6 Case Study 71
1.5 Database Model: Network Model,
Hierarchical Model, Relational database
CHAPTER 3
Model 7
1.6 Concept of Normalization: 1 NF, 2NF, 3NF 10 WEB TECHNOLOGY II
1.7 Centralized Vs. Distributed Database 14 3.1 Introduction 73
1.8 Data Security 16 3.2 Server Side and Client Side Scripting 73
Keywords 35 3.3 Introduction of Internet Technology 74
Exercise 36 3.4 Adding java Script to HTML Page 76
Case Study 37 3.5 java Script Fundamental 77
3.6 java Script Data Types 79
CHAPTER 2 3.7 Variables and Operators 80
2.2 Concepts of Communication System 42 3.11 Form Validation and jQuery 102
2.3 Block Diagram of Communication System/ 3.12 Server Side Scripting using PHP 106
Model 43 3.13 Introduction to PHP: Hardware and
2.4 Elements of Data Communication/ Software Requirements 106
Transmission 43 3.14 Object oriented programming with server
2.5 Simplex, Half Duplex and Full Duplex side scripting 108
Communication Mode 44 3.15 Basic PHP syntax 109
2.6 Concept of LAN and WAN 45 3.16PHPdatatypes 110
2.7 Transmission Media 48 3.17 Basic Programming in PHP 113
2.8 Transmission Impairments Terminology 52 3.18 Operators (Arithmetic, logical, comparison,
2.9 Basic Concepts of Network Architecture 54 operator precedence) 118
3.19 Variables Manipulation 121 Exercise 211
3.20 Database Connectivity 122 Lab Work 2: Structure and Union 212
3.21 Connecting server side script to Case Study 212
database 123
4.4 Pointers 213
3.22 Making SQL queries 125
4.4.1 Definitionofpointer 213
3.23 Fetching data sets getting data about 4.4.2 The Address (&) and Indirection
data 128 (*) Operator 213
3.24 Creating SQL database with server side 4.4.3 Pointer Expression and
scripting 129 Assignment 214
3.25 Displaying queries in tables 131
4.4.4 Call by values and call by
Keywords 133 reference 218
Exercise 134 Keywords 220
Case Study (Project work) 136 Exercise 220
Lab Works 3: Pointer 221
Case Study 221
CHAPTER 4 4.5 Working with Files 222
PROGRAMMING CONCEPT 4.5.1 Concept of Data Files 222
4.1 Review of C programming concept 139 4.5.2 Sequential and Random
Access File 222
4.2 Functions 171
4.5.3 File manipulation function: putw,
4.2.1 Concept of library and user defined
getw, putc, getc, fscanf, printf 223
functions and advantages 171
4.5.4 Opening, reading, writing and
4.2.2 Accessing a Function by passing
appending on /from data File 229
values 182
Keywords 234
4.2.3 Concept of Storage: automatic and
external 184 Exercise 235
4.2.4 Concept of Recursion: factorial and Lab Works 4: Working with Files 237
Fibonacci problems 187 Case Study 237
Keywords 193
Exercise 194 CHAPTER 5
Case study 195
OBJECT ORIENTED
4.3 Structures and Union 196
PROGRAMMING (OOP)
4.3.1 Structure: Definition, Declaration,
5.1 Programming paradigms: procedural,
Initialization and Size of Structure 196
structural and object oriented 240
4.3.2 Accessing member of structure 198
5.2 Feature of OOP: Class, Object,
4.3.3 Array of structure 201 Polymorphism and Inheritance 242
4.3.4 Union: Definition, Declaration 203 5.3 Advantages of OOP 247
4.3.5 Differences between structure and 5.4 Application of OOP 247
union 204
Keywords 248
Workout Examples 206
Exercise 249
Keywords 211
Case Study 250
CHAPTER 6 CHAPTER 7
Height of students
I I
1 Rubina 5.4
2 I Rasbina 5.6
3 Rahul 5.8
POINTS TO REMEMBER
I
DBMS is defined as the collection of interrelated data and set of programs to
access those data. The collection of data is usually database which contains the
information about any particular organization and set of programs is special
type language to manage those database.
The primary goal of a DBMS is to provide an efficient and effective environment for both
data retrieval and storing data in database. Commercially database management system
is called database packages or also called database engine. Some examples are FoxPro,
DBase, Sybase, MS Access, My SQL, MS SQL Server, Oracle and DB2 etc.
The above figure shows the logical structure of database management system. Users may
be persons or application from external environment that supplies various requests to the
system. Database requests mean the various activities from users. The database system
checks for the requests and performs various activities as per the need of users. Some
major database activities are:
• Adding new file to the database
• Inserting data into the database file
• Retrieving/Viewing data from the database
• Updating data in existing database file
• Deleting data from the database file
• Removing files from the database
POINTS TO REMEMBER
Assignment 1
1. Define database.
2. Compare data and database.
Height of students
SN Height (Feet, Inch)
1 Rubina 5.4
2 I Rasbina I 5.6
3 Rahul 5.8
Primary Key: The field or fields that contain the unique value can be set as primary key.
It does not permit duplicate or null values. For example, the registration number of a
student is a primary key.
Table: Student
Primary key Reg_Number Name
1001 Hari
1002 Sita
1003 Ram
Candidate Key: Occasionally we may encounter a relation in which there is more than
one attributes possessing the unique identification property. So, all attribute combinations
inside a relation that can provide the unique record in a relation are called candidate keys.
Disadvantages
• Expensive: Database software is very expensive for large computer systems. It also
requires overhead costs for maintaining and integrity functions.
• Changing technology: It is fast changing technology.
• Needs Technical Training: It is complex to understand and implement. So, proper
training is required for staff to work properly in the database system.
• Backup is needed: It needs to explicit back up. This adds costs as new storage space
are needed to hold the data
POINTS TO REMEMBER
I A DBMS is a set ofprograms that manages the database files. It allows accessing the
files, updating the records and retrieving data as requested.
Assignment 2
1. Describe primary key, alternate key and candidate key with
examples.
2. Write advantage of DBMS.
SQL (Structured Query Language) Pronounced as "See" -"Quell" is made of three sub
languages DDL, DML and DCL.
Basic Structure of SQL
To create a table
CREATE table table_name (fieldl data_type, field2 data_type, .............);
For example:
CREATE table Student (Sid NUMBER (4), Name CHAR (25));
To insert records into a table Student
INSERT into table name
VALUES (List of values);
For example: INSERT into Student
VALUES (22, 'Ram');
To display records from a table
SELECT fieldl, field2 ...
FROM tables name
For example: SELECT Sid, Name form Student
1 DDL (Data Definition Language): DDL is used by the database designers and
programmers to specify the content and structure of the table. It is used to define
the physical characteristics of records. It includes commands that manipulate the
structure of objects such as Views, Tables, and Indexes etc. Examples of these
Commands are Create, Alter, Drop, Rename etc.
To create a table
CREATE table table_name (fieldl data_type, field2 data_type, .............);
POINTS TO REMEMBER
I
DDL is used to define the physical characteristics of records. DML is related
with manipulation of records such as retrieval, sorting, display and deletion of
records or data.
Advantages
• It is the easiest model.
• It has one or more attributes.
• The searching is fast and easy, if parent is known.
• It supports one-to-one and one-to-many relationship.
Disadvantages
• It is old fashioned, outdated database model.
• It does not support many-to-many relationship.
• The dependency on parent node is not beneficial always.
• It increases redundancy because same data is to be repeated in different places.
Records (Principal)
Employee Records
(Employee)
Records (Principal)
Advantages
• It accepts many-to-many relationship, so it is more flexible.
• The searching is faster because of multidirectional pointers.
• The network model is simple and easy to design.
• It reduces redundancy because data shouldn't be repeated if same data is needed.
Disadvantages
• It is difficult to handle the relationship in complex programs.
• There is less security because of sharing data.
• It increases the processing overhead due to the complex relationship.
POINTS TO REMEMBER
I The database system which stores and displays data in tabular format ofrows and columns,
like spreadsheet, is known as Relational Database Management System (RDBMS ).
Table: Student
Roll Name
1 Hari 1 80 90 95
2 Sita 2 90 80 85
3 Ram 3 95 95 95
For example, if we make relation between Student and Subject, we can get following:
'I • I English Ill I
1 Hari 80 90 95
2 Sita 90 80 85
3 Ram 95 95 95
Advantages
• The breaking of complex database table into simple database table becomes possible.
• Database processing is faster than other model.
• There is very less redundancy (repetition of data).
• The integrity rules can easily be implemented.
Disadvantages
• It is more complex than other models.
• There are too many rules because of complex relationships.
• It needs more powerful computers and data storage devices.
Assignment 5
1. Compare between Network database model and Relational database
model with diagram.
Types of Normalization
Normalization can be a complex process with many rules in many layers. There are five
levels of normalization process as shown in figure 2.7. But we discuss only three normal
forms.
lNF
• First Normal Form (lNF) 2NF
• Second Normal Form (2NF) 3NF
4NF
• Third Normal Form (3NF) SNF
Benefits of Normalization
• The dependency between the data fields is identified.
• The redundancy in database is minimized.
• Data model is made more flexible and easier to maintain.
• It improves faster sorting and index creation.
• It improves the performance of the database system.
• It simplifies the structures of tables.
• It avoids the loss of information.
Assignment 6
member_
member_id book_code book_name issue_date return_date
name
R01 Rabi 5002 DBMS 15/01/2006 25/01/2006
Note: The relation stores the information about the issue and return of a book in a Library
to its member. A member can issue many books. A book cannot be issued again unless it
is returned. The null value in return_date is considered as the book has not returned yet.
I
member_id member_fname I member_lname Ibook_code I book_name I issue_date I return_date
R01 Rabi Rai 5002 DBMS 15/01/2006 25/01/2006
A02 Alok Karn 5005 C Programming 17/01/2006 24/01/2006
R01 Rabi Rai 5007 Network 25/01/2006 NULL
A02 Alok Karn 5002 DBMS 27/01/2006 NULL
member fname
member_id
member_!name
book code
book_name
( issue_date return_date
Figure 1.5:
According to the above functional dependency, the following relations are created.
MEMBER (member_id, member_fname, member_lname) (From FD 1)
BOOK (book_code, book_name) (From FD 2)
ISSUE (book_code, member_id, issue_date, return_date) (From FD 3)
Book
book_code book_name
R01 Rabi Rai 5002 DBMS
5007 Network
ISSUE
member_id book_code issue_date return_date
R01 5002 15/01/2006 25/01/2006
A02 5005 17/01/2006 24/01/2006
R01 5007 25/01/2006 NULL
A02 5002 27/01/2006 NULL
Tablet: Student
Sid Name Cld
A1 Aayushi Sll S11 11
A2 Alok S12 S12 12
Table 4: Student_Detail
. II' I , "
A1 Aayushi Computer
A2 Alok Maths
1. •
Write example of normalization process.
Distributed Database
Distributed database is a complex type of database system. It is a collection of multiple
logically interrelated databases which are distributed in many geographical locations.
Data communication is difficult because they should communicate through different
system to different platforms. The problem is security control. It also needs more computer
resources. It is much suitable for such types of organizations, which are distributed all
over the geographical area with similar objectives and similar data sets. In other words, it
is the collection of different centralized database systems in different locations.
Centralized database system is simple type. Distributed Database System is complex type.
They are located in many geographical
They are located on particular location.
locations.
It consists of only one server. It contains servers in several locations.
It is only suitable for small organization and
It is suitable for large organizations.
small-scale operation.
There is less chance of data lost. More chances of data hacking, theft and lost.
Cost of centralized database system is low. Cost of distributed database system is high.
Assignment 8
1. Lists advantage and disadvantages of centralized and distributed
database system.
• Usingproper backup in disks, tapes, CD etc. provides the security of data from the
accidental loss.
• Making physical prevention by using stabilizer and UPS to supply a regular power
through which we can prevent hardware and software from high electricity voltage
and irregular power supply.
1. Authentication
2. Access control
3. Flow control
4. Database Security applying Statistical Method
5. Encryption
6. Backup and recovery
1. Authentication:
Authentication is the process of confirmation that whether the user log in only according
to the rights provided to him to perform the activities of data base. A particular user can
2. Access Control:
The security mechanism of DBMS must include some provisions for restricting access to
the data base by unauthorized users. Access control is done by creating user accounts and
to control login process by the DBMS. So, that database access of sensitive data is possible
only to those people (database users) who are allowed to access such data and to restrict
access to unauthorized persons.
The database system must also keep the track of all operations performed by certain user
throughout the entire login time.
3. Flow Control:
This prevents information from flowing in a way that it reaches unauthorized users.
Channels are the pathways for information to flow implicitly in ways that violate the
privacy policy of a company are called covert channels.
This allows to access the database to get statistical information about the number of
employees in the company but not to access the detailed confidential/ personal information
about specific individual employee.
5. Encryption:
This method is mainly used to protect sensitive data (such as credit card numbers,
OTP numbers) and other sensitive numbers. The data is encoded using some encoding
algorithms.
An unauthorized user who tries to access this encoded data will face difficulty in decoding
it, but authorized users are given decoding keys to decode data.
A data backup entails making a copy of your data and storing it on a separate system or
medium such as a tape, disk, or in the cloud. You can then recover lost data by using your
backup.
You can download using Pen drive or CD or Internet. If you want to download from
internet you have to use following steps:
Google X • o_
"' - 1·
...
-~
MySQL Installer Developer Zone
OOwnl»::(frii'S'II--- ....,_._"'~ ..........
~-&.O . Zl . O.rnol).ld!X!
~ ,.,.-"::l....,_..,... .......-..o.
MySQL MYSQLCOM ~ DOCUMENTATfON
MvSQLEnte~riseEdition ···········~~~~~-·
Contact Sales
:; 0 ::1
Cl P!l CJ •D ae,M
.MySQLclust... Mi~
.l't.ls,~ ln MySQ!.EnlerprtseEdiiiOn
MySQl.Cornmun~ty(GPl)Do..nk>ads•
;: 0 ~ ' ~ -
.MySQLYumReposltory • CAPI(Iibmysqlcllent)
.MySQL APTReposltory
• MySQLSUSERepository .connector/]
:: 0 ~ ) -
STEP 5: After performing above operation on MySQL Installer for windows from
MySQL, click on second option Windows (x86, 32-bit), MSI Installers:
~~ngSyUfln:
IMicrosol't'Nindows
:: 0 ~ 3 -
........ ~====~1 ~
STEP 8: After downloading a file, it shows as follows and then choose Custom:
STEP 9: After choosing Custom, click on first file of MySQL Server 8.0.21 and use
arrow (===>).Similarly, first file of MySQL Workbench 8.0.21 and MySQL Shel18.0.21.
Now, after selection of first file of each, click on Next.
lnstaU.uon
. ...
STEP 11: When downloads is completed or after installation it shows as follows:
, ;
-- --
STEP12: Clicking Next, MySQL asks for product configuration that is for configuration
of MySQL Server 8.0.21 as follows and again press Next:
STEP 13: MySQL asks for High Availability, simply click on Next:
STEP 15: Then Type and Networking page appears which shows ports and
connectivity, simply, click on Next.
STEP 16: Now, after that Accounts and Roles page appears in which asks to enter
MySQL Reset Password and Repeat Password. After entering password, click on
Next. Remember this password is used when you want to open MySQL using root
login.
STEP 18: Now Apply Configuration windows opens, simply click on Execute button.
STEP 20: After MySQL installation, installation complete screen appears as follows
and again click on Finish button.
After installation of MySQL, now you are going to learn how to create database and
table. And, then uses of create, drop, alter DDL SQL statement.
Browse DoaJmentation > Read the Blog > Disruss on the Forums >
~~~~~~~================3' ~·~bft~
O:md:lnNtfw:lll l suadn(TCPft') ..,, ...._. . . . .COI'NICt .... JI:DM
~· A6wad
;, - ""Jw""'.o.~""""•-----,l ""' l"" I;';';!..-"'"-,_....,
li _ ,~c:...._ _ _ _ _ _ _ _ __, "-ofhwwiDoornect•
i
~ ---· ·
STEP 6: Now home page should be as follows:
-
Now try to observe differences between previous and current home
page.
---
......,_
... -~-
~~.~~~~~------~~====~----------------~====5· :~~
.
MySQL Connections 0<51
LocalinstanceMySQl80 Mydatabase
., ··~S......
~-. · -~---~~
• MySO..Wort"""'h
.
. . . . ..
II S<o~
, .,._,,
.. ,SO'o,.<._.,
(
..,
o ............
4rl ....... _.. ••.,.....
1/' ............. ,..... $«. .
""""'
Remember: To close SQL Additions, use last right upper corner box, which is shown red
in the above picture and then screen appears as below:
® [] ..[]
0s<....,•SIO!u<
2.CtiontCoMUiiont
.l.uw< and.._I'C,
liliJ Statu<"""~" '"V<>r,.bl<<
.!;ootobpo<l
,!.o.taU•po<IJilonor<
IHS'TANCf0
0 Startup /Sto.,.d_,
"'""'"""'
/" Optlon<f~<
0Do>hb<Wd
I!J P<rfor"'""""'"""'
~ ......,....,,,s.o.emosttup
Before to create database, firstly, you have to know data types which are as follows:
Data type
A data type specifies a particular type of data, such as integer, floating-point, Boolean etc.
A data type also specifies the possible values for that type, the operations that can be
performed on that type and the way the values of that type are stored.
INSTANC£"
0 Startup / Shutdown
A"""-"'"
; Optionsfilt
Coas hboard
drJ P.rfonnanctRtporu
Goo PtrfonnllnttSthtmaSttup
AdminiStroltion Sd'lemu
lnformlltion
No object seected
® I []~[]
0StrHtSiatus
J. OlcntConntdlont
.l.usmandPrl¥iltgts
IIIStltus andSysltmVIriablts
Q O•laExport
~ Oltatmport/Rtstort
INSTANCE a
0 StartupfShutdown
.6,StrHtlogs
;optlonsfilt
Ooashboard
~ PtrformanctRtports
t'-Ptrforman<tSd'ltrMSttup
No object selected
Method II:
The CREATE DATABASE statement is used to create a new database in SQL.
Syntax:
create database 'database name';
Example:
create database 'gamel' ;
• You use database name within single quote like 'gamel' and it must be followed by;
(semicolon).
• You can see action output looking down which displays two types of color symbols:
green and red. Green color symbol for successful and red color symbol for error .
•
·-· Mysa.W~h
® 11]\;;I[J
Q.
·~~==:::J
~cbjects
·
I
•
1
H I ¥~ P-o 11i 1e OIIJ I !Onttolcm .....
~r10ate .._hbau ·a...,1' 1
· 1 ~ 1 ::'!1! ~I))~
.. IJ co!lege
~ II compote<
• 1!1 9-
.. .
.. .
··-
'i!Tobla
'i!llStoredProced .....
'IIIFvnct!ons
g .... u
. <hool
.. lll sct.ooli
• II ~
0 313;00;$1 """"cfton9ootood>ool
0 413:01:30 CREATESCHEMA'ochooll'
ObjectWo
==
Session
0
0
0
0
5 13:0b45 CREATESCHENA'oct.oc11'
613:021/CREATESCHENA'~·
71l:22:27CREATE-·~·
113:23:16 autedal.,_"g.omel'
o ' ~ m ._ '
1-to)ollec:ted
1 -tl)aflec:tOid
1 --)a'lected
~!I .. ~
I
- ~---
Syntax:
CREATE TABLE table_name (
columnl datatype,
column2 datatype,
column3 datatype,
);
where, columnl, columnl, column3 ..... are columns of the table and data types are int, varchar,
decimal, time, date.
Example,
CREATE TABLE student (
roll int,
first_name varchar(20),
®[]~
I~
.. , ..- 1
·,1gl'!.·~B:1·=~~N~~ ~-·~-
4 lut_n_ ~ot'Cha<(M) ,
lll~t<>«<~"""o<l-
"-
• l •<t>od
~ I •ct>ooU
··~
Ol>fed.Wo Soslion
I I PTypeheretoo;eafch
Syntax:
DROP DATABASE 'database name';
Example,
DROP DATABASE 'gamel';
.
,. .,.._.
MySQI.WO<tbtt><h
® [] ..[]
• I~
-~--
~==::J
.. I ~ 9 ~~.~.?-.~~·~ 0 ~ tn11o iCOl_, • ~ ,.r 0. !I)~
• Iii co~
• !J coft!P""'
·-..
.. . g"7ableo
.. ....·-
• l o-1
fl! 9:ottdl'r<><t<lut ..
""'
,.
-"-- -
"-'-
~1l:OUOCREATISOI~·-··
0
a
51l.OUSCRE.\TtSOIEM.\ "od•>oU
61l.02:27CREATISOIEM.\ "_ .
?1322.V CREATE-·-·
8 13:23:1 6 . , . . . - · -·· I
Syntax:
DROP TABLE table_name;
Example,
DROP TABLE student;
® []""[I
,·~
...~-.:::==::j.. j a.. ~ ~ ~...~ <~~ 0 0 ~ linloolCOO- • ~ 4 ~ ~
~ II <Ohgc
. ...,._,__
~ • ··
··-
·-
··-
·-odPfo<odur..
··-
~ :J od>ooiL
0 1 01.12.4') . . . . , , _ _ .
Cl 2011•0!1 ..... . - -
--
I I PTypeheretOseillch
ALTER statement
The ALTER TABLE statement is used to add, delete, modify or change data types of
columns in an existing table.
The ALTER TABLE statement is used to add a column to an existing table from SQL
database.
Syntax:
ALTER TABLE table_name
ADD column_name datatype;
Example,
ALTER TABLE student
ADD DateOfBirth date;
"'
....
&I Q I ¥ ~i\0 1 &1 1 00~ 1 u.ctol!Dhows · I ~ I ~~(J)@]
0 []""[]
~ !'I g ....
. . .. ,_
~ II <OIIIPiillet
., __
... 8 ...- 1
.,_ ~ ··tud...t
.storedPro<edurn
~ ~~ ·
~ lil •dlooll
~ II ,,,
Ob)e<l;ltlfo Sesslct1
The ALTER TABLE statement is used to delete a column to an existing table from
SQL database.
Syntax:
ALTER TABLE table_name
DROP COLUMN column_name;
Example,
ALTER TABLE student
. . _,
DROP COLUMN age;
MySO._WO<tbotw:h
~;;,::::===::::]
"' • s t ~A o ti e O fl! l ~..atoum"""' • ~ .. Gl. Ill @I
<l ~cb)Kio I 1 0 clr-optoblestude<otJ
~ II «>~<v•
..._
~ II «>OIPIIII«
~ " g-
... 11 'l!rll>l
..-· ..
·-·
li!JstoredPro<ed"OJ
~~ ·II ·
~ II odlooll
'''
-, __
0
o
1 011:1U9 - - - ·
2011:1"-m•--
0--
S...Coo:lo : 1C£1 . Y""_""'_~,...SOI..,.._ : _Iho_Ol\ol_...IO ". O.OlS-
The ALTER TABLE statement is used to modify or edit a column data type to an
existing table from SQL database.
. MySQI.Workbmth
A ~·"
® 1]1;;1[1
· ~IFtlw~_,~.==:::JI 1 •
• lil collegt
l> lil corrc>l,(er
I> fill
g.,...
• ll oamc:t
• •robles
• • student
ljlpv;.-
IJ!Stor~Proced .....
• "-tions
... . . dloal
. . .. .,.
~> ll sdlool!
ObjKIWo S..Sslon
OwryCompldod
• P Typeheretosearch
'""
Syntax:
INSERT INTO table_name (columnl, column2, column3, ... ) VALUES (valuel, value2,
value3, ...);
where, columnl, column2, coumn3 ...... are fields and valul,value2,value3 ...... are string, number
or date/time.
Example,
INSERT INTO student (roll, first_name, last_name, DateOfBirth) VALUES (1, 'Aayushi',
'Karn',2010);
Notice the WHERE clause in the DELETE syntax: The WHERE clause specifies which
record or records that should be deleted. If you omit the WHERE clause, all records will
be deleted!
I
8. The UPDATE SQL clause can _ _ _ __
a) update only one row at a time
b) update more than one row at a time
c) delete more than one row at a time
d) delete only one row at a time
Ans: 1{a) 2{b) 3{b) 4{b) 5{b) 6{a) 7{c) B{b) 9{c) 10{a)
CASE STUDY
Make a report that should consists of all DDL and DML commands along with function,
syntax and example.
Communication and networking are changing the way of our life, businesses and services.
Communication refers to the exchange of information between sender and receiver with
the help of electronic means of communication. The electronic means of communication
may be wires, radio or satellite. The communication can be local or remote. The local
communication occurs face to face whereas the remote communication occurs over
distance.
POINTS TO REMEMBER
I
Communication is defined as the exchange of electronic form of
information between sender and receiver devices with the help of means
of communication
Rule 1 Rule 1
Rule 2 Rule 2
RuleN RuleN
A communication system has five major basic components/ elements: message, sender,
receiver, transmission medium and protocol as shown in the figure below:
Message: The message is data or information to be communicated and it is in the form of
text, number, picture, audio and video.
Sender: The sender device sends the messages to the receiver and it can be computer,
workstation or any networking devices.
Receiver: The receiver device receives the messages from the medium and it can be
computer, workstation or any networking devices.
Transmission Medium: The transmission medium is physical connection in which a
message can travel from sender to receiver and vice versa. The medium can be wired or
wireless.
I
Computer network is defined as the interconnection of two or more
computers or networking devices with the help of transmission media and
set of protocols