bo interview questions1

63
1. List of values: Right click on object properties Click associate a list of values Click allow user to edit this list of values In edit – where you can restrict the list of value in condition panel where user can see those values. Ex: tochar(orderheader.orderdetails,’month’) 2. Grouping of values Select the value to be grouped Data group values 123 Q1 456 Q2 789 Q3 10 11 12 Q4 3. Repository: it is setup by the general supervisor who stores it centrally on a database. It enables users to share the resources of bo product. Repository is made-up of 3 domains. a. Security domain: to store the information about user and group profiles. b. Universe domain: it holds the entire universe that you export from designer. c. Document domain: holds all exported documents from the bo reporting module, templates, scripts and list of values. 4. User profiles: General supervisor: all products and full access on repository. Supervisor: all products except designer and list of values. Designer: all products except supervisor. Supervisor and designer: all products but not full access on repository. User: only on bo. Versatile: as configured by the supervisor. 5. Repository architecture. Monolithic: the whole repository (3 domains) sits on a single database. Distributed. A single security domain keeps track of multiple documents and universe domain that are distributed around the organization database system. 6. Universe is a semantic layer between user module and a database. It consists of classes and objects.

Upload: petiwala

Post on 06-Apr-2015

348 views

Category:

Documents


5 download

TRANSCRIPT

Page 1: BO Interview Questions1

1. List of values: Right click on object properties Click associate a list of valuesClick allow user to edit this list of valuesIn edit – where you can restrict the list of value in condition panel where user can see those values. Ex: tochar(orderheader.orderdetails,’month’)

2. Grouping of values

Select the value to be groupedData group values

123 Q1456 Q2

789 Q310 11 12 Q4

3. Repository: it is setup by the general supervisor who stores it centrally on a database. It enables users to share the resources of bo product. Repository is made-up of 3 domains.

a. Security domain: to store the information about user and group profiles.b. Universe domain: it holds the entire universe that you export from designer.c. Document domain: holds all exported documents from the bo reporting module, templates,

scripts and list of values.

4. User profiles:

General supervisor: all products and full access on repository.Supervisor: all products except designer and list of values.Designer: all products except supervisor.Supervisor and designer: all products but not full access on repository.User: only on bo.Versatile: as configured by the supervisor.

5. Repository architecture.

Monolithic: the whole repository (3 domains) sits on a single database.

Distributed. A single security domain keeps track of multiple documents and universe domain that are distributed around the organization database system.

6. Universe is a semantic layer between user module and a database. It consists of classes and objects.

7. Metadata layer = universe, classes and objects.

8. Class: is a logical grouping of objects inside a universe. Ex: region, customer, sales, measures.9. Objects: an object in the universe map to data in the database. For the purpose of multidimensional analysis, object can be qualified as one of the 3 types.

Dimension object: retrieves character type data. Like customer name, years, quarter, project name.

Detail object: is always associated to one dimension object, on which it provides additional information.Ex: address is a detail object that is associated with customer.

Measure object retrieves numerical data that is the results of calculation on data in the database, value that return depend on the object.Numerical information by which a dimension object can be measured.

Page 2: BO Interview Questions1

10. Scope of analysis: it determines how far analysts will be able to drill through a default hierarchy from the base object in the query.

In designer we create lov from the objects. Class hierarchy.List of values: data corresponding the value useful from dimension details you selected will appear in the report. LOV will be available for filtering the data when we go for reporting.

11. Data Manager: you can view the report of the query and refresh a query.

12. Data providers – ways of accessing the data.a. Querying building a query on a universe is the most common way of accessing data

in BO.b. Stored procedure: is a SQL script saved and executed on your DB.c. Free hand SQL: you can create a data providers by opening or writing a SQL script.d. Personal datafiles: you can retrieve a data from excel, lotus123, dbase, ASCII files.e. OLAP Server: you can view the contents of an OLAP SERVER and select the data

you want to display in your report.OLAP Servers are databases that store summarized data, ready for business analysis.13. Multidimensional analysis: A technique for looking at data from diff. Viewpoints and on different level of detail. It involves slice and dice and drill.

14. Designer supports 4 types of joins. a. Equi join = same column is present in both tables.b. Theta join: link tables based on a relationship other than quality between 2 columns.c. Outer join: links 2 tables, one of which has rows that do not match those in the

common columns of the other table.d. Shortcut join: can be used in schemas containing redundant join paths leading to the

same results, regardless of direction.

15. Online/offline modes: are options that apply when you are working in enterprise mode, which means an environment with the repository.Online mode: is appropriate for a network environment in which the general supervisor has setup a

repository you can import and export universes.

Offline mode: not in network where you work with universes that are stored locally on your computer. To use this mode you must have been connected atleast once in online mode.Es: used with a laptop computer or whenever your network goes down.

16. Enterprise mode: you are working connected to a repository and can access documents save in repository.

17-workgroup mode: you do not have access to a repository and can access documents saved in workgroup mode only.

18. Metadata: a metadata repository is a database that describes various aspects of the data in the DataWarehouse. Administrative and end user metadata.

19/ surrogate key: for each dimension record in order to avoid a dependency on legacy defined keys where the surrogate key generating process enforces referential integrity between the dimension tables and the fact tables.

20. BO Documents can contain one or more reports. The data displayed in the report in one document can come from different sources (excel or oracle)/ but you cannot transfer data between reports.

Page 3: BO Interview Questions1

21 pivoting technique that enables you to switch the position of the data in a report.

22. Hierarchies enable you to drill from one level of data to the next. Ex: geography: country, state, district, city. Product: category, type, vendor, and brand.

23. Slice and dice. To change the order of the fields, to display as master and detail relations.

24. Drilling most general level data to most detail data.

25. Additive when you consider the possible summarization that will occur on the fact table.

26. Semiadditive: can be added along only the same of the dimension.

27. Non additive measure can’t be added to all. We can force to use counts. Ex: employee id.

28. Aggregate awareness: is a feature of designer that makes use of aggregate tables in a database. These tables that contain pre calculated data used to speedup the execution of queries.

29. Cardinality: expresses the minimum and maximum number of instances of an entity.

30. Degenerated dimensions: which is neither a measure nor a foreign key. Dimension keys with no corresponding dimension table. This dimension will be stored in the fact table. Ex. It can be used to calculate how many times the shipments have been past due or onetime. There is no another dimension for the shipment-required date.

31. Confirmed dimensions. Dimensions that means the same dimension can be used with every possible fact table that it can be joined with.Ex. One dimension is joined with two facts.

32. Slowly changing dimensions. Where the production system has not changed the master key but has changed the description of the product.

33. Warehouse key: to dimension and fact tables in * schema is to allow information to come from multiple sources with minimal changes to the data mode.

34 loop. A loop leads to multiple paths of accessing the data. Loop need to resolved before the reports are generated. Aliases or context will resolve Loop.

35. Context: It is used for segregation of fact.It is a query feature that enables you to select a path required retrieving data, when there is more than one possible path. Create a context for each fact table.

36. Alias: It is used for segregation of dimension or hierarchies. It is a logical pointer to an alternate table name. The purpose of an alias is to resolve loops in the paths of joins.

37. Alerts when data reaches to a specific target it shows the message or alert on the screen. Condition: sales are < 5000 give alert column redEx. 1995, it displays 1994 data reports only.

38. Filter: if you want to view the data related to 1995, you filter on the year 1995. The report displays that period data only.

39. Rank: it retrieves the rank number for each dimension value based on the measure.

Page 4: BO Interview Questions1

40. Cartesian product. A result of a query in which 2 or more tables are not linked by a join.41. Schemas supported by designer:

a. * schema.b. Snowflake.c. Multi * schema.d. Normalized production.e. DW with aggregates.

42. Bitmap indexing: done on the low cardinality columns. Columns in which the number of distinct values is small compared to number of rows in the table.

43. Strategies: a strategy is a script that reads structural information for a database or flat files.Two types of strategies.

a. Built in strategy: for creating the components of universe.Universe parameters:

i. Object creation strategy. Which tells designer how to define classes and objects automatically from the database tables and columns.

ii. Join creation strategy. Which tells designer how to define joins automatically from the database’s tables and columns.

iii. Table browser strategy. Which tells designer how to dead the table and column structures from the database data dictionary.

b. External strategies. Files are declared in the STG section of. PRM files located in various RDBMS folders. Ex ORA7EN.PRM files.

44. What is schema?A scheme is collection of dB objects of a user.

45. Schema objects. Logical structure that directly refers to the database data. Tables views, sequences, indexes, clusters, functions, procedures, etc.

46. Components of designer interface.a. Table browser.b. Structure pan.c. Universe pan.

47. Two types of join paths that return too many rows.

a. Chasm trap: converging many to one join. To resolve a chasm trap create 2 context.b. Fan trap: serial many to one join. To resolve a fan trap create an alias table and to

contexts.

48. Detect a chasm trap. you need to visually examine the direction of the cardinalities displayed in the table schema. If you have 2 fact tables with many to one join. Converging to a single lookup table, then you have a potential chasm trap.

49. Resolve chasm trap. you need to make 2 separate queries and then combine the results.

Create a context for each fact table. Generate separate SQL queries for each measure. Break the universe into multiple universe, one universe for each fact table.

50. Database connection.A connection is a set of parameters that provides access to a database. A connection is made-up of 3

elements.

Page 5: BO Interview Questions1

The network layer.(oracle client) The connection name and type(secured, shared, personal) The database location and account name.

51. Designer provides 3 types of connection.

Secured connection: it is used to centralize and control access to sensitive or critical data. It is the safest type of connection for protecting access to data.

Shared connection: is used to access common resources such as universe or documents. It is useful if you need to setup a testing environment for universes before distributing them to the entire user community.

Personal connection: is specific to one user and can be used only from the computer on which it was created.

52. Dimensional modeling: a typical dimensional model is the * join schema, with one large central table in the center of the schema it is only the table in the center of the schema. It is only table in the schema with multiple joins connecting it to other tables. The other tables all have only a single join attaching them to the central table.

