Saturday, April 17, 2010

What's New in .NET Framework 3.5 SP 1

.NET Compact Framework

The .NET Compact Framework version 3.5 expands support for distributed mobile applications by including the Windows Communication Foundation (WCF) technology. It also adds new language features such as LINQ, new APIs based on community feedback, and improves debugging with updated diagnostic tools and features.

For details about these new features and enhancements, see What's New in the .NET Compact Framework Version 3.5.
ASP.NET

The .NET Framework 3.5 includes enhancements in targeted areas of ASP.NET and Visual Web Developer. The most significant advance is improved support for the development of AJAX-enabled Web sites. ASP.NET supports server-centric AJAX development with a set of new server controls and APIs. You can enable an existing ASP.NET 2.0 page for AJAX by adding a ScriptManager control and an UpdatePanel control so that the page can update without requiring a full page refresh.

ASP.NET also supports client-centric AJAX development with a new client library called the Microsoft AJAX Library. The Microsoft AJAX Library supports client-centric, object-oriented development, which is browser-independent. By using the library classes in your ECMAScript (JavaScript) you can enable rich UI behaviors without roundtrips to the server. You can mix the degree of server-centric and client-centric development to meet the needs of your application. Furthermore, Visual Web Developer includes improved IntelliSense support for JavaScript and support for the Microsoft AJAX Library.

ASP.NET and Visual Web Developer now support the creation of both ASMX and WCF-based Web services and the seamless use of either implementation from Web pages using Microsoft AJAX Library. Furthermore, server-side application services including forms authentication, roles management, and profiles are now exposed as Web services that can be consumed in WCF-compatible applications, including client script and Window Forms clients. ASP.NET enables all Web-based applications to share these common application services.

Other improvements in ASP.NET include a new data control, ListView, for displaying data; a new data source control, LinqDataSource, that exposes Language Integrated Query (LINQ) to Web developers through the ASP.NET data source control architectures; a new tool, ASP.NET Merge Tool (Aspnet_merge.exe), for merging precompiled assemblies; and tight integration with IIS 7.0. ListView is a highly customizable control (using templates and styles) that also supports edit, insert, and delete operations, as well as sorting and paging functionality. The paging functionality for ListView is provided by a new control called DataPager. You can use the merge tool to combine assemblies to support a range of deployment and release management scenarios. The integration of ASP.NET and IIS 7.0 includes the ability to use ASP.NET services, such as authentication and caching, for any content type. It also includes the ability to develop server pipeline modules in ASP.NET managed code and supports unified configuration of modules and handlers.

Other improvements in Visual Web Developer include multitargeting support, inclusion of Web Application Projects, a new Design view, new Cascading Style Sheets (CSS) design tools, and support for LINQ for SQL databases. Multitargeting enables you to use Visual Web Developer to target development of Web applications to specific versions of the .NET Framework, including versions 2.0, 3.0, and 3.5.

Add-Ins and Extensibility

The System.AddIn.dll assembly in the .NET Framework 3.5 provides powerful and flexible support to developers of extensible applications. It introduces a new architecture and model that helps developers with the initial work to add extensibility to an application and by ensuring that their extensions continue working as the host application changes. The model provides the following features:

*Discovery

You can easily find and manage sets of add-ins in multiple locations on a computer with the AddInStore class. You can use this class to search for and obtain information about add-ins by their base types without having to load them.

*Activation

After an application chooses an add-in, the AddInToken class makes it easy to activate. Simply choose the isolation and sandboxing level and the system takes care of the rest.

*Isolation

There is built-in support for application domains and process isolation of add-ins. The isolation level for each add-in is in the control of the host. The system handles loading application domains and processes and shutting them down after their add-ins have stopped running.

*Sandboxing

You can easily configure add-ins with either a default or customized trust level. Support includes Internet, Intranet, Full Trust, and “same-as-host” permission sets, as well as overloads that let the host specify a custom permission set.

*UI Composition

The add-in model supports direct composition of Windows Presentation Foundation (WPF) controls that span application domain boundaries. You can easily allow add-ins to contribute directly to the UI of the host while still retaining the benefits of isolation, ability to unload, sandboxing, and versioning.

*Versioning

The add-in architecture makes it possible for hosts to introduce new versions of their object model without breaking existing add-ins or impacting the developer experience for new ones.

Common Language Runtime
Collections

HashSet(Of T) provides high performance set operations to the .NET Framework. A set is a collection that contains no duplicate elements, and whose elements are in no particular order. For more information, see HashSet Collection Type.
Diagnostics

The EventSchemaTraceListener class provides tracing of end-to-end, schema-compliant events. You can use end-to-end tracing for a system that has heterogeneous components that cross thread, AppDomain, process, and computer boundaries. A standardized event schema (see Event Representation for Event Consumers) has been defined to enable tracing across these boundaries. This schema is shared by various tracing technologies, including Windows Vista diagnostics tools such as Event Viewer. The schema also enables the addition of custom, schema-compliant elements.

