DA0-001 · Question #45
Which of the following variable name formats would be problematic if used in the majority of data software programs?
The correct answer is D. First Name. Variable names containing spaces (e.g., "First Name") are problematic because many data software programs, databases, and programming languages interpret spaces as delimiters, leading to syntax errors or requiring special handling.
Question
Which of the following variable name formats would be problematic if used in the majority of data software programs?
Options
- AFirst_Name_
- BFirstName
- CFirst_Name
- DFirst Name
How the community answered
(35 responses)- A3% (1)
- B6% (2)
- C3% (1)
- D89% (31)
Why each option
Variable names containing spaces (e.g., "First Name") are problematic because many data software programs, databases, and programming languages interpret spaces as delimiters, leading to syntax errors or requiring special handling.
While trailing underscores might be unusual, "First_Name_" typically adheres to naming conventions that allow underscores and would be accepted by most software.
"FirstName" uses camel case and contains no problematic characters, making it a commonly accepted and robust variable naming convention.
"First_Name" uses snake case and contains no problematic characters, making it a widely accepted and robust variable naming convention.
Variable names with spaces, such as "First Name", are generally problematic in most data software programs and programming languages because spaces can be interpreted as delimiters or cause syntax errors, often requiring special escaping or quoting.
Concept tested: Data variable naming conventions
Source: https://learn.microsoft.com/en-us/sql/relational-databases/tables/table-names?view=sql-server-ver16
Topics
Community Discussion
No community discussion yet for this question.