53. Linked universe. Are universes that share common components, one universe is said to be the kernel or master, while the others are the derived universes? The kernel universe are active universe are created from the same data account and the same rdbms. Kernel universe are exported and reimported at least once.Exported derived universes are located in the same universe domain as the kernel universe.*(All classes and objects are unique in both the kernel universe and the derived universe. (Otherwise, collision may occur. You are authorized to link the given universe.Note: a derived universe doesn’t recover the list of values containing personal data from the kernel universe. However, if you need control list of values, you can use the following create new objects defined in the same way as those in the kernel, the hide them. You can then assign them to these objects lists of values, which you can then modify and export.

54. Aggregate awareness: is a feature that makes use of predefined aggregate tables to enhance the performance of SQL transactions. It is used to improve the speed by which aggregates are calculated in the dB. To setup aggregate awareness in the universe. You define more objects using the @aggregate aware(aggregate table1…..aggregate table n)The arguments of these functions are all the names of alternative aggregate tables. When you formulate the syntax, you should be aware of order of the arguments. The precedence is from left to right; this means that Bo determine the aggregate to use beginning from the left most argument.As a general rule you should enter the most aggregate table as the first argument. The next most aggregate table as the second argument and so on. You must then use the aggregate navigation editor to setup a list of incompatible object or/ incompatible condition for each aggregate table in your universe. You can either setup this list manually, or cause the lists of objects to be detected by designer.

55. Task of the universe designer. Designing, creating and maintaining universes Distributing the universes.

a. Planning – breakdown the information system into functional areas.b. Analysis – analyze the information needs of users.c. Design – design a conceptual schema. Design the specification of a universe.d. Implementation – create a universe with designer.- Test the universe with Bo/webi.- Distribute the universe.- Repeat the above steps for other universe.

Page 6: BO Interview Questions1

e. Maintenance – updates and maintains the universe. Notify end users of changes.

56. @Prompt(‘message’,[‘type’],[lov],[mono/multi],[free/constrained]type= ’A’ – alphanumeric ‘N’ –number‘D’ – date

LOV - list of values enclosed in brackets (each value must be with in single quotes and seperated by commas) or the name of a class and object separated by a backslash and within single quotes.

MONO – accepts single value /free=free input.

MULTI – accepts several values / constrained – choose the value.

57. Star schema: fact table is normalized, dimension tables are denormalized.

58. Snowflake schema. A normalized multi dimensional mode. In which 2 or more hierarchically related table represents one dimension. When you want to store the data hierarchically go for snowflake.

58. @aggregate_aware(aff-table1,……..aggregate table n)

ex:@aggregate_aware(sum(region_sline.sales_revenue), sum(service.price*invoice_line.days*invoice_line.nb_guests))

59. assign store procedure to a user or usergroup.

In the userpane (in universe), click the user or group. Select the link > store procedure command on the resource menu. In the link stored procedure dialog box, click each connection to the s.p you wish to assign. Ok.

60. how do you define hierarchy.

Hierarchy is useful to drill through a default heirarchy from the base object in the query. Click on the hierarchy editor. A window appears withDefault hierarchy and cutomer hierarchyIn default heirarchy you can see all the classes , click on each class and click add to the cusomer hierarchy.Customer hierarchy after adding to customer hierarchy you can define the hierarchy levelTime= year, quarter,month, day.You can create your own hierarchy by clicking the button new and add objects from th default hierarchy.

61 more powerful query:

Define scope of analysis Limit the query results to data that satisfies conditions. Sort data alphabetically, apply transparent sorts. Retrieve and specified number of rows of data. Eleminate duplicate rows of data.

62. sort priority or apply transparent sorts.Click the manager sort you may define sort priority, also can apply transparent sorts i.e., on objects that are not result object.

63. break table or crosstab row or column breakex: table containing the resort, quarter or revenue variables simply displays revenue per resort per quarter.

Page 7: BO Interview Questions1

If you want to insert percentage of revenue per resort. You cn apply break so after each region or resort it will leave a break or space or ampty row. So in that you can calculae the percentage of revenue per resort.Ranking can be done on break column.Break applied on rows in corsstabs only. Apply break on more than one variable.Break header - insert header for each table or cross tab.Break footer.Remove duplicates – values from the data on which you can apply break.Fold – folds the table or cross tab showing only its header or footer.Value based break.You cannot apply a break on a master or on data that is displayed in a chart.

64. filtersglobal filter – filter affect the whole report.Block name folder.- filter are block specific. You can select more than one variable to filter. You can drag

and drop a filter between folder.

65. ranking top and bottom values.

You can select top or bottom values of a dimension based on the values of a measure.

In percentage of total number of values. When you check box, a percent sign(%) appears at the top and bottom values. These numbers are truncated if necessary to fall in the percentage range of 1 to 100.

To apply a ranking in a report, you must remove any existing sorts or filters. If any sorts or filters exist when you initiate ranking, an overwrite? Message is displayed verifying that you wish to remove the sort or filter.

66. variables for calculation:

if you are using a variable to make the calculation , typeex:- to display the revenue variable in the cell type =<revenue>

67. formula for calculation.If you are using a formula to make the calculation, type it after the = sign.

68. making copies of reports while you work on dirll. Click the take snapshot button on the standard toolbar, or select the snapshop command form the analysis menu. A copy of the report appears in a new tab inside your document (reportname(1)).

69. formatting reports. Predefined object format. Universe designer can now apply formats to objects when creating universes. Format options include setting for numbers, alignment, font, boarder, and shading.

Own formats(table format)

You can format different parts of your reports.Resizing and positioning blocks and cells.Appluing shading and borders to sections, blocks and cells.Using page headers, footers and margins.displaying page numbers dates and times.

70. page backgrounda picture displayed behind the reports data and other picture.

Page 8: BO Interview Questions1

1. open a document, and activate the page layout command on the view menu.2. Click the tab of the report in which you want to insert the page background.3. Select the page background command on the format menu.4. Click new5. ** you can also copy to the clipboard (copy command, then click paste in the page

background.)

71. local variable: it is a report element that presents a named category of data. Corresponds to columns of data returned by queries or other data providers.

72. load balance: reports which you generate in the bo query report. You want to test whether the number of records it fetch should match with the report in the oracle.

73. Any module in Bo is disable when you enter password wrong for 3 times. Go to repository database in table obj_m_actorField = m_actor_m_cntdown make 3 to 0

.Rep: reports save in userdoc folder of Bo.

.unv: .keyfile in /locdata folder of bo.

Data mart for goods traffic for railways(SCR)

Gauge dimGuage keyGuage descNarrow gaugeBroad gaugeMeter gauge.

Station dimStation keyStation noStation id Division Station name Station Zone

Wagon dimWagon keywagonidWagon descFull wagonHalf wagon Full rack

Item dimItem keyItem codeItem categoryItem sub categoryItem sub subcategory

Page 9: BO Interview Questions1

Item desc

Time dimTime keyYearQuarterMonthWeekGoods traffic factGauge keyStation keyItem keyTime keyWagon keyCharge wtCharge distRateEarningTon kmLead

Flat files, sql*loader, pl/sql, oracle 8, Bo 5.0.

Goods travel from one place to another place. Goods are divided into coal only or non-coal items. Distance and weight charge these goods.

Reports:The major analyses are.

a. Division wise, gauge wise analysis of charge wt, and cost. (same month last year and cumulative for the last 3 months)

b. Division wise, product, category wise analysis of charge distance, lead and earnings.c. Product sub category wise ,division wise, month wise variance of earnings and ton km.

(cumulative as well as on that month last year)d. Product categories wise, division wise earnings and lead are analyzed.

Data mart for road traffic movement (APSRTC)

Depot maintenance.

TrafficRoute wise earnings.Service wise earnings.

StoresTyre damageTyre lifeParts consumed by particular route vehiclesType of parts used.

CancellationDue to:tyre failureHeavy traffic Accidents bandhs

Page 10: BO Interview Questions1

Heavy rains Crew

Oracle tables, oracle 8 bo4.0 DTs

Datamart for retail sales management system.Sales and purchase mart.Monitors the purchase as well as sales prices and fast moving goods and customer wise purchase behavior.

Oracle 7.3, Daphne(2.0), sql*loader, pl/sql

Term deposit martAndhra bankWe dealed with liability of term deposits like banking, savings.

Dimensions and fact.

Contractual periodMaturity period (5yrs, 10 yrs etc)BranchSchemes (gold loan, housing loans etc)Fact (account no)

Oracle 7.3, Bo 4.0 sql loader, plsql.

Data mart for customer information system for HLL.

Product dimProduct key, Product name, Product size Product form, Product package, Product dept, Product cat, Product sub cat, Unit price

Store dimStore keyStore name Store address Store manager Store size

Organization dimsOrganization keyDivision name, Area name, Region name, Market name

Time dimTime keyWeek

Page 11: BO Interview Questions1

MonthQuarterYear

HLL wanted to do the research on the market segment and the research towards the product selling. How the customer is reacting towards the product and what is the behavior of the customer. Ex if the customer are going for the kissan product, what type of packing they are n=gooing for i.e., refills, tins, bottles. By seeing the behavior of the customer they wanted to change the mode of business.

MSDTS, SQL Server 7.0, Bo 4.0

What are the total sales of particular product in the particular region for 1997 and 1998?

Which region in the particular area buys the most products?

Which stores is selling the most kissan in the particular region this year?

Data mart for sales for tirumala electronics

Customer dimCustomer keyCustomer nameAddress

Employee dimEmployee keySales personCountryStateDistrictCity

Product dimProduct keyProduct desc Product sizeProduct catProduct sub cat

Time dimTime keyWeekMonthQuarterYear

They are the distributors and retail sellers of the electronic goods like lg, brl, whorl poor etc. they off er the discount, fiestival offer count, exchange offers, they want to analyse \the sales of the product/

Data mart for customer service center.CallsCallid Call desc

Product

Page 12: BO Interview Questions1

Product keyProduct descProduct sizeProduct dept(brand)Product catProduct sub cat Customer dimCustomer ifCuatomer nameCustomer address

Time dimTime keyWeekMonthQuarter Year

Customer service factCallidMachine idSpare idCustomer idTime keyRevenueQuantityDiscount

VarianceCompare product line sales.revenue of 1999 and 2000Columns---linesRows----yearBody----sales revenue

CalculationsDiscount = qty * unitprice – revenue

Calculated object it does not exist in the fact table.Margin = revenue – cost of sales

Variance%x-x1/x1*100 2000-1999/1999*100

Defining a connectionDesigner – tools—connections

It display the name – new connection nameType = shared, secured, personalNetworklayer= oracle clientDatabase engine = oracle 8.1Database location/account name –username, password, and database

Predefined reusable condition or filters in designerThese conditions are displayed in query panel.Name

Page 13: BO Interview Questions1

DescriptionWhere clause Class name ConditionInsert –condition

Name –year 1999Desc sales in the year 1999Where @select (time/year)=1999Class/object condition

File parameters Summary tab – it gives the total number of items in unv.Revision tab- number of times it has been exported

. Key file

bomain.key – contains connection information to the repository.

Broad caste agentUsed for running scheduled tasks. Bca is a software product, which empowers users of webi and business objects. Ebusiness intelligence software to process and distribute documents automatically and securely at scheduled dates and times. And it automatically communicates over the web to the channel subscribers.All the users have to do is send a document to bca using Bo or InfoView and specify scheduling and distribution information.

Report bursting is to refresh the document with each use profiles. It automatically generates a version of a document based on the profile of each person who will receive it. This may have substantial impact on system performance. This type of filtering the data and sending to the concerned user based on the profile.

Web intelligenceWe need IIS Internet information server. We need a browse with Java supporthttp://192.1.2.1/wi- this is the server name or path, which will start InfoView.

InfoView

To login to your repository.UsernamePassword.

From webi you can view the exported documents. It has access to the universe data provider only.

URL—servername

From InfoView

You can access Corporate docs’ – gives the list of all Bo corporate docsPersonal docs – you can see personal docs which was saved but not publish in corporate docsCreate docs – display the all available universes that has been exported i.e., universe domain) select your universe, query panel opens with class and objects.InboxOptions – the users can have his own option of output as it has to be displayed in the form of html format or Java applet.

Save –it save the report / document as personal document.

Page 14: BO Interview Questions1

Sent – to userPublish - the document in the corporate documents in the universe domain.

Reports of Bo cannot make changes in webi. But InfoView reports can be changed.

I SDKs VB macros.

1. We can write a macro when you click the button or it activates automatically when an event occurs.

Ex whenever you open the document it should displays

Welcome

Select your universeCreate a normal Bo reportSave report in userdocs folder.

Steps bo reportingTools—macros – VB editor

Project explorerThis document present documentDocument select object as document

Before refresh eventPrivate sub document – before refresh

Msgbox “welcome”

End sub

Whenever you refresh a document it will display welcomeData –refresh

2. Before save the document should save as pdf and html format report

Private sub document-before save

This document.exportas pdf (“c:/bo/report3.pdf”)This document.exportsheet as html (“c:/bo/reports3.html”)

When we save the document in Bo reporting module it save the report as pdf and html reports.

3. VB variable attaching to Bo variable.

Bo - conditionYear equal to vyear

Design a VB formTools – macros –VB macrosInsert ---userform

PropertiesName: yearformLabel properties

Page 15: BO Interview Questions1

Caption: yearText box propertiesName: txtyearCommand button propertiesName command button1Ok

Define global variableDim varyear as busobj.variable

Private sub command button1_click ()Varyear.value=cint (textyear.value)Unload meEndsub.

Year object vyear of Bo condition variable has to attach to VB global variable.This form has to attach to the Bo document variable.

Private sub userform_initialize()Set varyear=this document.variablesAdd(“vyear”)Varyear.interpreters=bo numerical variableEnd sub

Document Before refresh this document vb year form invokes in bo

Private sub document_beforerefresh(cancel as boolean)Yearform.showCancel.falseEndsub

Bo has 50 db objects

Obj***24Unv***24Ds***250

slowly changing dimension are 3 types

type 1 no history –updatestype 2 full history

a. versionb. current flagc. date range

type 3 partial historya. current historyb. previous history

type1 no history

Page 16: BO Interview Questions1

this loads a slowly changing dimension table by inserting new dimensions and over writing existing dimenstio use this mapping when you do not want a historu of previous dimension data.

Type 2 a.version

This loads a slowly changing dimension by inserting new and changed dimension using version no and incremental pk to track changes. This is used when we want to keep full history of dimension data.

Product table

Prodno Pname price uom100 tv 235 00 ea101 vcd 23000 ea100 tv 25500 ea101 vcd 27000 ea102 audio 15000 ea

pk Prodno Pname price uom pm_version_number1 100 tv 235 00 ea 12 101 vcd 23000 ea 13 100 tv 25500 ea 24 101 vcd 27000 ea 25 102 audio 15000 ea 1

Flag currentThis load a slowly changing dimension tble by inserting new and changed dimension using flag to make current dimension dat and an incremental pk to track changes.

Prodno Pname price uom100 tv 235 00 ea101 vcd 23000 ea100 tv 25500 ea101 vcd 27000 ea102 audio 15000 ea

pk Prodno Pname price uom pm_version_number1 100 tv 235 00 ea 1 02 101 vcd 23000 ea 1 03 100 tv 25500 ea 14 101 vcd 27000 ea 15 102 audio 15000 ea 1

latest data modification is with 1 previous data with 0

c. effective data rangethis loads a slowly changing dimension table by inserting new and changed dimension using a date range to define current dimension data.

Pm primary key Prodno Pname price uom pm degin date(sysdate) pm end date1 100 tv 235 00 ea 07-07-2003 09-07-2003

Page 17: BO Interview Questions1

2 101 vcd 23000 ea 07-07-2003 09-07-20033 100 tv 25500 ea 09-07-20034 101 vcd 27000 ea 09-07-20035 102 audio 15000 ea 09-07-2003beginning data of 2nd load is end date of 1 load.Type 3Current/previous

a. currentthis load a slowly changing dimension by inserting new dimensions and updating values in existing dimension. This maintains partial history that is current and previous.It ask changes of which field you want to track

User response with multiple prompts

=UserResponse("Query 1 with Evl_Live" , "CCAT") & " CCAT Agent Date From : " & UserResponse ("Query 1 with Evl_Live" , "DATE_FROM") & " Date To : " &UserResponse ("Query 1 with Evl_Live" , "DATE_TO")

Down load excel file from given server or url.

="<a href = http://bods.nat.bt.com/smerfweb/evolve/evolve_reports_excel_dev/Director_Coverage_Tab.xls> Download to XL </a>"

Module

Option Private ModulePublic Const Config_Name = "Evolve_Logging.ini"Public Logging_WebPath As String 'web P PathPublic Logging_ConnPath As String 'db Conn PathPublic Logging_DbName As String 'Db NamePublic Logging_Passwd As String 'Db PasswdPublic Logging_Errorlog As String 'ErrorLog PathPublic Logging_MailTo As String 'MailTo PathPublic Evl_Path As String 'Evovle PathPublic tracefile_path As String 'Trace File PathPublic excel_path As String 'Excel_path

Sub InitializeApp(Paramater As Boolean) Dim Config As String 'Config_Path = ThisDocument.Path Config_Path = "c:\Config" Config = Config_Path + "\" + Config_Name Logging_WebPath = GetIni(Config, "CAT", "WebPath") Logging_ConnPath = GetIni(Config, "CAT", "ConnPath") Logging_DbName = GetIni(Config, "CAT", "DbName") Logging_Passwd = GetIni(Config, "CAT", "Passwd") Logging_Errorlog = GetIni(Config, "CAT", "Errorlog") Evl_Path = GetIni(Config, "CAT", "EVL_PATH") tracefile_path = GetIni(Config, "CAT", "Tracefile_path") excel_path = GetIni(Config, "CAT", "Excel_path") Logging_MailTo = GetIni(Config, "CAT", "MailTo") End Sub

Page 18: BO Interview Questions1

BusinessObject ObjectsThisDocument(boreport name)

Const sRptName = "Corporate_Coverage_Through_SmartScripts.rep"

'****************************************************************************************' Version Date Author Comments'----------------------------------------------------------------------------------------' 1.0 25/08/2004 Shashank Initial version' 1.1 08/09/2004 Shashank Added CRR-DBAM Column in all tabs'****************************************************************************************

Public Sub proc_report()On Error GoTo error_handler

Dim rows(20) As IntegerDim CheckDir As IntegerDim xlpath, query, DocToRun As StringDim doc As busobj.DocumentDim dp As busobj.DataProviderDim rep As busobj.ReportDim col As busobj.ColumnDim dpcount, dploop, doccount, docloop, repcount, reploop, spacecheck, prompt As IntegerDim html, SelectRep, SelectRep1, SelectRep2, SelectRep3, SelectRep4, SelectRep5, SelectRep6, underscores, ls_FY As StringDim errors(1 To 3, 1 To 10) As VariantDim NewMail As Object'Dim tracefile_path As StringDim Report_folder As String'Dim excel_path As StringDim tracefileDim wrkODBC As WorkspaceDim conBO As ConnectionDim rstResults As Recordset

InitializeApp (True)

Evl_Path = Evl_Path & "Corporate_Coverage"

Set doc = ThisDocument

SelectRep = doc.Name

' Select a tab to publish blank means all the tabs.SelectRep1 = "Director_Coverage"SelectRep2 = "GM_Coverage"SelectRep3 = "GSM_Coverage"SelectRep4 = "SM_Coverage"SelectRep5 = "AM_Coverage"SelectRep6 = SelectRep1 & "|" & SelectRep2 & "|" & SelectRep3 & "|" & SelectRep4 & "|" & SelectRep5

Page 19: BO Interview Questions1

'Report_folder = EVL_PATH & SelectRepReport_folder = Evl_Path

html = Report_folder & "\" & SelectRep

CheckDir = Check_dir(Report_folder)CheckDir = Check_dir(tracefile_path)tracefile = tracefile_path + SelectRep & "_" & Format(Now(), "yyyy-mm-dd-hh-mm") & ".txt"

Open tracefile For Output As #1

Print #1, Now() & " ********** Start of Trace **********"Print #1, ""

Print #1, Now() & " Establishing database connection"Set wrkODBC = CreateWorkspace("ODBCWorkspace", "evolve", "evolve", dbUseODBC)Set conBO = wrkODBC.OpenConnection("ODBCConnect", , , Logging_ConnPath)conBO.QueryTimeout = 600

' first pick up the total number of channelsSet doc = ThisDocument

dpcount = ActiveDocument.DataProviders.Count For dploop = 1 To dpcount Set dp = ActiveDocument.DataProviders.Item(dploop) Print #1, Now() & " Refreshing data provider " & dploop & " of " & dpcount 'dp.Refresh Set col = dp.Columns.Item(1) rows(dploop) = col.Count Print #1, Now() & " Sucessfully Refreshed, returned " & col.Count & " rows" Next dploop Call doc.ExportSheetsAsHtml(html, SelectRep6, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0) Print #1, Now() & " Exported HTML " repcount = ActiveDocument.Reports.Count For reploop = 6 To repcount spacecheck = 1 Set rep = ActiveDocument.Reports.Item(reploop) repstr = rep.Name Do While spacecheck = 1 If InStr(repstr, " ") = 0 Then spacecheck = 0 Else repstr = Left(repstr, InStr(repstr, " ") - 1) & "_" & Right(repstr, (Len(repstr) - (InStr(repstr, " ")))) End If Loop CheckDir = Check_dir(excel_path)

Page 20: BO Interview Questions1

xlpath = excel_path & repstr & ".xls" Call rep.ExportAsText(xlpath) Print #1, Now() & " Exported Report in Excel " Next reploop Print #1, ""Print #1, Now() & " ********** End of Trace **********"Close #1

'On Error Resume Next

Exit Sub

error_handler: Print #1, "The following error occurred at " & Now() & ": " & Err.Number & " - " & Err.Description 'Resume Next If Err.Number <> 0 Then fnLogEvents "Evolve_Errorlog.txt", sRptName & "-" & "Error in proc_report-", Err.Number & " " & Err.Description End IfEnd Sub

Function Check_dir(pathname As String) As Integer

On Error GoTo err_check_dirDim temppath As String

temppath = Dir(pathname) If temppath = "" Then MkDir (pathname) End If Check_dir = 1

exit_check_dir: Exit Functionerr_check_dir: Check_dir = 0Resume exit_check_dir

End FunctionFunction fnLogEvents(ByVal lsFileName As String, ByVal lsEvent As String, ByVal lsLog As String) As String'fnLogEvents "Liberty_Errorlog.txt", sRptName & "-" & "Error in Process_Report Procedure-", Err.Number & " " & Err.Description'----------------------------------------------------------------------' Name: fnLogEvents' Description: Logs Events (User specified) to a test file (also' specified)' Inputs: File Name as string - The Log file' Event to Log as string - Description of the Logging' Event' Log Data as string - Event to be Logged' Results: For viewing the events logged please see the relevant' file in the <App.Path\..\Logs\> directory.

Page 21: BO Interview Questions1

'---------------------------------------------------------------------- Dim FileNo FileNo = FreeFile If Dir(Logging_Errorlog & "\" & lsFileName) = "" Then Open lsFileName For Output As #FileNo Write #FileNo, Now() Close #FileNo End If Open Logging_Errorlog & "\" & lsFileName For Append As #FileNo Write #FileNo, lsEvent & Now() Write #FileNo, lsLog Close #FileNo 'Send Emails using Outlook Call SendOutlookMail(sRptName & "---> Failed " & Now(), Logging_MailTo, lsLog) 'Send Email to UsersEnd Function

Sub SendOutlookMail(Subject As String, Recipient As _String, Message As String)

On Error GoTo errorHandlerDim oLapp As ObjectDim oItem As Object

Set oLapp = CreateObject("Outlook.application")Set oItem = oLapp.createitem(0)'With oItem .Subject = Subject .To = Recipient .Body = Message .SendEnd With'Set oLapp = NothingSet oItem = Nothing'

Exit SuberrorHandler:Set oLapp = NothingSet oItem = NothingExit SubEnd Sub

Nag

1.what is user object object?what is the scope of that.will this same as class object? if not how do u give access to other users? where it will store? Universe folder

If the objects in a universe do not meet your needs, you can customizethe universe by Creating you own object is called user objects.

Page 22: BO Interview Questions1

ex: concatenate firstname and lastname = name.

Example Obtaining total ordered revenue by creating a user objectTo obtain the revenue generated by an order, you create the Total user object withthe following formula:=Quantity Ordered*Product Pricewhere Quantity Ordered and Product Price are objects in your universe. When you include the Total user object in a query, the calculation is made at the database level and the calculated results appear in your report.

If an end-user wants to share user objects with other users, they should ask the universe designer to include these user objects in the related universe in order to make them available to all BUSINESSOBJECTS end-users. The universe designerincludes the file UNIVERSE_NAME.UDO in the universes where the user objects are to be used.

2.what three different key files available?which file contain what?

The .lsi, .rkey, and .key files created on the server by the WIQT aredownloaded to the client.• The .lsi file contains the user’s security information, profile, command restrictions and authorized documents and universes.• The .rkey contains the address of the WEBINTELLIGENCE server the user is connected to. The .rkey indicates that the repository is accessed through a web connection.• The .key contains the address of the security domain.Updated versions of these files are downloaded to the client each time the user connects to the WEBINTELLIGENCE server.

3.what is the internal process happening when u export the document to repository?

When document publish to the repository it store in the document domain as a records in obj_m_documents in the main table. There is another table obj_x_documents which stores entire report in binary format (data type blob).

4.what is offline mode of opening the BO? when u open the BO offline they can be opened but with out connection with repository.then how is user validations done.

to open offline mode, atleast one time u must open in online. that only BO maintain a key file locally regarding ur security details. next time when u open offline security details from that key lsi(i think) which is stored in ur local system.

Mode of operation for DESIGNER when you are notconnected to a repository.• Only available if you have previously connected inonline mode.• In offline mode you can open universes that arestored on your local computer only if thoseuniverses have been opened previously in onlinemode.• You can access databases where the connection andsecurity information are stored on your localmachine (personel and shared connections).• You can use offline mode when you do not haveaccess to the repository, for example when workingwith a laptop off site, or when the network is notavailable.

Page 23: BO Interview Questions1

5.what is the report bursting?

Report bursting is to refresh the document with each use profiles. It automatically generates a version of a document based on the profile of each person who will receive it. This may have substantial impact on system performance. This type of filtering the data and sending to the concerned user based on the profile.

6.what is the report linking? how do u that? tell me formula?what is happening when you linking the reports/1. In Designer, right click on the Link object and select Object Properties. 2. Insert the following in the Select statement:'<a href="C:\Program Files\Business Objects\BusinessObjects 5.0\UserDocs\'+ Country.country+ '.rep">' +Country.country + '</a>'

Note: This is MS Access format. For Oracle databases, use "||" for concatenation. For other databases, please check your database documentation.

3. Click OK. 4. Right click on the Link object and select Object Format. 5. Uncheck the option "Read As HTML" and then check the option "Read As HTML" again (because it was grayed out by default).6. In BusinessObjects, query your report, including the Link object.7. Save the report as HTML. 8. Open the HTML file in a web browser. In this case, you will see the country name as a link. Remember to save the designated report as country name. 9. Click on the link and the report opens in BusinessObjects

Hyper link between reports using = "<a href=" & Char(34) & Char(46) & Char(46) & "/cust_detail/"&"cust_detail.htm" & Char(34) & ">" & <Customer(top 10 customer)>&"</a>"

= "<a href=" & Char(34) & Char(46) & Char(46) & "/top_10/"&"top_10.htm" & Char(34) & ">" &InitCap("top 10 customer") &"</a>"

7.suppose i want to order amounts of the of defferent business for current month,current ytd,previous year same month order amount, previous year ytd in the szme report how do u do?

u can have different data providers for each measureed order amounts and keep dragging the order amont on to the job

8.suppose i want to view the business order and sales amount breaking the different view points like business wise, region wise, district wise what do u do? and apart from this if possible how do i view a summurized aggregated report what do u do?

Cross tab report sales amount is body , business order as column and row as business, region ,district etc.

9.assume that in a report there one dataprovider having month and yere as the prompts.i want to show the current month and year on the top of the reports on the dinamically.

The selected prompt can be displayed in the report title Click on the report title or any cell,

Page 24: BO Interview Questions1

Insert --- special field ---query prompt.

10.suppose assume that i have four data providers in a report. how BO can combine these four data providers?It automatically does or in view data there is an option called link to it will display the other data provider object which you have to link

11.where are the key files can be located? what is global repositories? In locdata of business object folder. Global repositories which store in remote database. To access this you need to have the .key file in your local repository.

12.how do you take an excel version of BO report either in the BO or in the webiintelligence ?Select Personal data files (DP) select the excel sheet and run the query. but you cannot call in webi I feel because webi has access to universe data provider

13.what are the complex functions u have used so far? if i use variance formula some times 'devide by error' envountered in the report.how do u track the problem and highlight situation?Total Nonbillable =sum(<no of non billable resources>) foreach<sector(billable resources)>forall <parentdepartment(billable resources)> forall <departmentname(billable resources)>Use extended syntax to solve this problemVariance formula a-b

14.what is info view, zabo, can we create report using info view? what are defferent types of documents? how do i switch to different options to create the reports in webi?

• InfoView is the personal gateway for the organization information.

• You can access and send documents from around the world using corporate intranet, extranet, or World Wide Web.

• You need to install the internet browser and supply the URL which connects to Web Server and which will start InfoView.

• To access the InfoView, users are granted rights by the BO supervisor according to their user profile.

Corporate Documents: The centralized BO storage and distribution of documents are manage in Corporate Document.

• Personal Documents: Users saves the document for the personal use.

• Inbox: You can view the documents that other users have sent you.

• New Document: You can create the new document using the universe or from OLAP. InfoView options

• You can customize your user settings like refresh the documents when ever you visit. • You can create your Dashboard using My InfoView.

• You can display different reports at once, each report displaying different information.

• You can select the view format of the report as HTML or PDF.

• You have the drill option

– Prompt if drill requires additional data– Synchronize drill on report blocks

Page 25: BO Interview Questions1

WebIntelligence

• WebIntelligence is thin client.

• It can be view through InfoView.

• You can create/edit the documents of webintelligence using infoview.

• Select the report panel you want to use i.e., HTML or JAVA panel

• you can create more sophisticated reports using JAVA panel like multiple reports, charts, drag and drop, prompts, create formulas etc.

• Created reports can send to particular user, corporate document, or schedule through BCA.

• You can create/edit the reports of Business Objects through InfoView.

• It downloads the business objects thick client on the machine, and displays the list of universes.

• Select the universe and you can create the document using the universe objects.

• And send the report to repository, particular user or BCA.

15.if i want to give access my report to multiple users what do i need to set?Publish to corporate document.

16.what is report mearging?Using union in query panel

17.how do u set current date, last refresing date on the top of the report?Select Insert—special field – date and time--- current date refreshing date

18.is it possible to combine two different dataproviders with two different data sources in one documet.Yes. Select an ooption – access the data in different way. And select others where you can select other than the universe data provider.

19. is it possible to combine two different data providers from two different universes?Yes , select ooption--- access the data in diff way and select the universe ooption and select universe name

20.Tell me few build-in functions available in BO? difference between @variable & @prompt function.@prompt where you select the given values which has been specified in the function.@Prompt('message','type',[{'value1'[,'value2',...]},class_nameobject_name'],mono/multi,free/constrained) Creates an object that prompts users to enter a specific value.@Script('variable','type','script name') Recovers the results of an executed script created in the BusinessObjects module.@Select(classname\objectname) Inserts the SQL Select definition of a previously defined object.@Variable('myname') References the value assigned to a prompt or variable.@Where(classname\objectname)Inserts the SQL Where definition of a previously defined object.@Aggregate_Aware(sum(aggregate table1),...,sum(aggregate tableN)) Defines a measure object using precalculated aggregate tables.

Page 26: BO Interview Questions1

21.suppose my report is taking long time to refresh. how do u reduce the respone time (i mean how do u improve the performance) of the document.

**********RESOLUTION******Consider:

- number of variables brought back- number of calculations done in the report- length of the SQL- number of joins in universe

Equally important are:

- amount of free hard disk space (virtual memory)- amount of RAM available- number of other processes running on the client machine- network speed- specification of the server- number of simultaneous users on the network, server

Note: A good test for this is to copy the SQL generated by Business Objects and run that using a simple query tool like SQL*PLUS for Oracle. If this runs slowly, you likely have a hardware/network problem. Consider upgrading your network, server and client machine. If this method is significantly faster, try to reduce the number of calculations done in the report.

- Use Table Weighting. This defines the order in which the tables in the database are viewed during SQL generation.

Note: If you want to reverse the order in which BusinessObjects sorts tables, you must change a parameter in the relevant PRM file of the database.

Find the REVERSE_TABLE_WEIGHT parameter in the [Default] section of the PRM file.Change the parameter to read:REVERSE_TABLE_WEIGHT=N(If the line is not present, the default is Y.)

- Create pre-defined conditions in Designer- Create aggregate awareness tables- Streamline SQL. Use only the absolutely necessary bits of of SQL- Increase the Array fetch size for the universe connection in Designer, located under Tools > Parameters. Edit the connection and go to the Advanced tab.

Note: If this parameter is increased too much, then you may start receiving errors.

22.Tell me how do u calculate last 13weeks order amonut in a report?create document with exetended syntax.find revenue per week.U can dinamically select query whichever week u want

23.how do u know that each dataprovider has run in how much time, how many records fetched?In datamanager defination tab where you can see the time and date, rows, durationit took.

24.Tell me difference between global filters? give me scenario?A global filter affects the whole report. A Local filter only filters the data in the selected table, chart or crosstab.

Page 27: BO Interview Questions1

Global filter for the particular year or customer or product

25.what is drill-up, drill-down, drill-through?Drilling most general level data to most detail dataWhen you go Drill through it will show the objects which have the hierarchies . select the object on which you want to drill through.

Designer

23.what is the universe?where it is located? can i create the universe with two differnt datasources? when do u go for linking the universes?how do u link universe?to link universes what privileges u need to have?

Universe is a semantic layer between user module and a database. It consists of classes and objects.It is located in business object folder,userdocs,YesLinked universe. Are universes that share common components, one universe is said to be the kernel or master, while the others are the derived universes? The kernel universe are active universe are created from the same data account and the same rdbms. Kernel universe are exported and reimported at least once.Exported derived universes are located in the same universe domain as the kernel universe.*(All classes and objects are unique in both the kernel universe and the derived universe. (Otherwise, collision may occur. You are authorized to link the given universe.Note: a derived universe doesn’t recover the list of values containing personal data from the kernel universe. However, if you need control list of values, you can use the following create new objects defined in the same way as those in the kernel, the hide them. You can then assign them to these objects lists of values, which you can then modify and export.Linking a Universe to a User or GroupTo assign a universe to a user or group:1. Select a user or group in the User pane.The Link Universes dialog box is displayed. This dialog box lists all theuniverses available to the user or group you selected.2. Select the Link . Universe command from the Resource menu, or click thecorresponding button on the toolbar.Link Universe3. Select one or more universes. To select more than one universe, hold down theCtrl key while making your selections.4. Click OK.The name of the universe, and the universe domain in which it is stored, aredisplayed in the Universe tab of the Resource pane. Note that you may needto refresh this display by selecting the Refresh command from the View menu:to link universe

for linking universe one should have the supervisor privilages

26.what are different design patterns u followed while u designing the universe Schemas supported by designer:

f. * schema.g. Snowflake.h. Multi * schema.i. Normalized production.j. DW with aggregates.

Page 28: BO Interview Questions1

Task of the universe designer. Designing, creating and maintaining universes Distributing the universes.

f. Planning – breakdown the information system into functional areas.g. Analysis – analyze the information needs of users.h. Design – design a conceptual schema. Design the specification of a universe.i. Implementation – create a universe with designer.- Test the universe with Bo/webi.- Distribute the universe.- Repeat the above steps for other universe.

j. Maintenance – updates and maintains the universe. Notify end users of changes.

27.After creating the universe to go for over all check on the universe what option u can use in designer?After applying that what differetn problems u have got? tell me them.what is unknown cardinality? how do u resolve that?

Cardinality is nothing but relation between tables.

Check integrityLoops foundWhere you don’t have the join cardinalityBy using the context or alias.

28.when do u use refresh structure?When ever there is a change in the universe you need to refresh the structure ex. joins

29.Defference between user object & user variable?User object : Users can create user defined objects in BUSINESSOBJECTS from existing objects ina universe.If a user object can be useful to other users of a universe, you as the universedesigner, can insert the user object into the universe. It then becomes available toother users. For example, a user creates an object Sales Tax in a sales universe. Thismeasure object is defined with the following Select syntax:Sum ({Service\Price * 0.07})where 0.07 is the current sales tax rate.

Variable where we can give the formula and do the calculation.

30.Have u involved in aggregate awareness?in what scenario? what do u achive with it?It is used when you want to aggregate the data for the performance sake. Data lowest level is month. When you want the quarter wise or year wise report it has to do the aggregation and gives the results. So the performance will be low. To improve the performance we go for aggregate. Create the aggregate fact table for the year.

31.what are problems faced while designing the universes? how do u resolve them?I found the loops I resolved it by alias and contexts.

Page 29: BO Interview Questions1

32.Assume that u have not resolve the loops in universe then i f u run the query in the BO what error u will get?error:incompatible combination of objects

33.what are the advantages & disadvantages using aliasing & contexting?give me real scenario.In the end-user perspective how contexting effect?Context:When you go for context every time user has to select the path where he want to view the report.Alias: user can select the object and generate the report using the alias table.

34.what is the script?what do u do with script?Strategies: a strategy is a script that reads structural information for a database or flat files.Two types of strategies.

c. Built in strategy: for creating the components of universe.Universe parameters:

iv. Object creation strategy. Which tells designer how to define classes and objects automatically from the database tables and columns.

v. Join creation strategy. Which tells designer how to define joins automatically from the database’s tables and columns.

vi. Table browser strategy. Which tells designer how to dead the table and column structures from the database data dictionary.

d. External strategies. Files are declared in the STG section of. PRM files located in various RDBMS folders. Ex ORA7EN.PRM files.

35.what are three types of joins in BO available?when do u use short cut join and theta join?. Designer supports 4 types of joins.

e. Equi join = same column is present in both tables.f. Theta join: link tables based on a relationship other than quality between 2 columns.g. Outer join: links 2 tables, one of which has rows that do not match those in the

common columns of the other table.h. Shortcut join: can be used in schemas containing redundant join paths leading to the

same results, regardless of direction.

40.what is hierarchy? what is the importance of the hierarchies?defference between default & custom hierarchies?Hierarchies enable you to drill from one level of data to the next. Ex: geography: country, state, district, city. Product: category, type, vendor, and brand.Hierarchy is useful to drill through a default heirarchy from the base object in the query. Click on the hierarchy editor. A window appears withDefault hierarchy and cutomer hierarchyIn default heirarchy you can see all the classes , click on each class and click add to the cusomer hierarchy.Customer hierarchy after adding to customer hierarchy you can define the hierarchy levelTime= year, quarter,month, day.You can create your own hierarchy by clicking the button new and add objects from th default hierarchy.

41.explain about universe parameters?Definition||summary||strategies||control||sql||linksDatabase connection.A connection is a set of parameters that provides access to a database. A connection is made-up of 3 elements.

The network layer.(oracle client) The connection name and type(secured, shared, personal) The database location and account name.

Page 30: BO Interview Questions1

In summary tab, you can view the created dated, modified date, discreption of the universe, number of class,objects, tables,conditions,aliasesStrategy tab: Three Strategy are used to detect the joins and cardinalilties.Objects : built in strategy: create classes from table names and objects from column names . replaces ‘_’ with spaces. External strategy: class and objects

This strategy reads the database structure. It associate tables with classes as well as columns with objects

Joins: this strategy uses the key information to create the joins

Tables: reads the table structure from the database system tables.

Control tab: which limits the rows or report timing

Sql tab: this parameter control the query and sql generation options for this universe.

Like allow use of sub queries, allow use of union, intersect and minus operator

Link tab: click add link , where you need to select the other universe from which one universe is dynamically link to the other universe.

42. Can you export the universe to diff. Repositories?Yes, you can export the universe to multiple repositories. but not at a time. You need to export the universe to one repository at a time. yes, we can export the (same)univese universe to different repositories. bu t not at a time.one by one. somany times i have done this job in GE. there are TEST, DEVELOPMENT, PRODUCTION repositories. Actually supervisor can export the universes to repositories. but if u have export(given by supervisor) u can export.

)what is the difference globel filter and local filterA global filter affects the whole report. A Local filter only filters the data in the selected table, chart or crosstab.

2)how to monitor the perofrmance of reports and accessing the people withoutmeans without audit universe only client server architechtureYour reports run slowly. You want to know what you can do to increase the speed/performance of your report.

**********CAUSE**************Performance issues are specific to the local situation and report. It may be possible to fine tune your report and have it run more quickly.

**********RESOLUTION******Consider:

- number of variables brought back- number of calculations done in the report- length of the SQL- number of joins in universe

Equally important are:

Page 31: BO Interview Questions1

- amount of free hard disk space (virtual memory)- amount of RAM available- number of other processes running on the client machine- network speed- specification of the server- number of simultaneous users on the network, server

Note: A good test for this is to copy the SQL generated by Business Objects and run that using a simple query tool like SQL*PLUS for Oracle. If this runs slowly, you likely have a hardware/network problem. Consider upgrading your network, server and client machine. If this method is significantly faster, try to reduce the number of calculations done in the report.

- Use Table Weighting. This defines the order in which the tables in the database are viewed during SQL generation.

Note: If you want to reverse the order in which BusinessObjects sorts tables, you must change a parameter in the relevant PRM file of the database.

Find the REVERSE_TABLE_WEIGHT parameter in the [Default] section of the PRM file.Change the parameter to read:REVERSE_TABLE_WEIGHT=N(If the line is not present, the default is Y.)

- Create pre-defined conditions in Designer- Create aggregate awareness tables- Streamline SQL. Use only the absolutely necessary bits of of SQL- Increase the Array fetch size for the universe connection in Designer, located under Tools > Parameters. Edit the connection and go to the Advanced tab.

Note: If this parameter is increased too much, then you may start receiving errors.

3)all the users are not valid means including supervisor how u canrecover reports and universes

This is not the question i think check the

Any user can run Designer and Supervisor even if they are not supposed to, according to the repository. Resolution *****CONFIGURATION******Supervisor version 5.1.xBusinessObjects version 5.1.xWebIntelligence version 2.6.x

*********WARNING***********This resolution involves making a modification to the BusinessObjects repository. This is not an operation supported under normal procedures of BusinessObjects, therefore we recommend that this operation only be performed under the direction of Customer Support staff. Create a backup of the repository before making any changes.

***********SYMPTOMS*******Any user you create in Supervisor can run Designer and Supervisor, even if they are only regular users.

**********CAUSE**************

Page 32: BO Interview Questions1

The repository is corrupt and in the table OBJ_M_ACTOR there are two rows with id=1 and two rows with id=2.The id=1 corresponds to the root level group in the repository.The id=2 corresponds to the first General Supervisor created with the repository.

Any modification you do is performed on these twice as the update orders are done with the ID in the duplicated condition.Any selection on these rows (to check security rights for instance) retrieve two rows instead of only the one expected and prevent the restrictions from being applied correctly.

**********RESOLUTION******To repair your repository, manually modify the table OBJ_M_ACTOR and remove one of the two duplicated rows.Because the two rows are similar, there is no condition you can apply to differentiate them.The only way to perform that operation is to use ROWID, which is a hexadecimal index integrated into the tables to differentiate any rows.

Here are the steps to follow:1. Select "rowid" from OBJ_M_ACTOR where M_ACTOR_N_ID=1. This should give you two results.2. Delete from OBJ_M_ACTOR where "rowid" is equal to one of the two results you got.3. Follow steps one ("1") and two ("2") for M_ACTOR_N_ID=2.

After these operations, you should only have one row for each ID. You can then use Supervisor to perform a Scan and Repair of the repository to make sure that the data is coherent.

4)what is report burstingYou send a document to Broadcast Agent (BCA) from Reporter for a scheduled task. The task has the option "Refresh with the profile of each recipient"(Report Brusting) checked; however, when the recipient retrieves the document from their Inbox, it is observed that none of the universe restrictions (for example, Row Restrictions and Table Mapping) were applied to the report.

5)when we take into universe pane two tables from oracle product and sales ordersthese are not connected in universe but when we check the values of product it 's not showing but salesorders table values are showing why?This is wrong when we can refresh the universe structure then u can get the table valuessome times the product table to synonum then it wont come properly.

what is the reason?6)there is table contain 100 rows when i am creating reports i want to only 10 rows how to restrict?Go to designer and parameters we have the tools options there max results set make it has 10 and save the universe u can get the 10 rows only.

7)when i am opening a report it is taking 10 min time howto reduce time to 10sec what are settings we have to dothere is no aggregate tables