The EventSchemaTraceListener class is tuned for logging performance with implicit support for lock-free tracing.
I/O and Pipes

Pipes provide interprocess communication between any processes running on the same computer, or on any other Windows computer within a network. The .NET Framework provides access to two types of pipes: anonymous pipes and named pipes. For more information about pipes, see Pipes.
Garbage Collection

The GCSettings class has a new LatencyMode property that you can use to adjust the time that the garbage collector intrudes in your application. You set this property to one of the values of the new GCLatencyMode enumeration.

The GC class has a new Collect(Int32, GCCollectionMode) method overload that you can use to adjust the behavior for a forced garbage collection. For example, you can use this overload to specify that the garbage collector should determine whether the current time is optimal to reclaim objects. This overload takes a value from the new GCCollectionMode enumeration.
Reflection and Reflection Emit in Partial Trust

Assemblies that run with partial trust can now emit code and execute it. Emitted code that calls only public types and methods needs no permissions beyond the permissions demanded by the types and methods that are accessed. The new
DynamicMethod(String, Type, Type())
constructor makes it easy to emit such code.

When emitted code needs to access private data, the new
DynamicMethod(String, Type, Type(), Boolean)
constructor allows restricted access. The host must grant ReflectionPermission with the new RestrictedMemberAccess flag to enable this feature, which gives emitted code the ability to access private data only for types and methods in assemblies with equal or lesser trust levels. See Walkthrough: Emitting Code in Partial Trust Scenarios.

For reflection, a host grant of RestrictedMemberAccess similarly allows restricted use of methods that access private properties, call private methods, and so on, but only for target assemblies with equal or lesser trust levels.
Threading
Better Reader/Writer Lock

The new ReaderWriterLockSlim class provides performance that is significantly better than ReaderWriterLock, and comparable with the lock statement (SyncLock in Visual Basic). Transitions between lock states have been simplified to make programming easier and to reduce the chances of deadlocks. The new class supports recursion to simplify migration from lock and from ReaderWriterLock.
ThreadPool Performance Enhancements

Throughput for the dispatch of work items and I/O tasks in the managed thread pool is significantly improved. Dispatch is now handled in managed code, without transitions to unmanaged code and with fewer locks. The use of ThreadPool is recommended over application-specific thread pool implementations.
Time Zone Improvements

Two new types, DateTimeOffset and TimeZoneInfo, improve support for time zones and make it easier to develop applications that work with dates and times in different time zones. For a discussion of which type to use in particular situations, see Choosing Between DateTime, DateTimeOffset, and TimeZoneInfo.
TimeZoneInfo

The new TimeZoneInfo class largely supplants the existing TimeZone class. You can use TimeZoneInfo to retrieve any time zone defined in the registry, rather than just the local time zone and Coordinated Universal Time (UTC). You can also use this class to define custom time zones, to serialize and deserialize custom time zone data, and to convert times between time zones. For more information about developing applications that use the TimeZoneInfo class, see Times and Time Zones.
DateTimeOffset

The new DateTimeOffset structure extends the DateTime structure to make working with times across time zones easier. The DateTimeOffset structure stores date and time information as a UTC date and time together with an offset value that indicates how much the time differs from UTC.

Networking

Peer-to-Peer Networking

Peer-to-peer networking is a serverless networking technology that allows several network devices to share resources and communicate directly with each other. The System.Net.PeerToPeer namespace provides a set of classes that support the Peer Name Resolution Protocol (PNRP) that allows the discovery of other peer nodes through PeerName objects registered within a peer-to-peer cloud. PNRP can resolve peer names to IPv6 or IPv4 IP addresses.

Windows Communication Foundation
WCF and WF Integration—Workflow Services

The .NET Framework 3.5 unifies the Windows Workflow Foundation (WF) and Windows Communication Foundation (WCF) frameworks so that you can use WF as a way to author WCF services or expose your existing WF workflow as a service. This enables you to create services that can be persisted, can easily transfer data in and out of a workflow, and can enforce application-level protocols. For code samples, see Workflow Services Samples.
Durable Services

The .NET Framework 3.5 also introduces support for WCF services that use the WF persistence model to persist the state information of the service. These durable services persist their state information on the application layer, so that if a session is torn down and re-created later, the state information for that service can be reloaded from the persistence store.
WCF Web Programming Model

The WCF Web Programming Model enables developers to build Web-style services with WCF. The Web Programming Model includes rich URI processing capability, support for all HTTP verbs including GET, and a simple programming model for working with a wide variety of message formats (including XML, JSON, and opaque binary streams). For more information, see WCF Web Programming Model Overview.
WCF Syndication

