Skip to main content

Posts

Showing posts with the label restapi

MySQL Normalization: Basics & Forms

Normalization is a database design technique used to organize data in a relational database. The goal of normalization is to reduce data redundancy and dependency by organizing fields and table of a database. This process involves breaking down large tables into smaller, more manageable tables and defining relationships between them. The most common normal forms are the first normal form (1NF), second normal form (2NF), and third normal form (3NF). Here's a brief overview of each: First Normal Form (1NF): Eliminate duplicate columns from the same table. Create separate tables for each group of related data. Identify a primary key to uniquely identify each row. Second Normal Form (2NF): Meet the requirements of 1NF. Remove partial dependencies by separating columns that are dependent on only part of the primary key into their own tables. A table is in 2NF if it is in 1NF and every non-prime attribute is fully functionally dependent on the primary key. Third Normal Form (3NF): Meet t...

Laravel interview questions on performance and securtiy- basic level

 Laravel is a popular PHP web application framework that is known for its elegant syntax, robust features, and developer-friendly environment. Here are the base-level questions related to performance and security. Performance  1. What is eager loading in Laravel and how does it contribute to performance optimization? Eager loading is a technique in Laravel to load relationships along with the main model, reducing the number of database queries. 2. Explain the purpose of Laravel caching and how it can improve application performance. Laravel provides caching mechanisms to store and retrieve data quickly, reducing the need to regenerate or fetch data from the database. 3. What are some techniques you can use to improve the performance of Laravel applications? Possible answers include optimizing database queries, using caching, employing efficient code practices, and utilizing tools like Redis for session management. 4. Discuss the significance of indexing in database performance...

RESTful API in PHP - Know a little

RESTful (Representational State Transfer) API is an architectural style for designing networked applications. It follows a set of constraints to make it scalable, maintainable, and loosely coupled.  RESTful APIs are stateless and use standard HTTP methods (GET, POST, PUT, DELETE) for communication. Key principles of RESTful APIs: Resource-Based:  Resources (data or services) are identified by URIs (Uniform Resource Identifiers) and are manipulated using standard HTTP methods. Uniform Interface:  A consistent and standardized way to interact with resources. This includes the use of standard HTTP methods, representation of resources (e.g., JSON or XML), and hypermedia as the engine of application state (HATEOAS). Stateless:  Each request from a client to a server contains all the information needed to understand and process the request. The server doesn't store any client state between requests. Client-Server Architecture:  Separation of concerns between the clie...