Ans: Your reports run slowly. You want to know what you can do to increase the speed/performance of your report.

Page 33: BO Interview Questions1

**********CAUSE**************Performance issues are specific to the local situation and report. It may be possible to fine tune your report and have it run more quickly.

**********RESOLUTION******Consider:

- number of variables brought back- number of calculations done in the report- length of the SQL- number of joins in universe

Equally important are:

- amount of free hard disk space (virtual memory)- amount of RAM available- number of other processes running on the client machine- network speed- specification of the server- number of simultaneous users on the network, server

Note: A good test for this is to copy the SQL generated by Business Objects and run that using a simple query tool like SQL*PLUS for Oracle. If this runs slowly, you likely have a hardware/network problem. Consider upgrading your network, server and client machine. If this method is significantly faster, try to reduce the number of calculations done in the report.

- Use Table Weighting. This defines the order in which the tables in the database are viewed during SQL generation.

Note: If you want to reverse the order in which BusinessObjects sorts tables, you must change a parameter in the relevant PRM file of the database.

Find the REVERSE_TABLE_WEIGHT parameter in the [Default] section of the PRM file.Change the parameter to read:REVERSE_TABLE_WEIGHT=N(If the line is not present, the default is Y.)

- Create pre-defined conditions in Designer- Create aggregate awareness tables- Streamline SQL. Use only the absolutely necessary bits of of SQL- Increase the Array fetch size for the universe connection in Designer, located under Tools > Parameters. Edit the connection and go to the Advanced tab.