WCF now includes a strongly typed object model for processing syndication feeds, including both the Atom 1.0 and RSS 2.0 formats. For more information, see WCF Syndication. For code samples, see Syndication Samples.
WCF and Partial Trust

In .NET Framework 3.5, applications running with reduced permissions can use a limited subset of WCF features. Server applications running with ASP.NET Medium Trust permissions can use the WCF Service Model to create basic HTTP services. Client applications running with Internet Zone permissions (such as XAML Browser Applications or unsigned applications deployed with ClickOnce) can use the WCF proxies to consume HTTP services. In addition, the WCF Web Programming Model features (including AJAX and Syndication) are available for use by partially trusted applications. For more information.

Windows Presentation Foundation


In the .NET Framework 3.5, Windows Presentation Foundation contains changes and improvements in numerous areas, including versioning, the application model, data binding, controls, documents, annotations, and 3-D UI elements.


Windows Workflow Foundation
WCF and WF Integration—Workflow Services

The .NET Framework 3.5 unifies the Windows Workflow Foundation (WF) and Windows Communication Foundation (WF) frameworks so that you can use WF as a way to author WCF services or expose your existing WF workflow as a service. This enables you to create services that can be persisted, can easily transfer data in and out of a workflow, and can enforce application-level protocols.

LINQ

Language-Integrated Query (LINQ) is a new feature in Visual Studio 2008 and the .NET Framework 3.5. LINQ extends powerful query capabilities to the language syntax of C# and Visual Basic in the form of standard, easily-learned query patterns. This technology can be extended to support potentially any kind of data store. The .NET Framework 3.5 includes LINQ provider assemblies that enable the use of LINQ for querying .NET Framework collections, SQL Server databases, ADO.NET Datasets, and XML documents.


Expression Trees


Expression trees are new in the .NET Framework 3.5, and provide a way to represent language-level code in the form of data. The System.Linq.Expressions namespace contains the types that are the building blocks of expression trees. These types can be used to represent different types of code expressions, for example a method call or an equality comparison.

Tuesday, March 16, 2010

Interview Question and answer of SQL Server 2005 and C#.net

Q.1) The Cursor Stored Procedures are.........- 2 true choices.
A. sp_describe_column
B. sp_indexs
C. sp_primarykeys
D. sp_cursor_list
E. A and D

Q.2) All information about tables in user Database is stored in a set of tables called the System catalog.that can be accessed using........- 1 true choice.
A. Security Stored Procedures
B. Catalog Stored Procedures
C. Distributed Query Stored Procedures
D. A and B
E. User-define Stored Procedures

Q.3) Where are Catalog Stored Procedures?-2 true choices
A. sp_column
B. sp_addalias
C. sp_describe_cursor
D. sp_database and sp_statistics
E. A and C

Q.4) The Stored procedures use to manage the security of the database. They are:-1 true choice.
A. Database Mail and SQL mail stored Procedures
B. Cursor Stored Procedures.
C. Security Stored Procedures
D. Database Mail and SQL mail stored Procedures.
E. Distributed Query Stored Procedures

Q.5) Database Mail and SQL mail stored Procedures. - 1 true choice.
A. Used to perform email operations from within the SQL server.
B. Use in the management of distributed queries.
C. Use to implement the functionality of a Cursor.
D. Use to manage the security of the DB.
E. Send mail to the SQL server.

Q.6) The Stored Procedure - 2 true choices.
A. is a set of pre-compiled T-SQL statements executed as a single unit.
B. is a set of T-SQL that are executed as a single block of code that performs a specific task.
C. is used in database Administrative and information activities.
D. can be created to carry out repetitive
E. All of about.

Q.7) The ........is used to change the owner of the current database.-1 true choice.
A. sp_cursor_list
B. sp_changedbowner
C. sp_addalias
D. sp_describe_column
E. A and D

Q.8) Advantages of The Store Procedures are: 2 true choices
A. Reduced client/server traffic
B. can be created to carry out repetitive
C. Reuse of code.
D. A and B
E. B and D

Q.9) Which are not System Stored Procedures?-2 true choices.
A. Distributed Query Stored Procedures
B. Extended Stored Procedures
C. Temporary Stored Procedures
D. Database Mail and SQL mail stored Procedures.
E. Cursor Stored Procedures

Q.10) The Stored procedures are created for temporary uses with a session are called...- 1 true choice.
A. Local Temporary Procedures
B. Global Temporary Procedures
C. Remote Stored Procedures
D. Temporary Stored Procedures
E. Customer Stored Procedures

Q.11) The..............are used to perform tasks that are unable to be perform using standard T-SQL statement. - 1 true choice
A. Extended Stored Procedures.
B. T-SQL Stored Procedures
C. Local stored Procedures
D. B and C
E. Not of about

