PB and Database interview questions __ Database

Source: Internet
Author: User
Tags sybase variable scope
PB and Database interview questions

First part: PB (PB6 ~ PB7) (10 points per topic)
1. Write a global function f_center (), and the parameter Aw_window to the window type so that it is centered automatically.
2. For information on how to access image or text type data in Pb, please give an example.
3. How to detect whether the data window has been modified.
4. Write a global function F_getparentwindow (), parameter 1 apo_parm is powerobject type, parameter 2 aw_parent for window type, passed as reference, crawl Apo_parm parent window (note must be parent window, Rather than the parent object) is assigned to Aw_parent.
Part Two: SQL (MS SQL Server/oracle/sybase) (10 points per topic)
1. The table name is Tab_1, where one field code, write a select the first 10 records from small to large, and sort by code from large to small (select all fields)
2. There is a table T_customer, the field code is varchar (, name is varchar), the code is the primary key field, and a SQL statement is written to delete records with the same name but different code and the code is not the same as the maximum value corresponding to name. (one SQL statement only)
3. Create a trigger on the base table Inv_trans_detail to update the inventory Inv_current_stock when a piece of data is inserted. Inv_trans_detail Transaction Quantity field is Qty_trans, the Operation Way field is operation_type, preferable "+", "-", "U" three values, if "+", then increase inventory, if "-", then reduce inventory, such as "U", then increase inventory (according to the qty_trans of positive and negative actual increase/reduce inventory). The current Inventory quantity field for Inv_current_stock is qty_current. Two tables are connected by part_no.
Part Three: on-machine operation (30 points per question)
1. Build a stored procedure in the MSSQLSERVER7 MRPII database (or the EAS Demo DB V3 database in Sybase Adaptive Server anywhere) to crawl all the tables and views in the database, and set the stored procedure named usp_ Getusertable, use usp_getusertable as data source in PB to build Data Window object and preview data

Answer

2.1

SQL Server:select top b.* from (select Top code from tab_1 to code) a,tab_1 b where A.code = B.code ORDER BY Code ESDC;

Orcla:select b.* from (select Code to tab_1 where rownum<=10 Order by code) A,tab_1 B where A.code = B.code and Rown Um < =10 ORDER BY

Code ESDC;

fill in the blanks question :

1, PowerBuilder ( PB) is a high-performance ___________ model and distributed database application front-end development tools.

2, PB is a well-known database company Sybase's subsidiary ___________ in June 1991 launched the Database Application development tool, currently the latest version of PowerBuilder8.0.

3, the use of PB Development application system, generally have to go through four stages: _____________________,________________________,___________________,__________ _________。

4. The identifier in PowerBuilder is no longer than _ _ _ _.

5. When you use the Data window (DataWindow) in a window, when you open a window, you typically use the ___________ or __________ function to associate the DataWindow control with the transaction object, using the DataWindow control's object function ___ ___ Load the data in the database into the DataWindow.

6. PB _________________ provides a convenient way to quickly replicate data between databases, databases, and even between different database management systems.

Thinking questions :

1. What are the main uses of PB ? What is the characteristic of it?

2. PB Development of the application of the general development steps?

3. What kinds of data types are PB ? What are the kinds of operators?

4. What are the rules for the naming of PB identifiers?

5. How many pronouns do PB have? What are their roles?

6. What primary key? FOREIGN key? Index? View?

7. PB 's variable scope has four kinds, respectively is which kinds.

8. There are several types of Windows. What are their characteristics. Generally used in which situations.

9. Under what circumstances the application window inherits. Window inheritance to note which points.

10. What is a static call to a function and a dynamic call. What are the pros and cons? How to implement dynamic invocation.

What is the unit of measurement of the PB screen? How to swap with pixels.

12. What is a shortcut key. such as defining shortcut keys.

13. What are the data sources for the data window? How to use the data window.

14. What is the role of the data pipeline?

PB During the development process, the database operation is a few steps.

16. Briefly describe the characteristics of the Data window, and try to describe the general method of using the Data Window objects.

17. With ODBC data source student, try to write a section of the program that uses the PB default transaction object to connect to the data source.

What is the data processing mechanism in PB ? The data window opens 4 buffers in the client's local memory while processing the data, trying to explain which ones, their respective roles, and their interrelationships.

19. What kinds of menus are there? What are the characteristics of each.

20. Try to describe the design principles of the Application menu.

What kinds of PB functions are there. What is the difference between a function and an event.

22. What are the modes of transfer of function parameters? What kinds of access to object functions. What are the conventions for naming various functions?

23. What are the basic formats and conventions for Embedded SQL? How cursors are defined. How to use.

24. There is a database table score (Sname,cname,score), respectively, the student name, class name, achievement; try to define the cursor, embed SQL in the host language using the PowerScript language to write queries for the specified student's course results. The query results can be placed in memory variables.

25. Organize the implementation of software engineering projects, from the technical and management of a number of measures, to achieve the success of the project, its main objectives.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.