Note: If this parameter is increased too much, then you may start receiving errors.

8)how can merge the two reports

If u can use the UNION for merge the report9)how you link the two reports r1 and r2

ANs;Here are the steps to follow:1. In Designer, right click on the Link object and select Object Properties. 2. Insert the following in the Select statement:'<a href="C:\Program Files\Business Objects\BusinessObjects 5.0\UserDocs\'+ Country.country+ '.rep">' +Country.country + '</a>'

Page 34: BO Interview Questions1

Note: This is MS Access format. For Oracle databases, use "||" for concatenation. For other databases, please check your database documentation.

3. Click OK. 4. Right click on the Link object and select Object Format. 5. Uncheck the option "Read As HTML" and then check the option "Read As HTML" again (because it was grayed out by default).6. In BusinessObjects, query your report, including the Link object.7. Save the report as HTML. 8. Open the HTML file in a web browser. In this case, you will see the country name as a link. Remember to save the designated report as country name. 9. Click on the link and the report opens in BusinessObjects

10)local and globel repository in business objects concept is there or not

Yes u can access the repository globaly

11)how we create nested prompts

ANs:Case When @Prompt('Which Value','A',{'A', 'F' , 'B'},mono,free) = 'A' Then Fact.Actual_SalesWhen @Prompt('Which Value','A',{'A', 'F' , 'B'},mono,free) = ' F' Then Fact.Forecast_SalesElse Fact.Budget_SalesEnd@Prompt('message','type',[{'value1'[,'value2',...]},class_nameobject_name'],mono/multi,free/constrained) Creates an object that prompts users to enter a specific value.

12)when you select product in report it will shows this product is sales some region like that report how we will createor is it possible i think with macro possible

I am not understand what u asking

13)is it possible to create new object in webi(5i)--no