Q.12) The................are not residents of SQL server. they are implemented as Dynamic Link Libraries(DLL) executed outside the SQL Server Environment.- 1 true choice.
A. Remote Stored Procedures (your answer)
B. Temporary Stored Procedures
C. Extended Stored Procedures.
D. B and C
E. Customer Stored Procedures

Q.13) The ...................are created individual user databases. And cannot be accessed by any user other than the one who has created it.- 1 true choice
A. Extended Stored Procedures
B. Temporary Stored Procedures
C. Local stored Procedures
D. Global Temporary Procedures
E. B and C

Q.14) The Local Temporary Procedures are............- 2 true choices.
A. Visible only to the user that create them.
B. visible for all users
C. use # prefix before the procedure name
D. use ##
E. can be used any user

Q.15) The Global Tem Procedures ....- 3 true choices
A. are dropped at the end of the last session.
B. are dropped at the end of the current session
C. Can only be used by its owner
D. can be used any user (your answer)
E. are visible for all users (your answer)

Q.16) Temporary Stored Procedures include:- 2 true choices
A. Local Temporary Procedures (your answer)
B. Global Temporary Procedures
C. Local stored Procedures (your answer)
D. Customer Stored Procedures
E. A and C

Q.17) EXECUTE xp_fileexists 'C:\sample.txt' - 1 true choice.
A. Check file sample.txt exists.
B. check file sample.txt exists or not (your answer)
C. Execute a file is named sample.txt
D. A and C
E. Not all about

Q.18) OBJECT_DEFINITION() - 2 choices
A. system stored procedure use to display the dependencies of a stored procedure (your answer)
B. System function used to display the definition of a stored procedure.
C. System view used to display definition of a stored procedure.
D. System function used to display the definition of a stored procedure by specifying the object ID of the procedure.
E. A and D

Q.19) The...............create stored procedures for performance of various tasks, they are referred to as user-defined or custom stored procedures and can be set to override the default system procedures.- 1 true choice.
A. Extended Stored Procedures
B. Customer Stored Procedures
C. T-SQL Stored Procedures
D. System Stored Procedures
E. A and D

Q.20) Using "OUTPUT" clause.- 2 true choice
A. Return information from each row on which the INSERT, UPDATE, and DELETE have been executed.
B. Create stored procedures for performance of various tasks, they are referred to as user-defined or custom stored procedures
C. Useful to retrieve the value of an identity or computed column after an INSERT or UPDATE operation
D. Print out a Variable.
E. E and C

Q.21) When a local temporary table is created inside a stored procedure, the table disappears when the procedure is exited.
A. False
B. True

Q.22) System stored procedure used to display the definition of a stored procedure?-1 true choice.
A. Object_definition()
B. sp_helptext
C. sp_depends
D. sys.sql_modules
E. sp_display

Q.23) A Stored Procedure can reference tables, views, user-define functions and other
A. True
B. False

Q.24) The permission associated with the stored procedure are not lost when a store procedure is re-created. And when a stored procedure is altered, the permissions defined for the stored procedure remain the same even though the procedure definition is changed
A. true
B. false

Q.25) Everyone can modify or rename all procedure.
A. true
B. false

Q.26) A Stored procedure can be modified to change the procedure name as well as the procedure definition.
A. True
B. False

Q.27) Stored procedures can be dropped if they are no longer needed. if another stored procedure calls a deleted procedure,- 1 choice.
A. a replaced procedure is display.
B. An error message is display.
C. No procedure display
D. B and C
E. none about

Q.28) Before dropping a procedure, execute the.......................... system stored procedure to determine which objects depend on the procedure- 1 choice
A. sys.sql_modules
B. sp_depends
C. sp_helptext
D. sp_check
E. A and B

Q.29) The RETURN statement passes control back to the calling program. any T-SQL statements following the RETURN statement are executed.
A. True
B. False

Q.30) if a new procedure is created using the same name as well as the same parameters as the drop procedure, all calls to the dropped procedure will be - 1 choice
A. Denied immediately
B. executed successfully
C. Had some error messages
D. No Action
E. None about

Q.31) If a stored procedure is executed successfully, It returns ...........by default. If errors are encountered and the procedure is not successfully executed, ...............integer value is returned.- 1 choice
A. a values zero ....................a non - one
B. a non-zero .................a zero
C. a non-zero ........... a greater than zero
D. a values zero...................a non-zero
E. A and D

Q.32) When a stored procedure is created using options, these options should be included in the ALTER PROCEDURE statement to retain their function.
A. false
B. True

Q.33) .....................are defined at the time of creation of procedure.- 2 choice
A. Input parameters
B. Output parameters
C. A and B
D. Name of stored procedure

Q.34) Which statement is true? - 1 choice.
A. If the OUPUT key word is omitted, the procedure is still executed.
B. If the OUPUT key word is omitted, the procedure is still executed but is not return a value.
C. If the OUPUT key word is omitted, the procedure is not executed but is not return a value.
D. A and B
E. If the OUPUT key word is omitted, the procedure is still executed and returns a value.

Q.35) Which statement is true?- 1 choice
A. When the RETURN statement is used in a stored procedure, It can return a null value. If a procedure tries to return a null value, a warning message is generated and the value zero is returned.
B. When the RETURN statement is used in a stored procedure, It cannot return a null value. if a procedure tries to return a null value, a warning message is generated and the value zero is returned.
C. When the RETURN statement is used in a stored procedure, It cannot return a null value. if a procedure tries to return a null value, a warning message is generated and the value one is returned.
D. None above
E. A and C

Q.36) Which statements are true?- 2 choices
A. The OUTPUT parameters can be of TEXT and IMAGE data type.
B. The calling statement must contain a variable to receive the return value
C. The variable can be used in subsequent T-SQL statements in the batch or the calling procedure.
D. Output parameter cannot be cursor placeholders

Q.37) Displays the default error message for an error.-1 choice.
A. MESSAGE_ERROR()
B. RETURN_ERROR()
C. ERROR_MESSAGE()
D. @@ERROR
E. @@ERROR_LINE

Q.38) Which statement are false?-2 choice
A. The stored procedure cannot be nested
B. The maximum level of nesting is 32
C. There is no limit as to the number of stored procedure that can be called from a given stored procedure
D. None above (your answer)

Q.39) Specifies an integer value to be returned though the stored procedure.- 1 choice
A. VALUE_RETURN()
B. RETURN()
C. RETURN
D. RETURN_INT()

Q.40) Which statement is not True?- 2 choice
A. When stored procedure is executed from other stored procedure, the procedures are said to be nested.
B. When an error occurs in the TRY block, the statements following the statement that caused the error are executed only after CATCH block is executed.
C. When the @@ERROR function is called, an error message is returned for the error occurring in the last executed statement.
D. A and C

Q.41) Which statements are true?- 3 choices
A. Trigger cannot be executed directly nor do they pass or receive parameters.
B. A Trigger is executed when the table is created.
C. Trigger is a stored procedure that executed when data in a specified table is modified.
D. Trigger is the same as Check constraint.
E. Trigger is often created to enforce referential integrity among logically related data in different table.

Q.42) which are true?- 3 choice
A. @@ERROR_LINE : Returns the line number that caused the error
B. @@ERROR: Returns the error number for the error in the last T_SQL statement.
C. @NESTLEVEL: Specifies the level of nesting of the current procedure.
D. The RETURN function specifies the return value for a stored procedure
E. The return code indicates the execution status of the stored procedure.

Q.43) The DDL Triggers.... 2 choice
A. Are used to check and control database operations.
B. Are used to enforce business rules when data is modified in tables or views.
C. Are defined at the database level.
D. Execute either while modifying the data or after the data is modified.
E. Operate only after the table or view is modified. and are defined either at the database or the server level

Q.44) DML Trigger is executed when....- 1 choice
A. A session is established with a LOGON event.
B. data is inserted, modified or delete in a table or a View using the INSERT,UPDATE or DELETE statements
C. A table or a view is created, modified, or delete using the CREATE,ALTER, or DROP statements.

Q.45) The OUTPUT keyword specifies that the variables are involved in passing values from the called procedure to the calling program.
A. True
B. False

Q.46) The UPDATE triggers are created either at the column level or at the table.
A. True
B. false

Q.47) Which are true for DELETE Trigger? - 2 choices.
A. The record is deleted from the trigger table and inserted in the inserted table
B. The record is deleted from the trigger table and inserted in the deleted table
C. The deleted record stored in the deleted table is copied back to the Trigger table.
D. The deleted record stored in the deleted table is lost when Trigger is executed.

Q.48) INSTEAD OF Triggers.- 2 choices
A. Is executed in place of the INSERT, UPDATE or DELETE operation.
B. cannot be created on views, It is only on tables
C. A tables or a view can have any INSTEAD OF trigger defined for INSERT, UPDATE, and DELETE.
D. Are executed before constraint checks are performed on the table. and They executed after creating Inserted and Deleted tables,

Q.49) which statements are true?- 2 choices
A. An AFTER trigger is executed on completion of DROP, ATLTER and CREATE.
B. AFTER triggers can be created on tables and columns
C. A table can have multiple AFTER trigger defined for each INSERT, UPDATE, and DELETE operation.
D. An AFTER trigger is executed before the constraint check in the table is completed
E. The Trigger is executed after the inserted and Deleted tables are created.

Q.50) Which statement is true?
A. Update triggers do not use the Deleted table to update records in a table
B. Delete trigger do not use the Inserted table to delete records from a table

Q.51) Where are true?
A. Each triggering action can have multiple AFTER triggers
B. Two triggers action on a table can have the same first and last triggers
C. trigger definition can be viewed if the information is not encrypted
D. DML trigger definition can be modified by dropping and creating the trigger.

Q.52) Which statements are false?
A. DDL trigger for DROP operation can be created as an INSTEAD OF trigger.
B. a DDL trigger for ALTER event can be invoked only after the modification operations are completed
C. a DDL trigger definition can be display using as_helptext.
D. a DD L trigger can be removed from the current database using the DROP TRIGGER

Q.53) Indexes are used for faster retrieval of data. And improve the speed of query when accessing data a database.
A. True
B. false

Q.54) DDL Triggers are...
A. UPDATE trigger
B. DROP Trigger
C. INSERT Trigger
D. DELETE Trigger
E. CREATE and ALTER Trigger

Q.55) A table can have only one Clustered index and 249 non-clustered indexes.
A. True
B. False

Q.56) Reseves space on the intermediate level of an index.
A. FILLFACTOR
B. PAD_INDEX
C. Computed
D. Unique

Q.57) ...............index stores data in a sorted manner.
A. Non-clustered
B. Clustered
C. unique

Q.58) A ...........is created on 2 or more columns. Both clustered index and non-clustered index can be............
A. Composite Index
B. Full-Text Index
C. Xml Index
D. Unique Index

Q.59) A ..............can be defined on a column with no duplicate values.
A. Full-Text Index.
B. Unique Index
C. XML Index

Q.60) Too many Indexes decrease the performance of ............- 3 choices
A. CREATE
B. INSERT
C. DROP
D. UPDATE
E. DELETE

Q.61) Non-cluster indexes do not physically rearrange the data in the database. and cluster index causes records to be physically sorted or sequential order.
A. True
B. False

Q.62) What option to reserve space on the leaf page of an index for adding additional data at a later stage?
A. FILLFACTOR
B. PAD_INDEX

Q.63) An Index can have a max of ....columns
A. 26
B. 32
C. 24
D. 16
E. no limit

Q.64) FILLFACTOR value ranges from 0-100?
A. True
B. False

Q.65) Way to view index?
A. SP_helptext 'index_name'
B. sp_textindex 'table_name'
C. sys.sql_modules index_name'
D. sp_helpindex 'index_name'
E. sp_helpindex 'table_name'

Q.66) A View is defined with an unique clustered index, is useful for queries that aggregate many rows, but is not suitable for tables that are frequently updated.
A. Standards View
B. Indexed View
C. Partitioned View

Q.67) The properties of an Object such as a table or a view, are stored in special system data. These properties are........................
A. System Views
B. Metadata
C. Index
D. constraints
E. inserted, deleted

Q.68) A View is created using horizontally partitioned data from one or more tables.
A. indexed View
B. Partitioned View
C. Standard view

Q.69) A View is created using column from one or more table and providing specific access to data for viewing and manipulation.
A. Indexed View
B. Standard View
C. Partitioned View

Q.70) A View is created in everywhere databases.
A. True
B. False

Q.71) A View can be created on temporary table.
A. True
B. False

Q.72) Clustered index, non-clustered index can be created on the view.
A. True
B. False

Q.73) A View definition cannot contain keywords:
A. Insert
B. Compute by
C. Group By
D. Delete
E. Into

Q.74) A View definition cannot contain keywords:
A. Update
B. Compute
C. drop
D. Default
E. Top..........Group by

Q.75) A View may be having a FullText index.
A. True
B. False

Q.76) View can reference more than 1024 columns.
A. True
B. False

Q.77) The create view statement can be combined with other T-SQL statements in a single batch.
A. True
B. False

Q.78) DML Triggers are:- 3 choices:
A. Used to enforce business rule when data is modified in table or view
B. defined either at the Database or in the server level
C. defined at the database
D. executed after the table or view is modified
E. executed either while or after the table or view (data) is modified

Q.79) A View cannot reference a temporary table.
A. True
B. False

Q.80) View can retrieve information from xml data type using........... Method.
A. Object_id()
B. value()
C. Return()

Q.81) Prevents invalid data from being entered into the column.- 1 choice.
A. Validity
B. Data integrity
C. Business Rules
D. Constraint

Q.82) Refers to validity and consistency of data- 1choice.
A. Data integrity
B. Constraint
C. Business Rules
D. Validity

Q.83) Ensure that data lies within a specified type or range constraints-1 choice
A. Validity
B. Business Rules
C. Constraint
D. Data integrity

Q.84) A column with this constraint does not allow duplicate values, but allows null values to be inserted.- 1 choice
A. primary key
B. check
C. foreign key
D. unique

