A parameterized query replaces user input in SQL statements with ________ to prevent SQL injection.

  • functions
  • operators
  • placeholders
  • variables
Parameterized queries replace user input in SQL statements with placeholders. These placeholders act as markers for where the input data should be inserted into the query. By using placeholders, the SQL engine can differentiate between executable SQL code and user-provided data, thereby preventing SQL injection attacks.

What is the purpose of the BeginTransaction method in ADO.NET?

  • To begin a database transaction
  • To establish a connection to the database
  • To execute a SQL command
  • To retrieve data from the database
The BeginTransaction method in ADO.NET is used to initiate a database transaction. It marks the beginning of a sequence of database operations that must be treated as a single unit of work, ensuring data integrity and consistency.

Which method is used to open a database connection in ADO.NET?

  • Begin()
  • Connect()
  • Open()
  • Start()
The method used to open a database connection in ADO.NET is Open(). Calling this method establishes a connection to the database specified by the connection string associated with the connection object.

In Entity Framework, what is the primary purpose of an Entity?

  • Defining the structure of the database
  • Modeling business entities
  • Performing database operations
  • Representing a table in the database
In Entity Framework, an Entity primarily represents a business object or concept, such as a customer or an order. It models the data that the application works with and typically corresponds to a table in the database. Entities in EF are used to perform CRUD (Create, Read, Update, Delete) operations on the underlying data.

Which LINQ to SQL operation is used to delete records from a database table?

  • DeleteOnSubmit
  • InsertOnSubmit
  • RemoveOnSubmit
  • UpdateOnSubmit
In LINQ to SQL, the operation used to delete records from a database table is DeleteOnSubmit. Similar to insertion and updating, deletion operations are also performed within a DataContext instance. This method queues up objects for deletion, and upon calling SubmitChanges(), the changes are applied to the underlying database. Understanding how to delete records is crucial for maintaining data integrity and managing database content effectively in LINQ to SQL applications.

How does a NoSQL database differ from a traditional SQL database?

  • NoSQL databases are limited to a single data model.
  • NoSQL databases are schema-less, allowing for flexible and dynamic data models.
  • SQL databases are only suitable for small-scale applications.
  • SQL databases use a key-value pair storage mechanism.
NoSQL databases provide a flexible and dynamic data model, allowing for schema-less data storage. This contrasts with traditional SQL databases, which follow a structured, tabular format with a fixed schema.

For real-time data processing, ETL uses ________ to handle streaming data.

  • Apache Kafka
  • Hadoop
  • MongoDB
  • SQL Server
Apache Kafka is commonly used in ETL processes for real-time data processing. It is a distributed event streaming platform that excels at handling high-throughput, fault-tolerant, and scalable data streams, making it suitable for managing streaming data in ETL pipelines.

A _______ tree is a data structure that allows fast search, insert, delete, and nearest-neighbor operations.

  • AVL
  • B-Tree
  • Heap
  • Trie
A B-Tree is a self-balancing tree data structure that allows for efficient search, insert, delete, and nearest-neighbor operations. It is commonly used in databases and file systems for its balanced nature, ensuring consistent performance.

When you need to create a lagged feature in a time series dataset in Pandas, which function would you use?

  • delay()
  • diff()
  • lag()
  • shift()
The shift() function in Pandas is used to create lagged features in a time series dataset. It shifts the values of a column by a specified number of periods, allowing you to create lagged versions of the original data for time series analysis.

In time series analysis, how is the term 'stationarity' best described?

  • The ability of a time series to move in a straight line
  • The predictability of future values in a time series
  • The presence of external factors affecting a time series
  • The statistical properties of a time series remaining constant over time
Stationarity refers to the statistical properties of a time series remaining constant over time. Achieving stationarity is important for accurate modeling and forecasting in time series analysis.