14)what is the difference b/w zabo bo and thick client reportZero admin bo is the thin cleint application.Here are the differences Thick Client Thin client1.Ability to work offline Yes No

2.Software and middleware resides on client Yes No

3.Software and middleware resides on server No Yes

4.Operating Systems Yes No

5.Edit SQL Yes No

6.Radar and Polar No Yes

7.Tabled and Charted/Graphed Reports- samereport Yes No

Page 35: BO Interview Questions1

8.Multiple data access on same report - combinedqueries Yes No

9.Prompts within reports No Yes

10.Interactive on-screen report formatting Yes No

11.Report formatting prior to query No Yes

12.hyper-linked data support No Yes

13.Picture data representation No Yes

14.Data Alerter support Yes No

15.Data Ranking support Yes No

16.User defined data Yes No

17.User defined hierarcjies Yes No

18.Free-hand SQL generation Yes No

19.Personal data access Yes No

20.User defined conditions/filters Yes No

15)when we connect with singapur repository then we download the zabo bo thne is it possible to access the Europe rep reports

See the repository is in global why aggain two rep concept

eventhough if that is the case again u can take the login id of europe univ and get some reps.

16)How it is possible to create dept wise max,min and meadium valuesthere is a data provider contain depts and all the measure values

Medium u can apply the formula and max min u can apply group by

