100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Exam (elaborations)

CSE 180 Questions And Answers With Verified Solutions

Rating
-
Sold
-
Pages
6
Grade
A
Uploaded on
16-04-2025
Written in
2024/2025

CSE 180 Questions And Answers With Verified Solutions What are the application programming approaches? ANS 1. code in a specialized stored procedure language is stored in the database, and its executed in the database when the procedure is called 2. SQL statements are embedded in a host language (ex. C) 3. Connection tools/libraries are used to allow a conventional language to access a database 4. RESTful Web Services using HTTP What are stored procedures? ANS PSM (Persistent Stored Modules): allows us to store procedures as database schema elements mixture of conventional programming languages constructs and SQL what are the alternatives to PSM? ANS - Oracle: PL/SQL (allows you to create and store procedures/functions and can be run from Oracles generic query interface) - PostgreSQL: PL/pgSQL (can be executed from psql - IBM DB2: SQL PL - MS SQL Server and Sybase: Transact-SQL (T-SQL) What is the basic PL/pgSQL form? ANS CREATE PROCEDURE <name> (<parameter list>) AS $$ <optional_local_declarations> $$ LANGUAGE plpgsql; CREATE FUNCTION <name> (<parameter list>) RETURNS <type> AS $$ <optional_local_declarations> <body> $$ LANGUAGE plpgsql; What are the parameter modes? ANS mode-name-type triples: - IN mode: value can be used, and value can not be changed (default) - OUT mode: value can not be used, and value can be changed - INOUT mode: value can be used and value can be changed Function parameters may have any of these three modes Procedure parameters can have mode IN or mode INOUT; they can not have mode OUT What are the terms for invoking stored procedures and stored function? ANS a stored function may be used in SQL expressions wherever a value of its return type could appear PostgreSQL Stored Procedures can explicitly execute transactions, but stored functions can't What are the kinds of PL/pgSQL statements? ANS - RETURN; - RETURN <expression>; - DECLARE <name> <type> [:= <initial value>]; - DECLARE - BEGIN...END Assignment statements:

Show more Read less









Whoops! We can’t load your doc right now. Try again or contact support.

Document information

Uploaded on
April 16, 2025
Number of pages
6
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

  • cse 180

Content preview

CSE 180 Questions And Answers With Verified Solutions
What are the application programming approaches? ANS 1. code in a specialized stored procedure
language is stored in the database, and its executed in the database when the procedure is called


2. SQL statements are embedded in a host language (ex. C)


3. Connection tools/libraries are used to allow a conventional language to access a database


4. RESTful Web Services using HTTP



What are stored procedures? ANS PSM (Persistent Stored Modules): allows us to store procedures as
database schema elements


mixture of conventional programming languages constructs and SQL



what are the alternatives to PSM? ANS - Oracle: PL/SQL (allows you to create and store
procedures/functions and can be run from Oracles generic query interface)


- PostgreSQL: PL/pgSQL (can be executed from psql


- IBM DB2: SQL PL


- MS SQL Server and Sybase: Transact-SQL (T-SQL)



What is the basic PL/pgSQL form? ANS CREATE PROCEDURE <name> (<parameter list>)

AS $$
<optional_local_declarations>
$$ LANGUAGE plpgsql;


CREATE FUNCTION <name> (<parameter list>) RETURNS <type>
AS $$

, <optional_local_declarations>
<body>
$$ LANGUAGE plpgsql;



What are the parameter modes? ANS mode-name-type triples:



- IN mode: value can be used, and value can not be changed (default)


- OUT mode: value can not be used, and value can be changed


- INOUT mode: value can be used and value can be changed


Function parameters may have any of these three modes


Procedure parameters can have mode IN or mode INOUT; they can not have mode OUT



What are the terms for invoking stored procedures and stored function? ANS a stored function may be
used in SQL expressions wherever a value of its return type could appear


PostgreSQL Stored Procedures can explicitly execute transactions, but stored functions can't



What are the kinds of PL/pgSQL statements? ANS - RETURN;

- RETURN <expression>;
- DECLARE <name> <type> [:= <initial value>];
- DECLARE

- BEGIN...END


Assignment statements:
- <variable> := <expression>;


Statement labels: you can give a statement a label by prefixing a name and colon.

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
Nipsey Chamberlain School Of Nursing
View profile
Follow You need to be logged in order to follow users or courses
Sold
2041
Member since
5 year
Number of followers
1524
Documents
14950
Last sold
19 hours ago
LECT EXAMS

FOR THE BEST ASSIGNMENTS,TEST BANKS,EASSY AND TO HELP IN TUTORING I have done papers of various topics and complexities. I am punctual and always submit work on-deadline. I write engaging and informative content on all subjects. Send me your research papers, case studies, psychology papers, etc , and I’ll do them to the best of my abilities. Writing is my passion when it comes to academic work. I’ve got a good sense of structure and enjoy finding interesting ways to deliver information in any given paper. I love impressing clients with my work, and I am very punctual about deadlines. Send me your assignment and I’ll take it to the next level. I strive for my content to be of the highest quality. Your wishes come first— send me your requirements and I’ll make a piece of work with fresh ideas, consistent structure, and following the academic formatting rules For every student you refer to me with an order that is completed and paid transparently, I will do one assignment for you, free of charge!!

Read more Read less
4.1

362 reviews

5
211
4
55
3
55
2
14
1
27

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions