Home > Article > Backend Development > A PHP interview question - said to be from a large company
5. Please briefly describe the paradigm and application of database design. Generally, the 3rd normal form is sufficient for optimizing the table structure. This can not only avoid the application being too complex, but also avoid the inefficiency of the system caused by too large SQL statements. 6. There are multiple records of Id in a table. Find out all the records of this id and display the total number of records. Use SQL statements, views, and stored procedures to implement this.
7. There are three columns A, B, and C in the table. Use SQL statements to implement this: when column A is greater than column B, select column A; otherwise, select column B; when column B is greater than column C, select column B; otherwise, select column C.
8. Please briefly describe the method to optimize the execution efficiency of SQL statements in the project. From what aspects, how to analyze the performance of SQL statements? 9. If the template is a smart template. How to use section statement to display an array named $data. for example:
Write the code on the template page? How to display it if using foreach statement? 10. Write a function that can traverse all files and subfolders in a folder. (Directory operation) 11, two tables, city table and province table. They are the relationship tables between cities and provinces respectively. city: id City Provinceid 1 Guangzhou 1 2 Shenzhen 1 3 Huizhou 1 4 Changsha 2 5 Wuhan 3 ………. Guangzhou province: id Province 1 Guangdong 2 Hunan 3 Hubei ……….(1) Write a SQL statement to relate two tables to achieve: display the basic information of the city. ? (2) Display fields: city id, city name, province. like: Id (city id) Cityname (city name) Privence (province) . . . . (2) If you want to count how many cities there are in each province, please use group by to query it. ? Display fields: province id, province name, how many cities it contains. 12. Based on your experience, please briefly describe the steps of software development for software engineering. Which of the following tools have you used: Rational Rose, PowerDesigner, Project, VSS or CVS, and TestDirector? What are the disadvantages? 13. Please briefly describe the difference between threads and processes in the operating system. List the software you have used under LINUX? 14. Please use pseudo language combined with data structure bubble sorting method to sort the following set of data 10 2 36 14 10 25 23 85 99 45. |