17) how .rep file stores

Reports are stored in repository as RECORDS. in OBJ_M_DOCUMENTS is the main table. There is another table OBJ_X_DOCUMENTS which store entire report in BINARY format (data type BLOB). Hyper link between reports using = "<a href=" & Char(34) & Char(46) & Char(46) & "/cust_detail/"&"cust_detail.htm" & Char(34) & ">" & <Customer(top 10 customer)>&"</a>"

= "<a href=" & Char(34) & Char(46) & Char(46) & "/top_10/"&"top_10.htm" & Char(34) & ">" &InitCap("top 10 customer") &"</a>"

Page 36: BO Interview Questions1

1.what is user object object?what is the scope of that.will this same as class object? if not how do u give access to ohter users? where it will store?ans: A universe consists primarily of classes and objects, created by the universedesigner. If the objects in a universe do not meet your needs, you can customizethe universe by creating your own objects, which are called user objects.

Why create a user object?Based on one or more existing objects, user objects enable you to:• Make calculations at the database level.• Apply functions to text, for example to capitalize data.• Group data.Here’s an example of a user object.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Example Obtaining total ordered revenue by creating a user objectTo obtain the revenue generated by an order, you create the Total user object withthe following formula:=Quantity Ordered*Product Pricewhere Quantity Ordered and Product Price are objects in your universe. Whenyou include the Total user object in a query, the calculation is made at the. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .database level and the calculated results appear in your report.

What does a user object consist of?A user object has a name, a type (character, date or numeric), a qualification(dimension, measure or detail) and a formula. The formula contains acombination of functions, objects, user objects, operators, and text.User objects are end-user personal objects that are not shared with other endusers.User objects are defined for each universe and stored on a local file insidethe “\Universe” folder. For example, when creating a user object on top of aspecific universe, say BEACH.UNIV, this user object will then be stored locallyon a file called the BEACH.UDO (inside the Universe folder).

What are the restrictions on user objects?You can work only with the user objects that you create yourself, and you cannotmove user objects from the User Objects class. Also, user objects are availableonly in the universe in which they were created.User objects are not shared. Reports that include user objects can only be viewedby other end-users. This is because user objects are stored locally in a specific userobject definition file. Other end-users, who do not have the same user objectdefinition file are not able to access the user object definitions. If an end-user triesto refresh or edit a query that contains another user’s user objects, the user objectsare automatically removed from the query and report.Despite these restrictions, the universe designer can turn user objects into regularobjects, which can be made available in other universes, and for other users.Note: Scheduling reports containing user objects is not a supported feature. Userobjects are removed when the report is refreshed. For more information refer tothe InfoView User’s Guide.

How can an end-user share user objects with other users?If an end-user wants to share user objects with other users, they should ask theuniverse designer to include these user objects in the related universe in order tomake them available to all BUSINESSOBJECTS end-users. The universe designerincludes the file UNIVERSE_NAME.UDO in the universes where the user objectsare to be used.

Page 37: BO Interview Questions1

2.what three different key files available?which file contain what?

The .lsi, .rkey, and .key files created on the server by the WIQT aredownloaded to the client.• The .lsi file contains the user’s security information, profile, commandrestrictions and authorized documents and universes.• The .rkey contains the address of the WEBINTELLIGENCE server the user isconnected to. The .rkey indicates that the repository is accessed through aweb connection.• The .key contains the address of the security domain.Updated versions of these files are downloaded to the client each time the userconnects to the WEBINTELLIGENCE server.

3.what is the internal process happening when u export the document to repository?When document publish to the repository it store in the document domain as a records in obj_m_documents in the main table. There is another table obj_x_documents which stores entire report in binary format (data type blob).

4.what is offline mode of opening the BO?when u open the BO offline they can be opened but with out connection with repository.then how is user validations done.Mode of operation for DESIGNER when you are notconnected to a repository.• Only available if you have previously connected inonline mode.• In offline mode you can open universes that arestored on your local computer only if thoseuniverses have been opened previously in onlinemode.• You can access databases where the connection andsecurity information are stored on your localmachine (personel and shared connections).• You can use offline mode when you do not haveaccess to the repository, for example when workingwith a laptop off site, or when the network is notavailable.

