总结15个小问题| 青训营笔记

113 阅读2分钟
  1. What is a database? A database is a collection of data that is organized in a specific way to allow for efficient storage, retrieval, and modification.
    1. What is a relational database? A relational database is a type of database that organizes data into one or more tables with columns and rows. It allows for efficient querying and manipulation of data through the use of relational operators.
    1. What is normalization in database design? Normalization is the process of organizing data in a database in a way that reduces redundancy and dependency. It helps to minimize data inconsistencies and ensures data integrity.
    1. What is SQL? SQL (Structured Query Language) is a programming language used to manage relational databases. It allows users to manipulate and retrieve data from a database.
    1. What is a primary key? A primary key is a unique identifier for a record in a database table. It is used to ensure data integrity and to facilitate efficient retrieval and manipulation of data.
    1. What is indexing in a database? Indexing is a technique used to improve the performance of queries in a database. It involves creating an index on one or more columns in a table to allow for faster retrieval of data.
    1. What is a foreign key? A foreign key is a column or group of columns in one table that refers to the primary key of another table. It is used to establish a relationship between two tables.
    1. What is a stored procedure? A stored procedure is a pre-written block of SQL code that is stored in a database and can be executed multiple times. It is often used to perform complex database operations or to improve application performance.
    1. What is a trigger? A trigger is a special type of stored procedure that is automatically executed in response to certain events or actions in a database. It is often used to enforce business rules or data integrity constraints.
    1. What is ACID in the context of databases? ACID (Atomicity, Consistency, Isolation, Durability) is a set of properties that ensure database transactions are processed reliably. It ensures that data is consistent and accurate even in the event of hardware or software failures.
    1. Q: What is object-oriented design? A: Object-oriented design is a programming paradigm that uses objects to represent and manipulate data and behaviors within a system. It emphasizes modularity, encapsulation, and abstraction, and allows for reusable and maintainable code.
    1. Q: How do you define classes and objects in object-oriented design? A: In object-oriented design, a class is a blueprint or template that describes the data and behavior associated with a particular entity or object. An object is an instance of a class, which represents a specific occurrence or occurrence of that entity.
    1. Q: Can you explain the difference between inheritance and composition in object-oriented design? A: Inheritance is a mechanism where a new class is based on an existing class, inheriting its properties and methods. Composition, on the other hand, is a technique where an object is composed of other objects, each of which contributes a specific functionality to the larger whole.
    1. Q: What is polymorphism in object-oriented design? A: Polymorphism is the ability of an object to take on multiple forms. In object-oriented design, this is achieved through inheritance and interfaces, where objects of different classes can be treated as if they were of the same type.
    1. Q: Can you describe the SOLID principles of object-oriented design? A: The SOLID principles are a set of guidelines for object-oriented design that aim to make code more maintainable, extensible, and testable. These principles include Single Responsibility, Open-Closed, Liskov Substitution, Interface Segregation, and Dependency Inversion.