Q.85) Which statements are True?- 3 choices
A. Constraints assist in ensuring data integrity
B. Triggers are values that you can define on a column or a group of column
C. Rules are the constraints that you can apply to multiple tables
D. Rules are independent of table definitions.
E. Default are the codes automatically executed when a a specified event occurs.

Q.86) Entity Integrity are:-3 choices
A. Foreign key constraint
B. Primary key constraint
C. Unique constraint
D. index, Identity property
E. Check, Default constraint

Q.87) Refers to policies and standards adhered to by an organization in running its operations.
A. Data integrity
B. Constraint
C. Business Rules
D. Validity

Q.88) Ensure that the values in a column are within a specified range
-1 choice.
A. Referential Integrity
B. Domain Integrity
C. User-defined
D. Entity integrity

Q.89) A column with this constraint does not allow null values or duplicate value to be inserted. - 1 choice.
A. Unique
B. foreign key
C. primary key

Q.90) Refers to constraints defined by user. - 1 choice.
A. Referential Integrity
B. Entity Integrity
C. Domain Integrity
D. User-define Integrity

Q.91) Domain integrity include:- 3 choices
A. Primary key constraint, Default constraint
B. Foreign key constraint, Default constraint
C. Unique constraint
D. Check constraint
E. Not null definition, rules , Data types

Q.92) Maintaining consistency of data across tables that related through common columns. - 1 choice.
A. Entity Integrity
B. Domain Integrity
C. Referential Integrity

Q.93) In a table, when no two rows have the exact same values in all columns.- 1 choice.
A. Domain Integrity
B. Entity Integrity
C. Referential Integrity
D. user-defined

Q.94) Which statements are true? - 3 choices.
A. A row in a table represents the instance of an entity
B. Referential integrity is implemented using UNIQUE constraint
C. A domain defines the range of values for columns in a table
D. User-defined integrity is maintained using default constraints
E. Default definitions specify default values for columns that do not accept null values.

Q.95) Maintains relationship between tables in a database, and Ensure consistency of data across related tables.- 1 choice
A. User-define
B. Entity integrity
C. Referential Integrity
D. Domain Integrity

Q.96) Which statements are true?- 2 choices
A. The PRIMARY KEY constraint allows a null value to be entered once in a column.
B. Constraints are used to ensure validity of data in a table and consistency of data across tables
C. A column specified with a UNIQUE constraint should have reference to the Primary Key column.
D. The Foreign key constraint helps in maintaining referential integrity in the database

Q.97) Ensures that each record in a table is unique.- 1 choice.
A. User-define Integrity
B. Referential Integrity
C. Entity Integrity
D. Domain Integrity