5.what is the report bursting?

Report bursting is to refresh the document with each use profiles. It automatically generates a version of a document based on the profile of each person who will receive it. This may have substantial impact on system performance. This type of filtering the data and sending to the concerned user based on the profile.

6.what is the report linking? how do u that? tell me formula?what is happening when you linking the reports/1. In Designer, right click on the Link object and select Object Properties. 2. Insert the following in the Select statement:'<a href="C:\Program Files\Business Objects\BusinessObjects 5.0\UserDocs\'+ Country.country+ '.rep">' +Country.country + '</a>'

Note: This is MS Access format. For Oracle databases, use "||" for concatenation. For other databases, please check your database documentation.

3. Click OK.

Page 38: BO Interview Questions1

4. Right click on the Link object and select Object Format. 5. Uncheck the option "Read As HTML" and then check the option "Read As HTML" again (because it was grayed out by default).6. In BusinessObjects, query your report, including the Link object.7. Save the report as HTML. 8. Open the HTML file in a web browser. In this case, you will see the country name as a link. Remember to save the designated report as country name. 9. Click on the link and the report opens in BusinessObjects

7.suppose i want to order amounts of the of defferent business for current month,current ytd,previous year same month order amount, previous year ytd in the szme report how do u do?8.suppose i want to view the business order and sales amount breaking the different view points like business wise, region wise, district wise what do u do? and apart from this if possible how do i view a summurized aggregated report what do u do?9.assume that in a report there one dataprovider having month and yere as the prompts.i want to show the current month and year on the top of the reports on the dinamically.

10.suppose assume that i have four data providers in a report. how BO can combine these four data providers?It automatically does or in view data there is an option called link to

11.where are the key files can be located? what is global repositories? 12.how do you take an excel version of BO report either in the BO or in the webiintelligence?Personal data files (DP)13.what are the complex functions u have used so far? if i use variance formula some times 'devide by error' envountered in the report.how do u track the problem and highlight situation?

14.what is info view, zabo, can we create report using info view? what are defferent types of documents? how do i switch to different options to create the reports in webi?15.if i want to give access my report to multiple users what do i need to set?Publish to corporate document. Or sent to users.16.what is report mearging?Using union in query panel

17.how do u set current date, last refresing date on the top of the report?Select Insert—special field – date and time--- current date refreshing date

18.is it possible to combine two different dataproviders with two different data sources in one documet.Yes. Select an ooption – access the data in different way. And select others where you can select other than the universe data provider. 19. is it possible to combine two different data providers from two different universes?Yes , select ooption--- access the data in diff way and select the universe ooption and select universe name

