All fields

“PDO & Databases” in Information Technology

44 questions across 1 technology.

Information Technology

44 questions in 1 technology

#QuestionTechnologyTopicLevel
1How do you use named placeholders in a PDO prepared statement, and how do they improve readability compared to positional question mark placeholders? PHP › PDO & DatabasesPHPPDO & DatabasesIntermediate
2What is PDO in PHP, and what advantages does it provide over older database extensions like mysqli for interacting with a database? PHP › PDO & DatabasesPHPPDO & DatabasesBeginner
3What is a prepared statement in PDO, and why is using one considered essential for writing secure database queries? PHP › PDO & DatabasesPHPPDO & DatabasesBeginner
4How do database transactions work in PDO, and why are they important for ensuring multiple related database operations either all succeed together or all fail together? PHP › PDO & DatabasesPHPPDO & DatabasesIntermediate
5How do you configure PDO's error handling mode to ensure database errors are properly reported as catchable exceptions rather than silently failing? PHP › PDO & DatabasesPHPPDO & DatabasesIntermediate
6How does connection pooling and persistent connections work with PDO, and what tradeoffs should be considered before enabling persistent connections? PHP › PDO & DatabasesPHPPDO & DatabasesAdvanced
7How should an application handle database connection failures gracefully, including implementing retry logic and connection health checks for a reliable production system? PHP › PDO & DatabasesPHPPDO & DatabasesAdvanced
8What is SQL injection, and how does using prepared statements with PDO help prevent this common vulnerability in PHP applications? PHP › SecurityPHPSecurityBeginner
9What is PHP and what makes it particularly well suited for web development? PHP › Basics & TypesPHPBasics & TypesBeginner
10What is caching in a PHP application, and why is it important for improving performance? PHP › Caching Strategies in PHPPHPCaching Strategies in PHPBeginner
11What is the DateTime class in PHP, and why is it generally preferred over using the older date function alone? PHP › Date & Time HandlingPHPDate & Time HandlingBeginner
12How do you format a date or time value in PHP using the format method, and what do common format characters like Y, m, and d represent? PHP › Date & Time HandlingPHPDate & Time HandlingBeginner
13What is an Object Relational Mapper, and how do Eloquent and Doctrine represent two different popular approaches within the PHP ecosystem? PHP › Eloquent ORM & Doctrine ORMPHPEloquent ORM & Doctrine ORMBeginner
14How do you define a basic Eloquent model in Laravel, and how does it automatically map to a corresponding database table? PHP › Eloquent ORM & Doctrine ORMPHPEloquent ORM & Doctrine ORMBeginner
15What do the __get and __set magic methods do, and how do they let you customize behavior when accessing properties that do not exist or are inaccessible? PHP › Magic MethodsPHPMagic MethodsBeginner
16What are some common, straightforward ways to identify performance bottlenecks in a PHP application before attempting to optimize it? PHP › Performance Optimization & OPcachePHPPerformance Optimization & OPcacheBeginner
17How do coroutines in Swoole let you write asynchronous code using a familiar, synchronous looking coding style? PHP › Asynchronous PHP (ReactPHP & Swoole)PHPAsynchronous PHP (ReactPHP & Swoole)Intermediate
18What is the difference between page caching, query caching, and object caching, and when should each be used? PHP › Caching Strategies in PHPPHPCaching Strategies in PHPIntermediate
19How does cache invalidation work, and why is deciding when to clear a cache often considered one of the harder problems in caching? PHP › Caching Strategies in PHPPHPCaching Strategies in PHPIntermediate
20What caching strategies are commonly used in Laravel applications, and how does the Cache facade simplify working with different cache backends? PHP › Caching Strategies in PHPPHPCaching Strategies in PHPIntermediate
21How do you add or subtract a specific amount of time from a date using PHP's DateInterval and the modify or add methods? PHP › Date & Time HandlingPHPDate & Time HandlingIntermediate
22How does PHP's DateTime class handle time zones, and why is explicitly setting a time zone important for applications serving users in different regions? PHP › Date & Time HandlingPHPDate & Time HandlingIntermediate
23How do you calculate the difference between two dates in PHP, and what information does the DateInterval object returned by the diff method provide? PHP › Date & Time HandlingPHPDate & Time HandlingIntermediate
24How do Eloquent relationships like hasMany, belongsTo, and belongsToMany let you define and query connections between different database tables? PHP › Eloquent ORM & Doctrine ORMPHPEloquent ORM & Doctrine ORMIntermediate
25What is eager loading in Eloquent, and how does it help solve the N plus one query performance problem? PHP › Eloquent ORM & Doctrine ORMPHPEloquent ORM & Doctrine ORMIntermediate
26What is exception chaining in PHP, and how does the previous exception parameter help preserve the original context when re throwing an error? PHP › Error & Exception HandlingPHPError & Exception HandlingIntermediate
27How do file locking mechanisms in PHP, using the flock function, help prevent data corruption when multiple processes might write to the same file concurrently? PHP › File Handling & File System FunctionsPHPFile Handling & File System FunctionsIntermediate
28How should uploaded file names be sanitized and randomized to avoid security risks and naming conflicts when storing files on the server? PHP › File Upload HandlingPHPFile Upload HandlingIntermediate
29What is Eloquent, and how does it provide an intuitive, Active Record based way to interact with your application's database within Laravel? PHP › Laravel Framework EssentialsPHPLaravel Framework EssentialsIntermediate
30How does the N plus one query problem impact performance, and what general strategies help identify and fix this common performance issue? PHP › Performance Optimization & OPcachePHPPerformance Optimization & OPcacheIntermediate
31What are enums introduced in PHP 8.1, and how do backed enums differ from pure enums in terms of the values they can represent? PHP › PHP 8 Features (Attributes, Enums, Match, Nullsafe Operator)PHPPHP 8 Features (Attributes, Enums, Match, Nullsafe Operator)Intermediate
32How does Docker Compose let you define and run a complete multi container PHP application setup, including a web server, PHP-FPM, and a database, together? PHP › PHP with DockerPHPPHP with DockerIntermediate
33How does PHP's session garbage collection work, and what settings control how long session data is kept before it is considered expired and eligible for cleanup? PHP › Sessions & CookiesPHPSessions & CookiesIntermediate
34How does Doctrine ORM integrate with Symfony to let you work with database records as PHP objects, and what role do entities play in this? PHP › Symfony Framework EssentialsPHPSymfony Framework EssentialsIntermediate
35What are custom post types and custom fields in WordPress, and how do they let you extend WordPress beyond its default posts and pages to represent other kinds of content? PHP › WordPress Plugin & Theme DevelopmentPHPWordPress Plugin & Theme DevelopmentIntermediate
36What common pitfalls should developers be aware of when writing asynchronous PHP code with Swoole, particularly around shared state and blocking calls? PHP › Asynchronous PHP (ReactPHP & Swoole)PHPAsynchronous PHP (ReactPHP & Swoole)Advanced
37How do PHP's integer and float types handle precision limitations, and what issues can arise when performing arithmetic with floating point numbers? PHP › Basics & TypesPHPBasics & TypesAdvanced
38How should an application handle daylight saving time transitions correctly when performing date arithmetic across such a transition? PHP › Date & Time HandlingPHPDate & Time HandlingAdvanced
39How does zero downtime deployment work for a PHP application, and what techniques help avoid any interruption in service during a deployment? PHP › Deployment & Hosting for PHP ApplicationsPHPDeployment & Hosting for PHP ApplicationsAdvanced
40How do database migrations work alongside an ORM like Eloquent or Doctrine to manage schema changes in a version controlled, repeatable way? PHP › Eloquent ORM & Doctrine ORMPHPEloquent ORM & Doctrine ORMAdvanced
41How should a team decide between using an ORM like Eloquent or Doctrine versus writing raw SQL queries directly for a specific, particularly complex or performance sensitive part of an application? PHP › Eloquent ORM & Doctrine ORMPHPEloquent ORM & Doctrine ORMAdvanced
42How should a team approach a comprehensive performance optimization effort for a PHP application experiencing slow response times under production load, prioritizing which areas to address first? PHP › Performance Optimization & OPcachePHPPerformance Optimization & OPcacheAdvanced
43What is the principle of least privilege, and how should it guide decisions about database user permissions and environment configuration in a PHP application? PHP › SecurityPHPSecurityAdvanced
44How does the WordPress database abstraction layer, specifically the global $wpdb object, let you safely run custom database queries beyond what the standard WordPress functions already provide? PHP › WordPress Plugin & Theme DevelopmentPHPWordPress Plugin & Theme DevelopmentAdvanced