Exam questions Flashcards
(51 cards)
What is true about the HTTP request response-cycle
It can be either a HTTP request or a HTTP response.
What does CRUD stand for?
Create → Save or create a new resource
Read → Display one or more resources
Update → Edit or update one resource
Delete → Remove a resource
What is a Entity relationship diagram:
Is an model that consists of entities, attributes, and relations. The entities represent tables, the attributes represent properties of the table, and the relations represent the association between entities.
Having a multi-tier architecture comes with several benefits. What is the statement that explains it best?
The multi-tier architecture has Improved security, scalability and is easier to maintain
The multi-tier architecture is a client-server architecture and the most commonly used is the three-tier architecture.
What are the different tiers?
It has three tiers →
The presentation tier, or user interface. Displays the content so the user can understand.
The business logic tier, where data is processed.
The data tier, where the data associated with the application is stored and managed - for example SQL queries and functions that are interacting with the database.
Building and designing an accessible website creates several benefits.
Which are they?
1.Accessibility helps you avoid lawsuits.
2.Accessibility improves public perception.
3.Accessibility improves people’s lives.
4.Accessibility increases your customer base.
5. Accessibility improves search engine optimization.
6. Accessibility increases compatibility.
Which principles are used to define accessible content?
Robust - Operable - Perceivable - Understandable
What is true about primary keys in SQL databases?
The primary key identifies a record, and there can not be duplicate values of the primary key in the table.
Describe what a CMS is, how it works and name some examples where it can be used. Briefly
explain/motivate your examples by naming how it works.
CMS stands for content management system,
CMS - is software that helps users create, manage, and modify content on a website without the need for specialized technical knowledge.
It is a tool that helps you build a website without needing to write all the code from scratch (or even know how to code at all).
makes it easier for the client since they don´t have to change any code to change the website, but instead change the content in the CMS.
and some different examples of CSM´s are Wordpress, Umbraco and SiteVision. It can be used for various types of websites such as E-commerce and portfolio pages.
What is a A (first-party)persistent cookie?
A text file stored on disk with an expired date
What are the correct RESTful API HTTP methods?
PATCH
POST
PUT
GET
DELETE
What does MVC mean? Describe what it does
MVC stands for Model View Controller
It explains the way a user requests something on a computer and how the answer is given to them.
It starts with the user that sends a request to the Controller. The controller then communicates with Views that structure up how the data is going to be viewed. The user then gets a presentation back with the answer.
Model and View never communicate with each other.
What are the 10 OWASP TOP LIST security issues?
1.Broken access control
2.Cryptographic failures
3.Injection
4.Insecure design
5.Security misconfiguration
6.vulnerable and outdated components
7.identification and authentication failure
8.software and data entities failures
9.security logging and monitoring failures
10.server side request forgery
One of the security risks when owning and running a website is Cryptographic Failures. What can it lead to?
Users cant log into the website
How do you delete a record from a table?
Delete FROM * WHERE
Which SQL(s)
should you use to insert a new row?
INSERT INTO *
INSERT INTO * VALUES
You have a table of persons called ‘Customers’. In this you want to change the name ‘Bild’ to ‘Pettersson’ in
the column called ‘Surname’. How do you do that?
UPDATE CUSTOMERS SET surname=”Pettersson” WHERE surname =”Bild”
The most common security risk according to OWASP is broken access control. What does broken access
control mean?
Users can act outside of their permissions
what does loading a file with “include” means?
The include expression includes and evaluates the specified file.
When a file is included, the code it contains inherits the variable scope of the line on which the include occurs.
Explain Stateless server vs Stateful server
Stateless = No data is shared between executions
Stateful = Data is shared between executions
PHP is stateless by default
Explain the HTTP request response-cycle
1) Client = could be your browser (chrome) or Postman depending on what we are doing (CLIENT)
2) That client will send a request (HTTP)
3) Server maps the URL to file or program under the document directory (Php code & our database that we are building is contained within the server) (SERVER)
4) Server will respond by sending a response message. Both the request and response contains header and body. Header contains information about the request/response, body contains the content. (HTTP)
4) Server returns a response message (HTTP)
5) Browser formats the response and displays (CLIENT)
- User issues URL from a browser
- Browser sends a request message
- Servers maps the URL to a film/program under the document directory
- Server returns a response message
- Browser formats the response and displays
Explain MySQL tables & Entity Relations
Primary key: The identifier for each row
(often id)
Foreign key: Data in one table that references a primary key in another table
One to many: One row in Table A connects to many rows in Table B and one row in table B connects to one row in Table A
Many to one: One row in Table A connects to one row in Table B and one row in Table B connects to many rows in Table A
Example: One car has one owner but oneowner can have many cars.
What is inheritance?
- A way to create a new class by deriving it from an existing class.
- The new class inherits all the properties and methods of the existing class, known as the parent class.
- Allows for code reuse and helps to promote code organization and maintenance.
- The new class can also add its own properties and methods, as well as override or extend
What is .htaccess?
- Used to configure web server settings for a specific directory or file on the server.
- Can be used to set up URL redirection, authentication, and authorization.
- Commonly used in web development to create clean URLs, block spam bots, and protect sensitive directories and files.