20.Tell me few build-in functions available in BO? difference between @variable & @prompt function.@prompt where you select the given values which has been specified in the function.@Prompt('message','type',[{'value1'[,'value2',...]},class_nameobject_name'],mono/multi,free/constrained) Creates an object that prompts users to enter a specific value.@Script('variable','type','script name') Recovers the results of an executed script created in the BusinessObjects module.@Select(classname\objectname) Inserts the SQL Select definition of a previously defined object.@Variable('myname') References the value assigned to a prompt or variable.@Where(classname\objectname)Inserts the SQL Where definition of a previously defined object.

Page 39: BO Interview Questions1

@Aggregate_Aware(sum(aggregate table1),...,sum(aggregate tableN)) Defines a measure object using precalculated aggregate tables.

21.suppose my report is taking long time to refresh. how do u reduce the respone time (i mean how do u improve the performance) of the document.

**********RESOLUTION******Consider:

- number of variables brought back- number of calculations done in the report- length of the SQL- number of joins in universe

Equally important are:

- amount of free hard disk space (virtual memory)- amount of RAM available- number of other processes running on the client machine- network speed- specification of the server- number of simultaneous users on the network, server

Note: A good test for this is to copy the SQL generated by Business Objects and run that using a simple query tool like SQL*PLUS for Oracle. If this runs slowly, you likely have a hardware/network problem. Consider upgrading your network, server and client machine. If this method is significantly faster, try to reduce the number of calculations done in the report.

- Use Table Weighting. This defines the order in which the tables in the database are viewed during SQL generation.

Note: If you want to reverse the order in which BusinessObjects sorts tables, you must change a parameter in the relevant PRM file of the database.

Find the REVERSE_TABLE_WEIGHT parameter in the [Default] section of the PRM file.Change the parameter to read:REVERSE_TABLE_WEIGHT=N(If the line is not present, the default is Y.)

- Create pre-defined conditions in Designer- Create aggregate awareness tables- Streamline SQL. Use only the absolutely necessary bits of of SQL- Increase the Array fetch size for the universe connection in Designer, located under Tools > Parameters. Edit the connection and go to the Advanced tab.

Note: If this parameter is increased too much, then you may start receiving errors.

22.Tell me how do u calculate last 13weeks order amonut in a report?

23.how do u know that each dataprovider has run in how much time, how many records fetched?In datamanager difination tab where you can see the time and date, rows, durationit took.

24.Tell me difference between global filters? give me scenario?A global filter affects the whole report. A Local filter only filters the data in the selected table, chart or crosstab.

Page 40: BO Interview Questions1

Global filter for the particular year or customer or product

25.what is drill-up, drill-down, drill-through?Drilling most general level data to most detail data

Designer

23.what is the universe?where it is located? can i create the universe with two differnt datasources? when do u go for linking the universes?how do u ling universe?to link universes what privileges u need to have?26.what are different design patterns u followed while u designing the universe27.After creating the universe to go for over all check on the universe what option u can use in designer?After applying that what differetn problems u have got? tell me them.what is unikkonw cardinality? how do u resolve that?28.when do u use refresh structure?29.Defference between user object & user variable?30.Have u involved in aggregate awareness?in what scenario? what do u achive with it?31.what are problems faced while designing the universes? how do u resolve them?32.Assume that u have not resolve the loops in universe then i f u run the query in the BO what error u will get?33.what are the advantages & disadvantages using aliasing & contexting?give me real scenario.In the end-user perspective how contexting effect?34.what is the script?what do u do with script?35.what are three types of joins in BO available?when do u use short cut join and theta join?40.what is hierarchy? what is the importance of the hierarchies?defference between default & custom hierarchies?41.explain about universe parameters?

Creating .CSV file Prompt weekno,

SELECT weekno ||','|| dyn_sector ||','|| dyn_subsector ||','|| dyn_LE ||','|| dyn_SAC ||','|| dyn_lob ||','|| stat_sector ||','|| stat_subsector ||','|| stat_LE ||','|| stat_SAC ||','|| stat_lob ||','|| sales_channel ||','|| pro_code ||','|| prod_grp ||','|| cust_type ||','|| qty ||','|| overall_chrg ||','|| contract_rev ||','|| maint_chrg ||','|| rental_chrg ||','|| sales_chrg

Page 41: BO Interview Questions1

FROM scors_headline_report;

The DECODE Statement

One of the most powerful and overlooked SQL statements is the DECODE statement. The DECODE statement has the following syntax:

DECODE(val, exp1, exp2, exp3, exp4, ..., def);

DECODE will first evaluate the value or expression val and then compare expression exp1 to val. If val equals exp1, expression exp2 will be returned. If val does not equal exp1, expression exp3 will be evaluated and returns expression exp4 if val equals exp3. This process continues until all expressions have been evaluated. If there are no matches, the default def will be returned.

SELECT e.first_name,

e.last_name,

e.job_title,

DECODE(e.job_title, 'President', '******', e.salary)

FROM emp e

WHERE e.emp_id in (SELECT NVL(z.manager_id, e.emp_id)

FROM emp z);

In this example, all manager names will be retrieved with their salaries. When the row identifying the president is displayed, show '******' instead of his salary. Also notice the NVL function used to evaluate a null manager ID. Only the president will have a null manager ID, which would not have been retrieved without the NVL.

Also notice that DECODE is evaluating job_title and returning salary, which would normally be a data type mismatch since the job title and salary columns are different data types but is okay here.

SELECT e.first_name,

e.last_name,

e.job_title,

e.salary

FROM emp e

WHERE DECODE(USER,'PRES',e.emp_id,

UPPER(e.last_name),e.emp_id, 0) = e.emp_id ;

In this example, if the user is the president, all employees will be returned with their corresponding salary. For all other users, only one row will be retrieved, enabling the user to see his or her own salary only.

SELECT e.first_name,

e.last_name,

e.job_title,

Page 42: BO Interview Questions1

DECODE(USER,'ADMIN',DECODE(e.job_title, 'PRESEDENT', '*****', e.salary),

'PRES', e.salary, '******')

FROM emp e

WHERE e.emp_id in (SELECT NVL(z.manager_id, e.emp_id)

FROM emp z);

In this example, the DECODE statement is nested with another DECODE statement. If the Oracle user is 'ADMIN', show the salaries except for the president's salary. If the Oracle user is 'PRES', show all salaries and if the user is anybody else, return '******'.

Another place the DECODE statement can be used is in the ORDER BY clause. The next example will sort the output in such a way that the president is the first row returned followed by the departments 'SALES', 'ADMIN', and then 'IS' with their corresponding employees.

SELECT d.name,

e.job_title,

e.first_name,

e.last_name

FROM emp e,

dept d

WHERE d.dept_no = e.dept_no

ORDER BY DECODE(e.job_title,'PRESIDENT', 0,

DECODE(d.name,'SALES', 1,

'ADMIN', 2, 3)), e.last_name;

This example does not ORDER BY e.job_title but uses this column to search for the title 'PRESIDENT' and returns a 0. For all other rows, another DECODE is used to evaluate the department name and returning numbers 1, 2, or 3 depending upon what the department name is. After the DECODEs are finished, the data is further sorted by employee last name e.last_name.

Performance Tuning SQL Server Joins

One of the best ways to boost JOIN performance is to limit how many rows need to be JOINed. This is especially beneficial for the outer table in a JOIN. Only return absolutely only those rows needed to be JOINed, and no more. [6.5, 7.0, 2000] Updated 6-6-2003

*****

If you perform regular joins between two or more tables in your queries, performance will be optimized if each of the joined columns have their own indexes. This includes adding indexes to the columns in each table used to join the tables. Generally speaking, a clustered key is better than a non-clustered key for optimum JOIN performance. [6.5, 7.0, 2000] Updated 6-6-2003

Page 43: BO Interview Questions1

*****

If you have two or more tables that are frequently joined together, then the columns used for the joins on all tables should have an appropriate index.

If the columns used for the joins are not naturally compact, then considering adding surrogate keys to the tables that are compact in order to reduce the size of the keys, thus decreasing read I/O during the join process, increasing overall performance. [6.5, 7.0, 2000] Updated 8-14-2003

*****

JOIN performance has a lot to do with how many rows you can stuff in a data page. For example, let's say you want to JOIN two tables. Most likely, one of these two tables will be smaller than the other, and SQL Server will most likely select the smaller of the two tables to be the inner table of the JOIN. When this happens, SQL Server tries to put the relevant contents of this table into the buffer cache for faster performance. If there is not enough room to put all the relevant data into cache, then SQL Server will have to use additional resources in order to get data into and out of the cache as the JOIN is performed.

If all of the data can be cached, the performance of the JOIN will be faster than if it is not. This comes back to the original statement, that the number of rows in a table can affect JOIN performance. In other words, if a table has no wasted space, it is much more likely to get all of the relevant inner table data into cache, boosting speed. The moral to this story is to try to get as much data stuffed into a data page as possible. This can be done through the use of a high fillfactor, rebuilding indexes often to get rid of empty space, and to optimize datatypes and widths when creating columns in tables. [6.5, 7.0, 2000] Added 6-6-2003

*****

Keep in mind that when you create foreign keys, an index is not automatically created at the same time. If you ever plan to join a table to the table with the foreign key, using the foreign key as the linking column, then you should consider adding an index to the foreign key column. An index on a foreign key column can substantially boost the performance of many joins. [6.5, 7.0, 2000] Added 2-8-2002

*****

Avoid joining tables based on columns with few unique values. If columns used for joining aren?t mostly unique, then the SQL Server optimizer may not be able to use an existing index in order to speed up the join. Ideally, for best performance, joins should be done on columns that have unique indexes. [6.5, 7.0, 2000] Updated 8-14-2003

*****

For best join performance, the indexes on the columns being joined should be numeric data types, not CHAR or VARCHAR, or other non-numeric data types. The overhead is lower and join performance is faster. [6.5, 7.0, 2000] Updated 8-14-2003

*****

For maximum performance when joining two or more tables, the indexes on the columns to be joined should have the same data type, and ideally, the same width.

This also means that you shouldn't mix non-Unicode and Unicode datatypes when using SQL Server 7.0 or later. (e.g. VARCHAR and NVARCHAR). If SQL Server has to implicitly convert the data types to perform the join, this not only slows the joining process, but it also could mean that SQL Server

Page 44: BO Interview Questions1

may not use available indexes, performing a table scan instead. [6.5, 7.0, 2000] Updated 6-6-2003

*****

When you create joins using Transact-SQL, you can choose between two different types of syntax: either ANSI or Microsoft. ANSI refers to the ANSI standard for writing joins, and Microsoft refers to the old Microsoft style of writing joins. For example:

ANSI JOIN Syntax

SELECT fname, lname, departmentFROM names INNER JOIN departments ON names.employeeid = departments.employeeid

Former Microsoft JOIN Syntax

SELECT fname, lname, departmentFROM names, departmentsWHERE names.employeeid = departments.employeeid

If written correctly, either format will produce identical results. But that is a big if. The older Microsoft join syntax lends itself to mistakes because the syntax is a little less obvious. On the other hand, the ANSI syntax is very explicit and there is no chance you can make a mistake.

For example, I ran across a slow-performing query from an ERP program. After reviewing the code, which used the Microsoft JOIN syntax, I noticed that instead of creating a LEFT JOIN, the developer had accidentally created a CROSS JOIN instead. In this particular example, less than 10,000 rows should have resulted from the LEFT JOIN, but because a CROSS JOIN was used, over 11 million rows were returned instead. Then the developer used a SELECT DISTINCT to get rid of all the unnecessary rows created by the CROSS JOIN. As you can guess, this made for a very lengthy query. Unfortunately, all I could do was notify the vendor's support department about it.

The moral of this story is that you probably should be using the ANSI syntax, not the old Microsoft syntax. Besides reducing the odds of making silly mistakes, this code is more portable between database, and eventually, I imagine Microsoft will eventually stop supporting the old format, making the ANSI syntax the only option. [6.5, 7.0, 2000] Updated 8-14-2003

*****

If you have to regularly join four or more tables to get the recordset you need, consider denormalizing the tables so that the number of joined tables is reduced. Often, by adding one or two columns from one table to another, the number of joins can be reduced, boosting performance. [6.5, 7.0, 2000] Updated 8-14-2003

*****

If your join is slow, and currently includes hints, remove the hints to see if the optimizer can do a better job on the join optimization than you can. This is especially important if your application has been upgraded from version 6.5 to 7.0, or from 7.0 to 2000. [6.5, 7.0, 2000] Updated 8-14-2003

*****

One of the best ways to boost JOIN performance is to ensure that the JOINed tables include an appropriate WHERE clause to minimize the number of rows that need to be JOINed.

For example, I have seen many developers perform a simple JOIN on two tables, which is not all that unusual. The problem is that each table may contain over a million rows each. Instead of just JOINing the tables, appropriate restrictive clauses needed to be added to the WHERE clause of

Page 45: BO Interview Questions1

each table in order to reduce the total number of rows to be JOINed. This simple step can really boost the performance of a JOIN of two large tables. Added 8-14-2003

*****

In the SELECT statement that creates your JOIN, don't use an * (asterisk) to return all of the columns in both tables. This is bad form for a couple of reasons. First, you should only return those columns you need, as the less data you return, the faster your query will run. It would be rare that you would need all of the columns in all of the tables you have joined. Second, you will be returning two of each column used in your JOIN condition, which ends up returning way more data that you need, and hurting performance.

Take a look at these two queries:

USE NorthWindSELECT *FROM OrdersINNER JOIN [Order Details]ON Orders.OrderID = [Order Details].OrderID

or

USE NorthWindSELECT Orders.OrderID, Orders.OrderDate,      [Order Details].UnitPrice, [Order Details].Quantity,      [Order Details].DiscountFROM OrdersINNER JOIN [Order Details]ON Orders.OrderID = [Order Details].OrderID

Both of these queries perform essentially the same function. The problem with the first one is that it returns not only too many columns (the aren't all needed by the application), but the OrderID column is returned twice, which doesn't provide any useful benefits. Both of these problems contribute to unnecessary server overhead, hurting performance. The moral of this story is never to use the * in your joins. [6.5, 7.0, 2000] Added 1-19-2001

*****

While high index selectivity is generally an important factor that the Query Optimizer uses to determine whether or not to use an index, there is one special case where indexes with low selectivity can be useful speeding up SQL Server. This is the case for indexes on foreign keys. Whether an index on a foreign key has either high or low selectivity, an index on a foreign key can be used by the Query Optimizer to perform a merge join on the tables in question. A merge join occurs when a row from each table is taken and then they are compared to see if they match the specified join criteria. If the tables being joined have the appropriate indexes (no matter the selectivity), a merge join can be performed, which is generally much faster than a join to a table with a foreign key that does not have an index. [7.0, 2000] Added 4-9-2001

*****

For very large joins, consider placing the tables to be joined in separate physical files in the same filegroup. This allows SQL Server to spawn a separate thread for each file being accessed, boosting performance. [6.5, 7.0, 2000]

*****

Page 46: BO Interview Questions1

Don't use CROSS JOINS, unless this is the only way to accomplish your goal. What some inexperienced developers do is to join two tables using a CROSS JOIN, then they use either the DISTINCT or the GROUP BY clauses to "clean up" the mess they have created. This, as you might imagine, can be a huge waste of SQL Server resources. [6.5, 7.0, 2000] Added 11-28-2000

*****

If you have the choice of using a JOIN or a subquery to perform the same task, generally the JOIN (often an OUTER JOIN) is faster. But this is not always the case. For example, if the returned data is going to be small, or if the are no indexes on the joined columns, then a subquery may indeed be faster.

The only way to really know for sure is to try both methods and then take a look at their query plans. If this operation is run often, you should seriously consider writing the code both ways, and selecting the code that is most efficient. [6.5, 7.0, 2000] Updated 9-12-2001

*****

We have a query that contains two subselects containing an aggregate function (SUM, Count, etc.) in the SELECT part. The query was performing sluggishly. We were able to isolate the problem down to the aggregate function in the subselect.

To rectify the problem, we reorganized the query so that there was still an aggregate function in the SELECT part, but replaced the subselects with a series of JOINS. The query executed much faster.

So, if this holds true -- developers, as a rule, should use JOINS in lieu of subselects when the subselect contains aggregate functions. [7.0, 2000] Tip provided by Silverscape Technologies, Inc (www.silverscape.net) Added 12-5-2001

*****

If you have a query with many joins, one alternative to denormalizing a table to boost performance is to use an Indexed View to pre-join the tables. An Indexed View, which is only available from SQL Server 2000 Enterprise Edition, allows you to create a view that is actually a physical object that has its own clustered index. Whenever a base table of the Indexed View is updated, the Indexed View is also updated. As you can imagine, this can also reduce INSERT, UPDATE, and DELETE performance on the base tables. You will have to perform tests, comparing the pros and cons of performance in order to determine whether or not using an Indexed View to avoid joins in query is worth the extra performance cost caused by using them. [2000] Added 2-11-2002

*****

If you have a query that use a LEFT OUTER JOIN, check it carefully to be sure that is the type of join you really want to use. As you may know, a LEFT OUTER JOIN is used to create a result set that includes all of the rows from the left table specified in the clause, not just the ones in which the joined columns match. In addition, when a row in the left table has no matching rows in the right table, the result set row contains NULL values for all the selected columns coming from the right table. If this is what you want, then use this type of  join.

The problem is that in the real world, a LEFT OUTER JOIN is rarely needed, and many developers use them by mistake. While you may end up with the data you want, you may also end up with more than the data you want, which contributes to unnecessary overhead and poor performance. Because of this, always closely examine why you are using a LEFT OUTER JOIN in your queries, and only use them if they are exactly what you need. Otherwise, use a JOIN that is more appropriate to your needs. [6.5, 7.0, 2000] Added 3-27-2002

Page 47: BO Interview Questions1

*****

If you are having difficulty tuning the performance of a poorly performing query that has one or more JOINs, check to see if they query plan created by the query optimizer is using a hash join. When the query optimizer is asked to join two tables that don't have appropriate indexes, it will often perform a hash join.

A hash join is resource intensive and can slow the performance of your join. If the query in question is run often, you should consider adding appropriate indexes. For example, if you are joining column1 in table1 to column5 in table2, then column1 in table1 and column5 in table2 need to have indexes.

Once indexes are added to the appropriate columns used in the joins in your query, the query optimizer will most likely be able to use these indexes, performing a nested-loop join instead of a hash join, and performance will be improved. [7.0, 2000]

Top 3

select ID ,item_id,price from (select RowNum as ID ,item_id,price from (select rownum ,item_id,price from items order by price desc )) where ID <=3