Full-Stack Basics Flashcards
Learn key React concepts
What is Model Binding?
Model binding retrieves data from requests, populates controller action parameters, takes care of property mapping and type casting typically involved in working with ASP.Net request data.
What is a Database?
A database is an organized collection of structured information, or data, stored in a computer system. It’s set up to easily store, query, and manage data. Commonly stored in tables.
What is a relational Database?
A relational database is a type of database that stores and provides access to data points that are related to one another. These databases are based on relation model, an intuitive, straightforward way of representing data in table.
In a relational database, each row in the table is a record with a unique ID called the key. The columns of the table hold attributes of the data, and each record usually has a value for each attribute, making it easy to establish the relationships among data points.
What is a primary key and how many can on table have?
Primary keys are a columns or a group of columns to uniquely identify and index each record within a table.
A table is only allowed one Primary Key
What is a Foreign Key and how many can one table have?
Foreign keys are a column or a group of columns in a database that are linked to a column in a different table.
This existence of a foreign key column establishes a foreign key constraint.
A table can have multiple foreign keys excluding the primary key column.
What are Indexes?
An index is a data structure that provides a quick lookup mechanism for finding rows in a table based on the values of one or more columns.
If you wanted to delete information from a table what statement would you use?
The delete statement Removes one or more rows from a table or view.
What is the truncate statement used for? What is the key difference between this and your other options to remove data?
the truncate statement removes all rows from a table or specified partitions of a table, without logging the individual row deletions. The delete statement logs each individual row deletion in the transaction logs.
What is data normalization
Database normalization, is technique to organize the contents of the tables for transactional databases and data warehouses to avoid redundancy.
Why would we go through the process of normalizing our data?
There are four goals of data normalization.
- arranging data into logical groupings so that each group describes a small part of the whole.
- minimizing the amount of redundant data in a database.
- organizing the data so that when you modify it, you make the change in only one place.
- building a database in which you can access and manipulate the data quickly and efficiently without compromising the integrity of the storage.
How do you declare a variable in TSQL?
DECLARE { @LOCAL_VARIABLE data_type [ = value ] }
How many normal forms are there?
There are 6 normal forms
the primary forms are:
1NF - Each record entry must contain only a singular value.
2NF - The data must have only one primary key. Then, relationships can be created through new foreign key labels.
3NF - The data in a table must only be dependent on the primary key. If the primary key changes all impacted data must be put into a new table.
What is a SQL Server?
SQL Server: SQL Server is a relational database management system (RDBMS) created by Microsoft. This software allows the user to store and manage data in a structured format, enabling users to interact with the data using the SQL or Structured Query Language, programming language.
What is a SQL Injection Attack and how do you protect yourself against these?
SQL injection is one of the common web attack mechanisms used to steal sensitive data from organizations. It is a code injection technique that hackers use to insert malicious SQL statements into input fields on an application for execution by the underlying database
Protect against these attacks using stored procedures and parameters.
If a stored procedure is too slow how can you enhance the speed?
You can review the execution plan to ensure that ‘table scans’ are minimized and ‘index scans’ are used, instead.
If more information is required you can use SQL Server Profiler to collect information about queries being executed and have SQL Server provide optimization recommendations.
What are higher order components?
A higher Order Component is an advanced way of reusing the component logic. HOC are custom components which wrap other components but they wont modify or copy and behavior from their input component.
What are the limitations of React?
- React is a library not a framework
- Its a very large library and take time to grasp
- It can be difficult to understand
- Coding gets complex as it uses inline templating and JSX
What is a SQL Server stored procedure?
A SQL Server stored procedures are a reusable set of SQL commands that you can save and call whenever you need them.
What language is used to write Stored procedures?
Stored procedures in SQL Server are written using Transact-SQL (T-SQL).
It’s an extension of SQL (Structured Query Language) specifically designed for programming stored procedures, functions, and other database objects.
T-SQL includes additional programming constructs such as variables, control-of-flow statements, and error handling, allowing you to create more complex and powerful database routines.
What language do you use to communicate with the database?
To communicate with a database use a language called SQL (Structured Query Language). SQL is specifically designed for managing and manipulating data stored in relational database management systems (RDBMS). It allows you to perform various operations such as querying data, inserting, update, and deleting records.
What are the different types of statements available to you in TSQL?
- Data Manipulation Language (DML) Statements - These statements are used to manipulate data stored in the database.
- Data Definition Language (DDL) Statements - These statements are used to define, modify, and delete database objects such as tables, views, indexes, and stored procedures.
- Data Control Language (DCL) Statements - These statements are used to control access to the database objects.
- Transaction Control Statements - These statements are used to control transactions in the database.
What are the basic parts of a simple TSQL Query?
- SELECT Clause: Specifies the columns or expressions to be retrieved from the database.
- FROM Clause: Specifies the table or tables from which to retrieve the data. It defines the source of the data for the query.
- WHERE Clause (Optional): Filters the rows returned by the query based on specified conditions.
What are “Joins” used for?
Joins are used when you want to combine data from two or more tables into a single result set based on a related column or condition.
This allows you to retrieve and display information that is spread across multiple tables in the database.
What is an Inner Join?
An inner join is a type of join in SQL that returns only the rows from both tables that satisfy the join condition.