C# Master
1) A local variable
a) Can be used anywhere in the program
b) Is declared within a method
c) Must accept a class
d) Represent a class object
________________________________________
2) An instance variable
a) (your answer) is an object of a class
b) represents an attribute of an object
c) is a method of a class
d) a and c
________________________________________
3) Private Button print = new button();
a) creates a button control
b) initializes a button control
c) instantiates button control
d) a and b
e) a and c
________________________________________
4) An instance method
a) Represents the behavior of an object
b) Represents the attribute of an object
c) Represents another class
d) a and b
________________________________________
5) A Constructor
a) is used to create objects
b) (your answer) must have the same name as the class it is declared within
c) maybe overloaded
d) b and c
e) all of the above
________________________________________
6) class Test: Form { }
a) Creates the class Test : Form
b) (your answer) Creates the class Test that inherits the class Form
c) Creates the class form that inherits the class Test
d) a and b
________________________________________
7) A variable declared inside a method is called a________variable
a) Static
b) Private
c) (your answer) Local
d) Serial
e) b and d
________________________________________
8) Defining two methods with the same name but with different parameters is called.
a) Loading
b) Overloading - correct answer
c) Multiplexing
d) Duplexing
________________________________________
9) Find any errors in the following BankAccount constructor: Public int BankAccount() { balance = 0; }
a) Name
b) Formal parameters
c) Return type
d) No errors
________________________________________
10) In the body of a method, C# uses the variable named_____to refer to the current object whose method is being invoked.
a) call
b) this-
c) do
d) that
________________________________________
11) String mystring; Creates a(n)
a) Class
b) Constructor
c) Object
d) a and b
________________________________________
12) An Event is
a) The result of a users action - correct answer
b) result of a party
c) code to force users action
________________________________________
13) A delegate defines
a) (your answer) a Wahsington representative
b) a class that encapsulates methods
c) a means of passing arrays into methods
d) a substitue for an inherited method
________________________________________
14) Is it possible to pass methods as arguments for other methods without modification.
a) True
b) False
________________________________________
15) All interfaces must contain IDrivable
a) True
b) False
________________________________________
16) What is the proper header for a class that intends to use an interface.
a) class MyClass IFace
b) class MyClass ; IFace
c) class MyClass : IFace
d) class MyCalss {IFace}
e) class MyCalss(IFace)
________________________________________
17) In order for a class to use an interface, it must
a) inherit the properties of the interface
b) (your answer) contain the same methods as the interface
c) create an interface objects
d) a and b
e) all of the above
________________________________________
18) Every class directly or indirectly extends the______class.
a) System
b) Object
c) Drawing
d) Console
________________________________________
19) The concept of composition specifies that you can.
a) Compose good code with C#
b) Compose C# projects with different objects
d) (your answer) Reduce errors by remaining composed during programming
e) all of the above
________________________________________
20) Polymorphism occurs when the methods of the child class.
a) Override the parent class methods but maintain the implementation
b) Maintain the same return type and arguments as the parent class, but implement it differently
c) Have different return types and arguments than the parent class
d) Are Virtual
________________________________________
21) To output the value of multidimensional array, Console.WriteLines(___)
a) myArray[1][3]; -
b) myArray[1.3];
c) myArray{1}{3};
d) myArray(1),(3);
________________________________________
22) All methods in an abstract base class must be declared abstract.
a) True
b) False
________________________________________
23) Methods that are declared abstract in the base class must show implementation at the time of declaration.
a) True
b) False
________________________________________
24) The code public class B : A { }
a) Defines a class that inherits all the methods of A
b) (your answer) Defines a class that inherits the public methods of A only
c) Errors
d) a and b
________________________________________
25) Assuming that public class B : A { public B(int i) :base(i) { } } compiles and runs correctly, what can we conclude about the constructors in the class A?
a) One constructor takes an argument of type i
b) There is only a default constructor
c) (your answer) One constructor takes an arguments of the type int
d) a and b
________________________________________
26) Classes declared with the sealed keyword cannot be base class.
a) True
b) False
________________________________________
27) A method_____an exception when that method detects that a problem has occured.
aTrys
b) Catches
c) Throws
d) a and b
________________________________________
28) Exception objects are derived from the class.
a) Try
b) Catch
c) Exception
d) Event
e) System
________________________________________
29) An abstract class
a) may contain instance variables
b) may contain constructors
c) (your answer) may extend another class
d) a and b
e) all of the above
________________________________________
30) A____block enclose the code that could throw an exception.
a) Try
b) Catch
c) Exception
d) Error
e) a and b
________________________________________
31) A Thread is:
a) an object that allows computer multitasking
b) an object that wraps itself with other threads
c) a deprecated object that is no longer used
________________________________________
32) Synchronization is:
a) the delaying of a thread until there is sufficient memory and work to keep it up
b) making every thread start and end at the same time
c) make each thread do the same thing
d) have each thread start at the same time but not necessarily finish together
________________________________________
33) In C# Thread.Sleep(time) measures time in:
a) seconds
b) milliseconds
c) nanoseconds
d) all of the above
________________________________________
34) When a thread returns from a WaitSleepJoin or Suspended state it returns to the:
a) Unstarted state
b) Stopped state
c) Started state (now considering a part of the running state)
d) Resume state
________________________________________
35) The ThreadPriority enumeration does not contain:
a) Lowest
b) Highest
c) BelowNormal
d) None of the above
________________________________________
36) The way of returning a thread from s suspended state is:
a) Pulse
b) PulseAll
c) Interrupt
d) Resume
e) ReStart
________________________________________
37) In order to lock/unlock an object use the.
a) Lock and Unlock methods
b) Enter and Exit methods
c) Close and Open methods
d) Close and Allow methods
________________________________________
38) Class String and the Char structure found in the:
a) System.Strings namespace
b) System.Text namespace
c) System.Chars namespace
d) System namespace
________________________________________
39) A String literal is a:
a) only contains one character
b) contains numbers rather than letters
c) sequence of characters in double quotation marks
d) contains exactly its variable name and nothing else
________________________________________
40) To create a string literal exclude escape sequence, use:
a) !string
b) @string
c) #string
d) $string
________________________________________
41) String indexers treat strings as:
a) binary code
b) 1 to string Length
c) arrays of characters
d) a character
________________________________________
42) If an IndexofAny method is passed an array of characters it:
a) finds the first occurrence of each letter in the string
b) searches for the first occurrence of any of the characters in the string
c) will search for the first occurrence of the sequence of characters
d) generates an error
________________________________________
43) Concatenating with strings are done with:
a) reserved words
b) method calls
c)operator overloading
d) operator overloading and method calls
________________________________________
44) If two StringBuilder objects contain the same string then
a) they represent the same meory location
b) they are two different objects
c) if one changes, so will the other
d) None of the above
________________________________________
45) The proper way to convert a string to all lowercase is:
a) String = string.ToLower(string);
b) ToLower(string);
c) (string.ToLower();
d) string.ToLower(string);