SQL VIEW is a global logical table that may or may not be saved. But this is still a table. Therefore, if VIEW always adheres to the first normal form (1NF)? that is, there are no duplicate rows, only scalar types, without ordering from top to bottom or from left to right, etc. What about higher normal forms?
For me, my applications "consume" the results of stored processes, my VIEW queries are "consumed" by SQL queries, and these two uses are mutually exclusive (that is, I do not request the results of sets of stored procedures using SQL and my applications do not contain SQL code). I have seen others use VIEW to "concatenate" multiple values ββin a column into a single row, usually a comma format. Writing predicates in an SQL query on such a column requires bugs like this:
',' + concat_col + ',' LIKE '%' + ',' + search_value + ',' + '%'
Therefore, it seems reasonable to me to expect that all tables that can be queried consist only of scalar types. Am I too βpuristβ thinking about this?
sql normalization
onedaywhen
source share