CIS 2750 Final Exam With
Complete Solution
Protocol Stack - ANSWER Lowest Levels - Communicate bytes/packets
between computers
Higher Levels - Fault Tolerance
Highest Levels - Application Specific
Internet Protocol (IP) - ANSWER Relays datagrams across networks
Routing functionality
Basis of The Internet
Transmission Control Protocol (TCP) - ANSWER Adds reliability, ordering,
and error checking
User Datagram Protocol (UDP) - ANSWER Doesn't include the reliability,
Faster, Used on gaming
Early Applications of HTTP - ANSWER Military Communications, Personal
Communications (E-mail, Net-news, Bulleting boards, Early social media,
Early hypertext: archie, veronica, gopher)
What does HTTP stand for? - ANSWER Hypertext transmission protocol
What does SQL stand for? - ANSWER Structured Query Language
Pros of Standards - ANSWER Reduce training costs,
Promotes application portability, Promotes application longevity,
,Intersystem communications (Different management systems function well
on a single database if they support the same interface), Customer Choice
(Customers choose an interface to meet their needs)
Cons of Standards - ANSWER Reduce creativity, Flaws in the design of SQL
What is SQL used for? - ANSWER Used to define, manipulate, and control
data in relational databases
Relative Database - ANSWER A database that is perceived as a collection of
tables by the user.
Table - ANSWER An unordered collection of rows
How can SQL statements be invoked? - ANSWER Can be invoked interactively
or from within an application
SELECT - ANSWER Used for data retrieval
Syntax of Complete Call:
SELECT S.CITY
FROM S
WHERE S.SNO = 'S4'
FROM - ANSWER Indicates the table to retrieve from
WHERE - ANSWER Used to describe column features that are desired in
retrieved data
Can use all comparisons
Strings must be in single quotes
,What happens if there is no WHERE? - ANSWER Returns all of the rows
CREATE TABLE - ANSWER Constructs an empty table
Must provide a table name and unique column names
Syntax of Complete Call:
CREATE TABLE S ( SNO CHAR(5),SNAME CHAR(20),STATUS DECIMAL(3),CITY
CHAR(15),PRIMARY KEY (SNO) )
Primary Keys - ANSWER Columns described as primary key cannot have two
columns with the same column value
Composite Key - ANSWER Primary key consisting of more than one column
(values unique in combination)
Foreign Key - ANSWER A primary key of one table that appears an attribute
in another table and acts to provide a logical relationship among the two
tables
INSERT - ANSWER Adds a new row
Syntax:
INSERT
, INTO SP ( SNO, PNO, QTY)
VALUES ( 'S4', 'P1', 1000)
UPDATE - ANSWER Change values in existing records
Syntax of Complete Call:
UPDATE S
SET STATUS = 2 * S.STATUS
WHERE S.CITY = 'London'
DELETE - ANSWER Remove row(s)
Syntax of Complete Call:
DELETE
FROM P
WHERE P.WEIGHT > 15
DISTINCT - ANSWER No duplicate rows
Complete Solution
Protocol Stack - ANSWER Lowest Levels - Communicate bytes/packets
between computers
Higher Levels - Fault Tolerance
Highest Levels - Application Specific
Internet Protocol (IP) - ANSWER Relays datagrams across networks
Routing functionality
Basis of The Internet
Transmission Control Protocol (TCP) - ANSWER Adds reliability, ordering,
and error checking
User Datagram Protocol (UDP) - ANSWER Doesn't include the reliability,
Faster, Used on gaming
Early Applications of HTTP - ANSWER Military Communications, Personal
Communications (E-mail, Net-news, Bulleting boards, Early social media,
Early hypertext: archie, veronica, gopher)
What does HTTP stand for? - ANSWER Hypertext transmission protocol
What does SQL stand for? - ANSWER Structured Query Language
Pros of Standards - ANSWER Reduce training costs,
Promotes application portability, Promotes application longevity,
,Intersystem communications (Different management systems function well
on a single database if they support the same interface), Customer Choice
(Customers choose an interface to meet their needs)
Cons of Standards - ANSWER Reduce creativity, Flaws in the design of SQL
What is SQL used for? - ANSWER Used to define, manipulate, and control
data in relational databases
Relative Database - ANSWER A database that is perceived as a collection of
tables by the user.
Table - ANSWER An unordered collection of rows
How can SQL statements be invoked? - ANSWER Can be invoked interactively
or from within an application
SELECT - ANSWER Used for data retrieval
Syntax of Complete Call:
SELECT S.CITY
FROM S
WHERE S.SNO = 'S4'
FROM - ANSWER Indicates the table to retrieve from
WHERE - ANSWER Used to describe column features that are desired in
retrieved data
Can use all comparisons
Strings must be in single quotes
,What happens if there is no WHERE? - ANSWER Returns all of the rows
CREATE TABLE - ANSWER Constructs an empty table
Must provide a table name and unique column names
Syntax of Complete Call:
CREATE TABLE S ( SNO CHAR(5),SNAME CHAR(20),STATUS DECIMAL(3),CITY
CHAR(15),PRIMARY KEY (SNO) )
Primary Keys - ANSWER Columns described as primary key cannot have two
columns with the same column value
Composite Key - ANSWER Primary key consisting of more than one column
(values unique in combination)
Foreign Key - ANSWER A primary key of one table that appears an attribute
in another table and acts to provide a logical relationship among the two
tables
INSERT - ANSWER Adds a new row
Syntax:
INSERT
, INTO SP ( SNO, PNO, QTY)
VALUES ( 'S4', 'P1', 1000)
UPDATE - ANSWER Change values in existing records
Syntax of Complete Call:
UPDATE S
SET STATUS = 2 * S.STATUS
WHERE S.CITY = 'London'
DELETE - ANSWER Remove row(s)
Syntax of Complete Call:
DELETE
FROM P
WHERE P.WEIGHT > 15
DISTINCT - ANSWER No duplicate rows