<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Vachagan Mirzoian on Medium]]></title>
        <description><![CDATA[Stories by Vachagan Mirzoian on Medium]]></description>
        <link>https://medium.com/@vachmir?source=rss-b9e92984cbe5------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*uuTve-08O3kgCOi7ayaeBA.jpeg</url>
            <title>Stories by Vachagan Mirzoian on Medium</title>
            <link>https://medium.com/@vachmir?source=rss-b9e92984cbe5------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 21:13:42 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@vachmir/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[All You Need For Manual and Automated Testing Theory]]></title>
            <link>https://vachmir.medium.com/all-you-need-for-manual-and-automated-testing-theory-405482cb0357?source=rss-b9e92984cbe5------2</link>
            <guid isPermaLink="false">https://medium.com/p/405482cb0357</guid>
            <category><![CDATA[testing]]></category>
            <category><![CDATA[selenium]]></category>
            <category><![CDATA[csharp]]></category>
            <category><![CDATA[qa-automation]]></category>
            <category><![CDATA[acumatica]]></category>
            <dc:creator><![CDATA[Vachagan Mirzoian]]></dc:creator>
            <pubDate>Sat, 25 Apr 2026 14:25:35 GMT</pubDate>
            <atom:updated>2026-04-25T15:03:20.146Z</atom:updated>
            <content:encoded><![CDATA[<p>Today software is everywhere, from our cars to Nuclear power plants, which means that the correct functioning of software systems is about human life.</p><p>Software testing appeared since the 1950s. During the 1st decade, until <em>1960s</em>, only a mathematical approach of software development was used for testing. This led to Exhaustive testing meaning to test infinite situations, which was impossible, and the practical approach was just debugging. Since <em>1970s</em>, the basics of Positive and Negative testing appeared. In <em>1980s</em> Testing stage started to be integrated with Development process, instead of just following it. This meant the same actions can be performed a few times, so the basics of <em>automation</em> appeared. Since <em>1990s</em>, the idea of Quality Assurance appeared which meant to have not just bug fixing, but also affecting the software development process itself. In the <em>2000s</em> the testing grew up enough to be unique stage of development different approaches, like Test Driven Development appeared.</p><p><strong>Requirement Analysis</strong> — defines what should be done, and not how. Discuss with the end user to understand the main goal.</p><p><strong>Requirements Definition</strong> — create a blueprint of final result</p><p><strong>Design</strong> — developers start to work with the technical tools. Additional software or hardware tools should be provided to the development team.</p><p><strong>Coding</strong> — developers implement the solutions according to previous description. New changes will require the review from the beginning.</p><p><strong>Testing</strong> — systematically verify the correct workflow, make sure the project meets the requirements and is ready for release. Testing that invoices are delivered to all configured email addresses and verifying that disabling automation stops the process.</p><p><strong>Maintenance</strong> — Supporting and updating the system after release. Includes bug fixes and improvements based on customer feedback. Discussing with the customer why some invoices failed to send and updating the system to improve error handling.</p><p>We have the following terms when we talk about testing. More details can be found here <a href="https://glossary.istqb.org/">https://glossary.istqb.org/</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/917/1*tl_gDKxj6BvL2JR50pkMUw.png" /><figcaption>Quality Assurance and Control</figcaption></figure><p><strong>Quality</strong> is the level of the satisfaction a product meets with the predefined standards.</p><p><strong>Quality Assurance</strong> is about strategy, planning, assuring the requirements are fulfilled.</p><p><strong>Quality Control is</strong> about tactics, operational techniques and activities, like performing the practical daily tasks for final result.</p><p>There are different roles for specialists involved in quality assurance processes. Here are some of them.</p><p><strong>1.</strong> <a href="https://istqb.org/certifications/certified-tester-advanced-level-test-analyst/"><strong>Test Analyst (CTAL-TA)</strong></a> — A person responsible for test analysis, test design, test implementation, and test execution. Focuses on non-technical aspects of software, <strong>black-box</strong> and <strong>functional</strong> testing from the perspective of the customer’s business needs.</p><p><strong>2. </strong><a href="https://istqb.org/certifications/certified-tester-advanced-level-technical-test-analyst-ctal-tta/"><strong>Technical Test Analyst (CTAL-TTA)</strong></a> — A person responsible to classify and describe risks related to Performance, Security, Reliability and other <strong>non-functional</strong> testing techniques. Focuses on <strong>white-box</strong> testing techniques, which also assumes to provide code review and software architecture to the developer. Is responsible to introduce options for <strong>Automation</strong>.</p><p><strong>3. Test Manager (CTAL-TM)</strong> — A person responsible for identifying risks, managing test activities, specifying test resources required for processing, and evaluating the test object. The main responsibility is to organize the test processes.</p><p><strong>4. Test Leader</strong> — A person who reports to the test manager on large projects and is responsible for project management of a particular test level or a particular set of test activities.</p><p>Here are examples of classifications testing based on mechanisms, approaches, philosophies, techniques and other aspects. Note, that the classification is not deterministic and can be done in different ways as well.</p><p><a href="https://svyatoslav.biz/wp-pics/software_testing_classification_en.png">https://svyatoslav.biz/wp-pics/software_testing_classification_en.png</a></p><p><strong>1. The fundamental approaches of software workflow checking are Functional and Non-Functional testing.</strong></p><p><strong>1. Functional Testing</strong> — is about functions a system should perform. It tests what a system should do. This has 2 test design approaches, positive, which checks the correctness of the workflow and negative, which checks the presence of bugs for wrong inputs.</p><p>This is about the compliance of system or component with the <strong>Functional Requirements</strong></p><p><strong>Functional requirements</strong> — describe the specific behavior, actions and features of the system or the component, which must be performed. Is measured through functional test. The system must automatically send invoices according to schedule and allow manual invoice sending when needed.</p><p>Here we have 2 approaches to see the behaviour and the outcome of the project.</p><p><strong>1. Positive test case</strong> — uses valid inputs to verify that a software product is doing what it’s supposed to do</p><p><strong>2. Negative test case</strong> — use invalid inputs and verify that the software is not doing what it is not supposed to do.</p><p><strong>2. Non-Functional Testing</strong> — is about aspects of software such as usability, performance, reliability, and security. It tests how well a system behaves. It includes types like configuration, internationalization, usability, security, localization and accessibility testing.</p><p>This<strong> </strong>is about the compliance of system or component with the <strong>Non-Functional Requirements.</strong></p><p><strong>Non-functional requirements</strong> — describes how well the system or component performs the task, specifies the quality of the actions, speed and security. Is measured by quality standards.</p><p><strong><em>1. Performance Testing</em></strong> — evaluates how the system behaves under workload in terms of responsiveness, stability, scalability, and resource usage. The Performance Metrics include <em>Response Time (Latency)</em> per request, <em>Throughput</em> or number of requests per second, <em>CPU / Memory usage</em> and <em>Error rate</em>.</p><p><strong>Load Testing — </strong>checks system under expected user load. The purpose is to verify normal behavior in normal conditions.</p><p><strong>Stress Testing — </strong>explores the system beyond limits. The purpose is to identify breaking point and system robustness in extreme conditions.</p><p><strong>Endurance Testing (Soak Testing) — </strong>Tests system over long duration. This is about adding time dimensions and introducing time measurements. The purpose is to detect for example memory leaks.</p><p><strong>Scalability Testing — </strong>Tests system ability to grow. There are 2 principles to grow which are Vertical scaling to increase hardware power and Horizontal scaling to add more machines.</p><p><strong>Difference between Load Testing and Stress Testing:<br></strong>Load → normal conditions<br>Stress → extreme conditions</p><p><strong>Difference between Endurance Testing (Soak Testing) and Load Testing:<br></strong>Load → short duration<br>Endurance → long duration</p><p><strong>Latency vs Throughput:<br></strong>Latency → time per request<br>Throughput → requests per second</p><p>Those are inversely related under load.</p><p><strong><em>2. Security Testing </em></strong>— verifies that the system is protected from various threats and vulnerabilities. The verification process is realized by 2 possible versions.</p><p><strong>Static Application Security Testing (SAST) — </strong>a software security technique that analyzes source code, bytecode, or binaries to identify vulnerabilities without executing the program. This is White-box type. It helps developers detect coding flaws early in the software development lifecycle, reducing remediation costs and improving overall security posture.</p><p><strong>Dynamic Application Security Testing (DAST)</strong> — a security assessment method that analyzes running applications to identify vulnerabilities exploitable through external interfaces. It simulates real-world attacks to detect flaws such as injection, cross-site scripting, and authentication weaknesses without requiring access to source code. This is<em> </em>Black-box<em> </em>type.</p><p>The exact points and aspects which are tested, are these.</p><p><strong>Vulnerability scanning</strong> — automated detection of known security weaknesses in systems and dependencies by scanning open ports in networks, code flaw in application, cloud infrastructure and etc.</p><p><strong>Penetration testing</strong> — simulated real-world attacks to identify exploitable vulnerabilities while having legal permission to do it.</p><p><strong>Authentication testing</strong> — checks the process of how the access rights are provided. For login process, the user starts by <em>Identification</em>, providing username or email. Then he goes through <em>Authentication</em>, proving that he has the rights, by providing passwords, OTP codes, 2FA codes, access keys or tokens verifies who the user is, so the correctness of these should be tested. In the final, <em>Authorization</em> step, the user is granted the access, and the exact access availability should be checked to verify that the user has exactly those rights which are configured, excluding the admin rights for regular user.</p><p><strong>Input validation </strong>— ensures that the system handles the data correctly. This can work with data boundaries and format. In positive testing context we check that the valid data is accepted. In a negative testing context the scenarios like SQL Injections and Cross-site scripting attempts are handled.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*O69a7qQiNG0zAbwCOVCxQw.png" /><figcaption>Static and Dynamic Application Security Testing</figcaption></figure><p>The industry-standard checklist for security testing is described by Open Worldwide Application Security Project, OWASP. Here are the <a href="https://owasp.org/Top10/2025/">Top 10 Vulnerabilities</a>.</p><p>A01:2025 — Broken Access Control<br>A02:2025 — Security Misconfiguration<br>A03:2025 — Software Supply Chain Failures<br>A04:2025 — Cryptographic Failures<br>A05:2025 — Injection<br>A06:2025 — Insecure Design<br>A07:2025 — Authentication Failures<br>A08:2025 — Software or Data Integrity Failures<br>A09:2025 — Security Logging and Alerting Failures<br>A10:2025 — Mishandling of Exceptional Conditions</p><p><strong><em>3. Usability Testing</em></strong> — Evaluates how easy the system is to use. It is performed by <em>Real user testing</em>, <em>Task-based scenarios</em> and<em> Collect feedback</em>.</p><p><strong><em>4. Compatibility Testing</em></strong> — checking the system across environments.</p><p>It is performed by <em>Different browsers</em>, <em>Different OS</em> and <em>Different devices</em>.</p><p>Requirements for each should be atomic, completely descriptive, mandatory to be realized, open to be modified during the development process. We can have vertical requirements, like business and user requirements, and horizontal ones, like functional and non-functional ones.</p><p><strong>2. There are 3 testing methods or techniques based on access to code and usability</strong>.</p><p>The methods are Black box, White box and Gray box testing. Here are the explanations and subtypes of each.</p><p><strong>1. Black Box</strong> — the internal software structure is unknown, testing as a user. Black-Box techniques are these.</p><p><strong><em>1. Exhaustive testing </em></strong>— Test cases are designed based on mathematical combination of the input values. The possible number of test cases are growing exponentially. For 3 aspects, like 4 Shipping method, 3 Payment method and 2 Inventory types, we do not need to test 3 × 4 × 2 = 24 combinations. To avoid unnecessary combinations, other approaches are used, especially when, for example shipping method does not seem to produce bugs with combinations of one payment method, and work correctly with another.</p><p><strong><em>2. Equivalence partitioning</em></strong> — Tests are designed to exercise equivalence partitions by using one representative member of each partition, where each element produces the same output. Used when inputs can be divided into groups.</p><p>An example is the fee amount calculation for a purchase based on the order total. This approach focuses on groups of values.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/656/1*2_cjg9vPy7TiDo3_nsxmww.png" /><figcaption>Equivalence Class usage</figcaption></figure><p>Equivalence partitioning checks whether the $45 and $25 purchases provide a 2%, $65 provides a 5%, and $100 provides a 7% of fee. This means dividing the data into groups, where each group is expected to produce the same output.</p><p><strong><em>3. Boundary value analysis</em></strong> — Tests are designed based on boundary values. This focuses on finding bugs on range limits. An example is an input field which should contain 5 to 20 characters, so 4 and 21 are incorrect. This approach focuses on the edges and the limits of the input values.</p><p><strong><em>4. Decision table testing</em></strong> — Tests are designed to exercise combinations of conditions. The resulting actions are presented in a decision table.</p><p><strong><em>5. Use case testing</em></strong><em> </em>— are designed to exercise use case behaviors, specific interactions and workflows.</p><p><strong><em>6. State transition testing</em></strong> — is designed to exercise elements of a state transition model, switching between models.</p><p><strong><em>7. Pairwise Testing</em></strong> <strong>— </strong>every pair of values appears at least once. It is a technique to reduce the number of all possible test pair combinations. For 3 testable aspects, like 4 Shipping method, 3 Payment method and 2 Inventory types, we do not need to test 3 × 4 × 2 = 24 combinations. We can check approximately 3 × 4 = 12 cases. Maximum number of combinations can be calculated by using the numbers of the biggest collection, but this is not a rule. The table contains a comparison of 2 testing methods. Exhaustive testing case has all possible combinations, but Pairwise testing case verifies that 2 each aspect option is combined with other. For example, the <em>Snipping Method A</em> is paired with <em>Credit Card Payment</em> and <em>Type1 Inventory</em>, and for the specific pair the 3rd aspect does not matter.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UIPD1gZDTBTHurcyEDMt9Q.png" /><figcaption>Exhaustive and Pairwise testing</figcaption></figure><p><strong>2. White Box</strong> — requires the internal software structure to be fully known, testing assumes code investigation as a developer</p><p><strong><em>1. Statement testing and coverage</em></strong> — Tests are designed to execute code block statements at least once. Test case should cover all the statements in the code and use the metrics to calculate the percentage of covered statements. It is like checking only the existing branches of <em>if </em>and<em> switch</em> conditional operators, without digging deep into the logic. This means, that missing else branch is ignored, regardless the workflow it could handle.</p><p>For this code, we can check 1 statement and achieve 100 % coverage.</p><p>if (user.IsAdmin)</p><p>{</p><p>AccessLevel = “Full”;</p><p>}</p><p>// No else block here</p><p><strong><em>2. Decision testing and coverage</em></strong> — Tests are designed to execute all decision outcomes, if there is no unreachable code segment due to logical errors. This ensures each possible outcome of decision is executed at least once and focuses on the logic. Usually, 100% decision coverage guarantees 100 % statement coverage, as if the 100 % of the logic is tested, then all the statements are also tested. We should handle the scenario of non-Admin’s missing else branch, even if the code is missing.</p><p><strong><em>3. Condition combination testing and coverage</em></strong> — test cases are designed to have all the possible combinations for a single decision. Within this approach, the combinations that are not available in real code execution based on truth-table, are excluded from test cases. Also, the technique is not applied across independent or nested structures, but high-level testing requirements and specifications like pairwise or business workflow testing may assume those. That will result to have more complex testing cases. The table shows what can be tested and avoided within this principle.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/784/1*1PqRTn39uSqmclafpb-Q_w.png" /><figcaption>Condition Combination table</figcaption></figure><p><strong><em>4. Modified Condition/Decision Coverage (MC/DC)</em></strong> — technique, which allows to avoid testing the exponentially growing number of test cases. We must prove that each individual condition can independently affect the outcome of the decision, which will allow to have <em>n+1</em> test cases, instead of <em>2n</em>, for n conditions.</p><p>For any project we can use the <strong>Cyclomatic Complexity</strong> check, which provides software complexity measuring metrics, mainly related to the number of independent paths in the graph of program control flows. We have the following project and we need to know the complexity.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/1*NMRQIYOxtoKPkVo_CfRzIw.png" /><figcaption>Flowchart</figcaption></figure><p>It is calculated by M = E − N + 2P formula, where the E is the number of edges, N is number of Nodes, P is the number of connected components or exit points. 11–8 + (2 * 1) = 5. It is a red flag for developer to have more than 10 independent paths as achieving to 100 % decision coverage becomes harder.</p><p><strong>3. Gray Box</strong> — The internal software structure is partially known, testing as a user with partial access to the internal structure.</p><p><strong>3. Classification based on the involvement of code execution.</strong></p><p><strong>1. Static Testing</strong> — is about detecting the issues before code execution during the early stages. It includes manually checking of specifications and requirements, user stories, compatibility of architecture specifications, code syntax checking. You can use the approach in any stage of SDLC. Here you can find coding standard and naming convention issues. Possible code errors, like usage of «?» null coalescing operator, parameter problems in SQL-like LINQ C# code, can be fixed in this level easier. This c<em>an be done via Verification by checking the satisfaction of the documentation rules</em>.</p><p>Static testing — has 2 subgroups, <strong>Review</strong> and <strong>Static Analysis</strong>.</p><p><strong>Review</strong> — is a check, commonly used to find and eliminate errors or ambiguities in the documentation. A tester can review requirements, design, test cases, etc. It has the following approaches.</p><p>1. <strong>Informal — </strong>unofficial check of a created documentation. The documentation is shown to the project team, and anyone can express their opinion. It helps to detect flaws in the early stages of product creation.</p><p>2. <strong>Walkthrough — </strong>a defect search process usually conducted by an expert in programming or testing to prevent problems in the development or testing stage.</p><p>3. <strong>Peer, technical</strong> — the defect search conducted by one-to-three colleagues from the testing team who check the documentation to identify and eliminate errors.</p><p>4. <strong>Inspection — </strong>the process of detecting potential defects, evaluating the quality, and building confidence in the work product, preventing future similar defects through author learning and root cause analysis.</p><p><strong>Static Analysis</strong> — the process of analyzing code structure for defects.</p><p>1. <strong>Data Flow — </strong>the process of checking the data stream. Data flow is associated with flow processing.</p><p>2. <strong>Control Flow — </strong>the process of checking how operators or instructions are executed.</p><p><strong>2. Dynamic Testing</strong> — is about issue detection after code execution. It may include code debugging or can be like black box testing, without direct access to the code. This can be applied to component, integration, system and acceptance levels, and also to functional, structural and change-related testing objectives. Both manual and automation testing can follow this principle. You can find issues related to asynchronicity. <em>Can be done via Validation by checking whether the product meets the user requirements</em>.</p><p>The table shows the comparison of 2 mechanisms.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RqUrZkGn0sLz8jyvu8fzug.png" /><figcaption>Static and Dynamic testing</figcaption></figure><p>More about Verification and Validation can be found here</p><p><a href="https://www.guru99.com/verification-v-s-validation-in-a-software-testing.html">https://www.guru99.com/verification-v-s-validation-in-a-software-testing.html</a></p><p><strong>4. Testing can be divided by its specification level</strong></p><p>Here is a visual representation of how much of the system is tested. There a basic and extended versions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bFSW7U7vLLbRpd9DUpI9ZQ.png" /><figcaption>Testing Pyramid</figcaption></figure><p><strong>1. Unit or Component Testing</strong> — focuses on the code components that can be tested separately to validate that each software unit performs as designed. The Component Is a logically distinct unit. Is the developer’s responsibility to do before the QA team.</p><p><strong>2. Integration Testing</strong> — is focused on integration of smaller units.</p><p><strong>3. API Testing — </strong>covers the interaction between software systems by checking the API responses and requests, status codes, authentication, authorization, error handling, and performance. The process is done with tools like <a href="https://www.postman.com/">Postman</a>.</p><p><strong>4. System Testing</strong> — is focused on the whole, complete system. Is performed by a QA team.</p><p><strong>5. Acceptance Testing</strong> — focuses on the behavior and capabilities of a whole system or product to evaluate the system’s compliance with the business requirements.</p><p><strong>6. User acceptance testing </strong>— is a subtype of <strong>Acceptance Testing</strong>. Typically is performed by end users, not the development team. Also, UAT is usually performed after system testing and before release to ensure that software meets the customer’s needs and is ready for production.</p><p><strong>7. Alpha testing </strong>— a type of acceptance testing performed at the developer’s site, typically by internal staff or customer representatives, before the product is released to external users. The product is still on development</p><p><strong>8. Beta Testing — </strong>type of acceptance testing performed by external users in a real or near-real environment.</p><p><strong>9. Gamma Testing </strong>— is a final testing phase conducted after beta testing and before release. In this stage no new features are added.</p><p><strong>5. Testing the changes of Builds of the whole software.</strong></p><p>The classification is not based on the component or its behaviour. These are the iterations of the functionality validation after a code change. We can have elementary and deeper testing. This is pre-testing stage before going forward.</p><p><strong>1. </strong><a href="https://en.wikipedia.org/wiki/Smoke_testing_(software)"><strong>Smoke Test</strong></a> — Checking the most critical functionality of the component, to verify whether it is possible to continue the further testing. Can be automated in CI/CD. Alternatively called confidence testing, Build Verification Testing or build acceptance test.</p><p><strong>2. Sanity Testing </strong>— Quick check after minor changes to confirm functionality works.</p><p><strong>3. Regression Testing </strong>— Verifies that new changes or fixes don’t break the previously existing functionality. Can be automated and cover large scopes for efficiency.</p><p><strong>4. Retesting — </strong>verifying the absence of the specific bug after its fix. It is a focused approach aimed at a single test case.</p><p><strong>6. Project Functional Module level testing</strong></p><p><strong>1. Critical Path testing</strong> — checking the core functionality that is mostly used by the user.</p><p><strong>2. Extended Test</strong> — is about checking the additional features, which are nice-to-have.</p><p><strong>3. Feature or Module Testing </strong>— Is about checking the complete functional unit’s work like the final user would do it. <em>Do not confuse with Development-Level Unit Test, which is done in isolation, as this is about feature functionality while real dependencies and business-rules included</em>.</p><p><strong>7. Experience-based testing</strong></p><p><strong>1. Exploratory Testing</strong> — Is about performing the testing without having a proper documentation and plan. The testing is performed based on the experience, without any prior detailed documentation or not knowing anything about software. Exploratory testing includes various levels of structure. One is the ad hoc testing, when tester follows his intuition and check probably problematic parts, and another is the monkey testing, which is random usage of the system.</p><p><strong>2. Error guessing</strong> — Tests are based on a tester’s knowledge of past failures or a general understanding of failure modes</p><p><strong>8. Software satisfactions to the defined rules.</strong></p><p><strong>1. Compliance testing</strong> — is about verifying the software satisfies the platform needs, guidelines and external rules.</p><p><strong>2. Structural Testing — </strong>investigates how the software is implemented, and not what is the output. During this, the main focus is on code, architecture, workflows, data or other structural data. This is a white box testing method.</p><p>More testing types can be found here <a href="https://www.guru99.com/types-of-software-testing.html">https://www.guru99.com/types-of-software-testing.html</a></p><p><strong>9. Resilience and stability testing</strong></p><p><strong>Reliability testing</strong> — evaluates the ability of a system to perform its required functions consistently over time without failure. How long can the software run without crashing</p><p><strong>Disaster Recovery Testing</strong> — checks how quickly the system recovers after failure, data loss and cyberattack. To perform it, we can <em>Simulate crash</em> (server, DB, network), <em>Restore system</em> and <em>Verify data integrity</em>. The Key Metrics are these</p><p><strong>Recovery Time Objective, RTO</strong> — maximum acceptable downtime, how quickly the system must be restored</p><p><strong>Recovery Point Objective, RPO</strong> — maximum acceptable data loss, determined by the time between backups.</p><h3><strong>Test Planning steps and documentations</strong></h3><h4>1. General Test Planning</h4><p>Before we start the testing process, we should find the answers to these questions.<br>1. What should be tested and what should not?<br>2. What are the project timelines and deadline?<br>3. What resources, like tools, environments and help by other people do you need?</p><p><strong>Test Strategy </strong>— is high level guide for test design how and why the testing should be done. Example of test plan of a desktop application can include Cross Platform Testing, Performance Testing and Functional Testing, and would not include Cross browser testing. Do not confuse with test case suite.</p><p><strong>Test Plan</strong> — a detailed fundamental document describing the strategy, objectives, schedule, estimation, deliverables, and required resources. It deals with test coverage, features to be tested, features not to be tested, estimation, scheduling and resource management</p><p><strong>Risk Planning</strong> — analyzing the possibilities of potential events that can impact on the process. There are 2 types, Project risks and Product risks</p><p><a href="https://www.youtube.com/watch?v=Vdm1Lh540LM">https://www.youtube.com/watch?v=Vdm1Lh540LM</a><br><a href="https://www.guru99.com/test-planning.html">https://www.guru99.com/test-planning.html</a></p><h4>2. Test Artifacts and Requirements</h4><p>Before starting to create a testing plan, we should know the Test basics and Input Artifacts.</p><p><strong>Business requirements</strong> — high level description of what the customer wants, express the purpose for which the product is developed. Example is that the business wants the invoice process automated to reduce human error and ensure monthly invoice delivery.</p><p><strong>User requirements</strong> — more detailed and specific definition and implementation of the business requirement, describing the tasks that a user can perform with the system. An example is the functionality allowing to configure each E-commerce payment method in Acumatica ARP uniquely, based on the Customer Shipping address.</p><p><strong>Business rules</strong> — constraints and limitations of the functionalities. Invoice automation must be canceled automatically if the current invoice run fails. Users are prohibited from editing invoice data during processing.</p><p><strong>Quality attributes</strong> — numerical description and measurable conditions describing the system’s performance and quality. The automation process must finish within 15 minutes. Invoices must be sent at least once per month.</p><p><strong>Limitations or constraints</strong> — all kind of conventions that prohibit to develop the product. The end-user’s server can not support continuous background process as the CPU is weak. Database is not large enough to create a snapshot. The system does not support external request sending for email.</p><p><strong>User Story</strong> — is informal description of customer’s potential online journey. Although the business requirements <strong>can be expressed through user stories very carefully</strong>, as <strong>user stories are typically used to express user requirements</strong>, not high-level business requirements. Write the user story on Card. After conversation to discuss the details, add the final result on the Acceptance Criteria.</p><p><a href="https://www.youtube.com/watch?v=uoIzbPL-kyI">https://www.youtube.com/watch?v=uoIzbPL-kyI</a></p><p>Here is an example of User Story.</p><p>User Story 987<br>Name Vachagan<br>Description<br>As an ERP administrator, I want e-commerce orders to automatically appear in Acumatica ERP so that Sales Orders are synchronized and up-to-date on demand. Each time e-commerce platforms processes the payment transaction, the ERP user should see the corresponding data in monthly reports.</p><p><strong>Acceptance Criteria</strong> — final conditions that the software must satisfy to be accepted by a user or final end-user. This specifies the functional and non-functional requirements. Adjusts metrics to start, stop, abort or complete the testing.</p><p>Do not confuse with User Acceptance Tests which indicates whether the software actually meets the requirements.</p><p>Here is an example of Acceptance Criteria written in Gherkin language format.</p><p>1. <strong>Given</strong> a new e-commerce order is created by new customer.<br>2. <strong>When</strong> the order is synched to Acumatica.<br>3. <strong>Then</strong> the new Customer data should be added in Acumatica.<br>4. <strong>And</strong> email should be sent after the 1st successful payment.</p><p>More details can be found here.<br><a href="https://www.businessanalysisexperts.com/gherkin-user-stories-given-when-then-examples/">https://www.businessanalysisexperts.com/gherkin-user-stories-given-when-then-examples/</a></p><h4>3. Test Performing Workflow</h4><p>In final, the testing activities are the following will contain these processes</p><p><strong>Analyze the product</strong> — learn what the product is and how it works.</p><p><strong>Design the test strategy</strong> — define the scope, testing type, risks and issues, create test logistics. Define the «<em>In Scope</em>» and «<em>Out Of Scope</em>» components, like software or hardware. Use a risk-based approach to prioritize testing by evaluating the probability and impact of failures. High-risk areas, like payment or log ins, should receive more detailed and earlier testing, while low-risk areas, like UI text or colours, may require minimal coverage. Understand what testing types should be ignored or not, like whether or not use the Unit or Static testing. Document the possible risky sections which could cause an issue later. For logistics define who and when will do the testing.</p><p><strong>Define the test Objectives</strong> — list the features to be tested, define the targets</p><p><strong>Define the test criteria</strong> — there are 3 of them, <strong>entry</strong>, <strong>suspension</strong> and <strong>exit</strong>.</p><p>Entry criteria is set of preconditions that determine initial requirements which are needed to begin the testing. We may need some test data, test environment or assistance by customer side.</p><p>Suspension criteria defines the conditions when the active testing would be suspended, until solving the defined issues.</p><p>Exit criteria defines the conditions when the testing is complete, like majority of issues are resolved. In this stage use run rate or pass rate. Run rate should ideally be 100%, as all the cases should be tested, Pass rate depends on team decision.</p><p><strong>Resource Planning</strong> — defines all possible needs for the testing team, like equipment, access to customer live environment, test data, internet configurations, additional documentations and etc.</p><p><strong>Plan Test Environment</strong> — implementation of real testing environment which will be similar to the end-user’s ecosystem.</p><p><strong>Schedule &amp; Estimation</strong> — define the resources, times, human skills, scheduling, task distribution, and but for the testing.</p><p><strong>Determine Test Deliverables</strong> — list of all documentations created for before, during and after the testing.</p><p>Before — Test Plan document, Test Case document, Test Design Specification</p><p>During — Test Scripts, Simulations, Test Data, Test Traceability Matrix, Error Logs and Execution Logs</p><p>After — Test Results or Reports, Defect Reports, Installation or Test Procedures guideline, Release Notes</p><h4>4. Test artifacts and document objects we create</h4><p>When the actual process of the quality assurance begins, we may document the results of our tasks. Here are the documents we create. A particular task does not always assume to create all of these, but some of them are very important. Defect Report and Test Case are usually mandatory.</p><p><strong>1. Test Plan </strong>— general level description of testing scope, approach, schedules, resources and etc. This is created before the testing.</p><p><strong>2. Test Suite</strong> — set or collection of test cases or procedures to be executed in a specific test run. This helps to categorize test cases, after their creation, into groups and arrange them systematically. We can select some specific test cases to test 1 exact workflow.</p><p><strong>3. Test case</strong> — detailed description explaining how the <strong>test scenario</strong> would be performed. This is a set of preconditions, inputs, actions (where applicable), expected results, and postconditions developed based on test conditions. This document works with specific examples.</p><p>Destructive test cases are created to learn what the system can handle until it breaks or «destructs».</p><p><strong>4. Test scenario </strong>— one-line description of a concept, describing what needs to be tested. Practically it means to describe the exact functionality which should be tested. This document is created by QA Analyst.</p><p><strong>5. Defect Report</strong> — the structured and detailed description of the bug or defect. It includes bug story, testing data, issue severity, priority and other data.</p><p><strong>6. Checklist</strong> — document which contains options of test related tasks, with the ability to track the status. In small and simple projects this can be used instead of complex documentations. Write the ideas which should be transferred to test cases. They can be grouped into matrix.</p><p>Templates can be seen here.<br><a href="https://strongqa.com/qa-portal/testing-docs-templates/checklist">https://strongqa.com/qa-portal/testing-docs-templates/checklist</a><br><a href="https://learn.microsoft.com/en-us/azure/devops/test/test-objects-overview?view=azure-devops">https://learn.microsoft.com/en-us/azure/devops/test/test-objects-overview?view=azure-devops</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*EAS5MedtyEyosUWmIMVzGA.png" /><figcaption>Test document relations</figcaption></figure><p>The differences between <em>Test plan</em>, <em>Test scenario</em>, <em>Test case </em>and <em>Test suite</em> are described here <a href="https://www.lambdatest.com/learning-hub/test-suite">https://www.lambdatest.com/learning-hub/test-suite</a></p><p><strong>7. Test Reporting Documents</strong></p><p><strong>Test progress report </strong>— indicates the current state of the testing, approximate idea of bugs, contains information about test cases.</p><p><strong>Test result report (TRR) </strong>— shows <em>detailed</em> result of specific test round, for example for a release. Contains pass and fail statistics, test cases number and major defect report. Is QA and Developer oriented document.</p><p><strong>Test summary report (TSR) </strong>— is created at the end of testing phase to provide<em> high level </em>overview about the whole process, coverage, pass rate and correspondence with exit criteria. It is management team oriented.</p><p><strong>Test closure report </strong>— indicates official closure of test, shows objectives and results</p><p>More details can be found here.<br><a href="https://www.browserstack.com/guide/how-to-write-test-summary-report">https://www.browserstack.com/guide/how-to-write-test-summary-report</a></p><p><strong>8. Test Design</strong> — the activity that derives and specifies test cases from test conditions.</p><p><em>1. Test Case Management in details</em></p><p>Each case should describe one option to be tested to have either true or false output. Test case describes how it will be tested and should contain also the <em>Test Data</em> which is used in testing. Test case is used for complex projects, not like <strong><em>checklist</em></strong> which is a future idea for testing and can be used as a good start for test case.</p><p>The Test Case document can contain these fields</p><p><em>ID</em> — a unique combination of letters and numbers.</p><p><em>Summary</em> — the main idea of a test case, a brief description of its contents. For example, a manual test case for login page can look like this: “Check customer login with valid data.”</p><p><em>Preconditions</em> — a list of actions to perform before executing a test case. The credentials can be also included if needed.</p><p><em>Steps</em> — a description of the actions required for verification.</p><p><em>Postconditions</em> — a list of actions that return the system to its original state (if needed).</p><p><em>Expected result</em> — what we expect after successful test case execution.</p><p><em>Actual result</em> — what we get after test case execution (if needed).</p><p><em>Status</em> — Success, Failed, Blocked (if needed).</p><p>More details can be found here<br><a href="https://www.qamadness.com/how-to-write-test-cases-a-comprehensive-guideline/">https://www.qamadness.com/how-to-write-test-cases-a-comprehensive-guideline/</a></p><p><em>2. Defect and Defect Report Management details</em></p><p>We use <strong>DTS, defect tracking systems</strong> to manage the <em>defect workflow</em>, which is the sequence of steps or stages that a software <strong>defect</strong> or <strong>issue</strong> goes through from the time it is reported to the time it is resolved.</p><p><strong>Defect</strong> — wrong workflow of the software, the unwanted result. It contains <em>Defect ID</em>, <em>Defect Description</em>, <em>Version</em> of software containing the defect, STR — <em>Steps</em> to perform to reproduce the defect, <em>Date Raised</em>, Reference to helper files, Detected by information. Later it will contain the Status, the <em>Fixed by</em> information and <em>Date Closed</em>.</p><p>The core document is the <strong>Defect Report</strong> containing descriptions about the bug and its story. Every defect report should contain description for only 1 bug. The document should be as detailed as possible. Here are the most important elements of the defect report document. Not necessarily all of these should exist.</p><p><strong>ID</strong> — a unique identifier to manage the report in DTS.</p><p><strong>Title</strong> — short representation of the issue to allow to acquire enough information while listing many reports.</p><p><strong>Description</strong> — more detailed information about the bug, its location, when it is received</p><p><strong>Dates </strong>— calendar information about the report creation, assignment and fixation.</p><p><strong>Assignee</strong> — the person who would fix the issue.</p><p><strong>Owner</strong> — the person, who reported the issue.</p><p><strong>Expected Result</strong> — the outcome which is predicted to be based on conditions and documentations.</p><p><strong>Actual Result</strong> — real outcome of the testing process</p><p><strong>Reproducibility Data</strong> — descriptions of the exact steps to verify the presence of the bug. For non-reproducible bugs the testing can be done in a clean environment.</p><p><strong>Severity</strong> — the impact of the defect on the system. Shows how dangerous the bug is for the system. Statuses can be like <em>Critical, Major, Medium </em>and Low.</p><p><strong>Priority </strong>— the fixing urgency. Shows when the bug should be fixed. Statuses are <em>Low</em>, <em>Medium</em>, <em>High</em> and <em>Critical</em>.</p><p><strong>Status</strong> — the state of the issue during the lifecycle. Each project management tool can have its own statuses but these are essential ones.</p><p><strong>Open</strong> — new reported bug<br><strong>In progress</strong> — Waiting for a developer to start the fixing.<br><strong>Fixed</strong> — when developer fixes the bug on code level.<br><strong>Resolved</strong> — when the QA team confirms the issue was fixed.<br><strong>Canceled</strong> — BA does not confirm it is an actual bug or a bug which should be fixed.<br><strong>Blocked</strong> — the fixing process is postponed.<br><strong>Closed</strong> — final step, which is performed after deployment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/506/1*I5joLjug7ICtiCeCNXnMfA.png" /><figcaption>Bug statuses</figcaption></figure><p><strong>Test Data — </strong>a collection of data used for the testing. This can be the user credential, database table name, records used by tester, specific input values and etc.</p><p><strong>Workaround </strong>— indicates the possibility to get the desired value without being interrupted by the defect.</p><p><strong>Attachments</strong> — files, images, logs or any other data that can be helpful for bug fixing process.</p><p>More data for severity and priority can be seen here.<br><a href="https://istqbrm.blogspot.com/2014/07/defect-priority-and-severity.html">https://istqbrm.blogspot.com/2014/07/defect-priority-and-severity.html</a></p><h4>5. Practical examples of Test Documents</h4><p>Let’s assume we have a project, and we should perform a testing and create required documentation. We will create documents following this pattern.</p><p>Requirements → Test Plan → Test Scenarios → Test Cases → Test Execution → Defects</p><ol><li>Test Plan</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/956/1*hWd_5-HkjCAoeaE09zfBjw.png" /><figcaption>Test Plan</figcaption></figure><p>2. Test Scenario</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/714/1*h9h_y6x8vUgFVOmR2zJc5w.png" /><figcaption>Test Scenario</figcaption></figure><p>3. Test Case</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JDBMYO3Flb70HkxTy-h00Q.png" /><figcaption>Test Case</figcaption></figure><p>4. Test Data Document</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/742/1*7SKKzBK9CPezUERji-z76Q.png" /><figcaption>Test Data</figcaption></figure><p>5. Defect/Bug Report</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GiU1C5oF4jj_EqBXhIFoBA.png" /><figcaption>Bug Report</figcaption></figure><h3><strong>Testing Automation</strong></h3><p>Test Automation is the usage of software to check the product’s quality. The automation should be performed for specific situation as it requires some initial investments of time, efforts and money and the final outcome should be worthy for it. The automation is the best solution if we have repetitive testing cases, low level programming language code performance checking, long running operations, heavy data processing, internet configuration, API performance, Databases, Web-services or other products without UI. Typical examples of automation are regression, performance and unit testing. During the testing we do <em>Actions</em>, like entering, editing or clicking, and <em>Checks</em>, to verify some conditions. Tasks like Database backup, system monitoring, product release and update requires automation, but they are part of DevTestOps setup and not QA. We also definitely have situations when the Automation must be avoided if there are complex UI, frequently changing requirements and therefore project workflow, human participants.</p><p>There are a few Automation approaches.</p><p>1. Record and Playback — the whole process is recorded</p><p>2. Keyword-driven — automation by using predefined user-friendly keywords to represent test actions.</p><p>3. Data-Driven — separation of test data and test script, allowing to use different sets of input data.</p><p>4. Behaviour-driven — process is described in human language, usually Gherkin’s «Given-When-Then» syntax</p><p>5. Reusable scripts — based on code refactoring to have reusable functions, is the key implementation of POM</p><p>6. Hybrid — combination of 2 or more approaches.</p><p>Automation testing tool examples are Selenium, Ranorex Studio, Tricentis Tosca, usually for .NET, and</p><p>Katalon Studio, TestComplete, Eggplant Functional, AutoIt, WinAutomation. An industry standard is the Selenium ecosystem consisting of many tools. Here is the <a href="https://www.selenium.dev/documentation/">short description</a> of some of them.</p><p><strong>Selenium Ecosystem</strong></p><p>Selenium WebDriver — the core technology supporting OOP languages and features, allows to deal with software like real users would do. Can be used for remote testing via having <em>Selenium Server</em> component’s setup. Another and key component in WebDriver architecture is the <em>Browser Driver</em> which translates the Selenium Scripts of JSON Wire Protocol to browser-native instructions. Browsers themselves are responsible for the development of this component to satisfy the W3C standard. Web driver provides base for many other specific automation tools like <a href="https://builds.acumatica.com/?prefix=builds/26.1/26.100.0175/TestSDK/">Acumatica TestSDK</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tptgLQVJmJ-Uwi0WYA4TDw.png" /><figcaption>Automation Steps</figcaption></figure><p>Selenium Server — allows to write code on local client and apply it for remote server setup</p><p>Selenium Grid — is group of Selenium Servers allowing to have parallel testing.</p><p>Selenium IDE — is a browser extension allowing to run tests by converting its own scripting keywords to programming language code. Is best for simple projects testing, not involving database and dynamically changing pages, can not be used to simulate full human UI interaction. Key concepts are</p><p>Actions — command to perform interactions, like clicking selecting.</p><p>Accessors — retrieve information and storing the results in variables.</p><p>Assertions — verifies the state of the application is what was expected.</p><p>Flow operations — usage of conditional or cyclic operations.</p><p>Selenium RC — is outdated technology as it had multiple structural layers and ineffective principles of injecting JavaScript code in the browser web page code to control the page. The alternative is the Selenium WebDriver</p><h4><strong>WebDriver API Core concepts and code example</strong></h4><p>The heart of Selenium family is the WebDriver Core. Here is its principal structure explained by a code example.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/997/1*GHLoZtDGj06yTvE5sATVlw.png" /><figcaption>C# Selenium Code Example</figcaption></figure><p>We create instance via <strong><em>IWebDriver </em></strong>to control the browser. The <strong><em>By</em></strong> class is used to locate the elements. <strong><em>IWebElement</em></strong> interface simulates a DOM elements allowing to type and retrieve text, check field visibility, click button, open pop-up and etc. The specific point of browser work is that the web content becomes available during some period of time and the automation code intended to work with the elements should take this into account. For example, the code can mean to work with specific fields, pop — ups or values which become available on UI based on some condition or after some time. Here we should take care for the synchronization. The 1st solution we can think about is the <em>Thread.Sleep()</em>, to add delays in process, but this is not an effective way as it freezes the whole thread execution even if the reason is no longer actual and the synchronization issue disappeared. However, this still can be used for demo projects, when we just want to detect and identify the issue and not to solve it. Hence, Selenium introduces the concepts of <em>Explicit</em> and <em>Implicit</em> timeout handling mechanisms.</p><p>Here is the example of Implicit wait which meant to wait for some period of time globally. Both of the lines do the same thing and in real project we would use only one.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c93fc0eb91a3117e5ff1d3c6f545dba2/href">https://medium.com/media/c93fc0eb91a3117e5ff1d3c6f545dba2/href</a></iframe><p>Here is the example of Explicit wait. Here we indicate that the code should wait for some specific action or condition. This is more preferable approach.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/49ebe07370746ffd635c3a5fb7957a7a/href">https://medium.com/media/49ebe07370746ffd635c3a5fb7957a7a/href</a></iframe><p>To work with the website components, locator strategies, like <strong>XPath</strong>, <strong>CSS Selector</strong>, <strong>ID</strong>, <strong>Tag Name</strong>, <strong>Class Name</strong>, <strong>LinkText</strong>, <strong>PartialLinkText</strong> can be used. The <strong>XPath</strong> and <strong>CSS Selectors</strong> are context-sensitive and DOM based, the others are context-insensitive and are based on element attributes.</p><p>For XPath we use <em>Inspect Element</em> command, and not the <em>View Source</em> to see the webpage elements and build path to access the element. Here are the techniques to reach exact element.</p><p>1. Attribute selection «@attribute»<br>2. Text matching «text()»<br>3. Partial match «contains()»</p><p>It is possible to move from parent node to child and vice versa. The image shows the structure of <strong>XPath</strong> code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yln09LH4846yNFgVs0efmQ.png" /><figcaption>XPath code Structure</figcaption></figure><p>Here is a code example covering many scenarios of XPath query usage</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/03021ef7c622dcfac5f58a497f862f69/href">https://medium.com/media/03021ef7c622dcfac5f58a497f862f69/href</a></iframe><p>More details to learn the syntax, can be found by these links.</p><p><a href="https://www.w3.org/TR/1999/REC-xpath-19991116/">https://www.w3.org/TR/1999/REC-xpath-19991116/</a></p><p><a href="https://www.w3schools.com/xml/xpath_syntax.asp">https://www.w3schools.com/xml/xpath_syntax.asp</a></p><p>CSS Selector options to achieve the element are these</p><ol><li>Universal selector, «*»<br>2. Element Selector, «p», «div», «input»<br>3. Class selector, «.form-control»<br>4. Id selector, «#username»<br>5. Attribute selector, «input[name=’email’]»<br>6. Descendant selector, space<br>7. Child selector, for 1 level descendant, «div &gt; input»<br>8. Adjacent sibling selector, immediately after selector, sequence of the same level, «label + input»<br>9. General Sibling selector, Preceded by, «label ~ input»<br>10. Pseudo-class, «:hover», «:first-child»<br>11. Pseudo-element, «::before»</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AkKv3-Ys_HQ94Lz5XFRgCQ.png" /><figcaption>CSS code Structure</figcaption></figure><p>More details can be found here<br><a href="https://www.w3schools.com/cssref/css_selectors.php">https://www.w3schools.com/cssref/css_selectors.php</a><br><a href="https://drafts.csswg.org/selectors-3/">https://drafts.csswg.org/selectors-3/</a></p><p>Both XPath and CSS Selectors can be investigated by this book.<br><a href="https://scanlibs.com/selenium-webdriver-recipes-csharp-3rd/">Selenium WebDriver Recipes in C#, Practical Testing Solutions for Selenium WebDriver, 3rd Ed.</a></p><h4><strong>Automation Project development process</strong></h4><p>These Selenium codes should be added in context of Test Frameworks if we want to have final automation process to run. .NET provides 3 frameworks. Here is the brief description of each.</p><p><strong>1. MSTest</strong> — is developed by Microsoft and is integrated with its ecosystem tools. Provides rich attribute control and metadata addition. The class should have [TestClass] attribute. The method can be with these attributes.</p><p>[TestMethod] indicates that the method is used in a test.<br>[DataRow(0)] provides input values and should correspond to arguments list of method where is added.<br>[DynamicData()] provides input values of IEnumerable data type.[TestCategory(“Numbrs”)] used to group the tests.<br>[TestProperty(“name”, “value”)] adds key value data like test priority, severity or other aspect.<br>[Owner(“Me”)] shows the author of the code.<br>[Priority(1)] used for execution ordering.<br>[WorkItem(1)] provides link to documents created for development of testing processes.<br>[Description(“Text”)] adds user-friendly explanation.<br>[Ignore(“Text”)] skips the method.</p><p><strong>2. NUnit</strong> — is best for testing process management itself, still supports most of MSTest concepts. The class is with [TestFixture] attribute. The test methods can have these attributes.</p><p>[SetUp] indicates that the method should run before each test, for example to open a browser.<br>[TearDown] indicates that the method should run after each test, for resource cleaning like browser cleaning.<br>[Test] indicates that the method is used in a test.<br>[TestCase(5)] provides input values, should correspond to arguments list of method where is added.<br>[TestCaseSource(nameof(Listing))] provides input values of IEnumerable data type.<br>[Order(9)] used for execution ordering.<br>[Description(“Text”)] adds user-friendly explanation.<br>[Ignore(“Text”)] skips the method.</p><p><strong>3. xUnit</strong> — the uniqueness is that parallel execution is built-in option. Test class is with [Collection(“”)] attribute which is not mandatory. The test methods can have these attributes.</p><p>[Fact] indicated single run, without parameters.<br>[Theory] indicates multiple run, with parameters.<br>[InlineData(4)] provides input values, should correspond to arguments list of method where it is added.<br>[MemberData(nameof(Listing))] provides input values of IEnumerable data type.<br>[Trait(“name”, “value”)] adds key value data like test priority, severity or other aspect for filtering.<br>[Description(“Text”)] adds user-friendly explanation.</p><p>The table show the brief comparison of 3 testing frameworks.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lDHnyv_f8WVQQwRmuMXoHg.png" /><figcaption>Test Framework comparison</figcaption></figure><p>When it comes to actual automation project, the best option is <strong>Page Object Model, POM</strong>. This structural design pattern specializes that the web content and the test implementation are separate. When the UI gets changed, like a drop-down field transformed into simple input field, only UI handling logic is updated, and not the test scenarios. Another outdated pattern is the <strong>Page Factory</strong> which is an extension on POM. There are 3 main structural concepts of project organization.</p><p><strong>1. Page Class</strong> — represents class files for web pages.<br><strong>2. Locators</strong> — define how to identify the element on page, via private fields.<br><strong>3. Methods</strong> — define what to do with the elements.</p><p>The real-world Enterprise POM could contain more structures like wait abstractions, shared files, logging data, testing data, different assertions and etc. Here is the extended version of what a project can contain for POMs</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YB--17JTL9spmJhi8jkrCw.png" /><figcaption>Test Project Structure</figcaption></figure><p>To better understand the design patterns, let’s compare them. In wrong way, we directly deal with the browser and its content.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7ff1b32c11cb957b34f92b0a5daf61f8/href">https://medium.com/media/7ff1b32c11cb957b34f92b0a5daf61f8/href</a></iframe><p>In the recommended way, we deal with page object.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/cbb4fb8f1cdf3afb5a9d1fa98709df3a/href">https://medium.com/media/cbb4fb8f1cdf3afb5a9d1fa98709df3a/href</a></iframe><p>The actual testing process will be implemented by this code.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/eb61d9fd4b03a5b61b01e7304b20d308/href">https://medium.com/media/eb61d9fd4b03a5b61b01e7304b20d308/href</a></iframe><p>More details on project structure can be found here.<br><a href="https://www.browserstack.com/guide/design-patterns-in-automation-framework">https://www.browserstack.com/guide/design-patterns-in-automation-framework</a></p><h4><strong>Automation in Software Testing Life Cyle</strong></h4><p>After learning about multiple ways of testing, we would need to choose an option. For that, the <strong>Agile Testing Quadrants</strong> can be used. It is a coordinate chart with vertical and horizontal lines.</p><p><strong>1. Vertical axis</strong> is about who the test is for. It has these components.</p><p>1. Bottom or Technology-facing — This is focused on code, APIs, system behavior. The audience is developers and DevOps. It is written in technical language.</p><p>2. Top or Business facing — This is focused on features, workflows, value. The audience is product owners, users, stakeholders. It is written as business rules, user behavior</p><p><strong>2. Horizontal axis</strong> is about why the test exists. It has these components.</p><p>1. Left or Guides development — Helps to build the right thing and prevents defects early. Can be written before or during coding.</p><p>2. Right or Critiques the product — Evaluates what already exists. Finds risks, weaknesses and improvements. It is exploratory or analytical.</p><p><strong>Quadrant 1</strong> contains Automation Unit, Integration, Component, API and Developer tests.</p><p><strong>Quadrant 2</strong> contains Acceptance, Functional, UI, BDD scenarios, Prototypes &amp; examples</p><p><strong>Quadrant 3</strong> contains Exploratory, Usability, User, A/B and Beta testing</p><p><strong>Quadrant 4</strong> contains Performance testing (Load, Stress, Endurance, Scalability), Security testing, Reliability/Recovery testing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/746/1*0JvrKi83oe4f4HcFjgPDTQ.png" /><figcaption>Agile Testing Quadrants</figcaption></figure><p><strong>Contact me</strong> on <a href="https://linkedin.com/in/vchgnmir">LinkedIn</a>, <a href="https://www.instagram.com/vachmir/">Instagram</a>, <a href="https://www.tiktok.com/@vachmir">TikTok</a> and <a href="https://www.facebook.com/vachmirian">Facebook</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=405482cb0357" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Amazon Web Services. Fundamental Concepts and Components]]></title>
            <link>https://vachmir.medium.com/amazon-web-services-fundamental-concepts-and-components-92ca483bf3f2?source=rss-b9e92984cbe5------2</link>
            <guid isPermaLink="false">https://medium.com/p/92ca483bf3f2</guid>
            <category><![CDATA[acumatica]]></category>
            <category><![CDATA[amazon-web-services]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[database]]></category>
            <dc:creator><![CDATA[Vachagan Mirzoian]]></dc:creator>
            <pubDate>Wed, 31 Dec 2025 10:46:09 GMT</pubDate>
            <atom:updated>2025-12-31T15:03:17.838Z</atom:updated>
            <content:encoded><![CDATA[<p>Modern IT solutions rely on underlying hardware infrastructure. Servers, databases, networking equipment, gateways, and other components are the building blocks of the ecosystem. It is crucial to organize the elements effectively to satisfy the specific business needs. Here are three main deployment models of architecture for software and hardware ecosystems.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WT3O4GHepa7qUteD8igBmQ.png" /><figcaption>Ecosystem Architecture</figcaption></figure><p>1. On-premises (Private) deployment</p><p><strong>On-premises </strong>or <strong>Private</strong> approach assumes that companies host and maintain hardware such as compute, storage, and networking equipment in their own data centers.</p><p>2. Cloud computing</p><p><a href="https://aws.amazon.com/what-is-cloud-computing/"><strong>Cloud</strong> computing</a> is the on-demand delivery of IT resources over the internet with primarily pay-as-you-go pricing. With cloud computing, companies do not have to manage and maintain their own hardware and data center. The infrastructure is outsourced to cloud services like Amazon AWS and Microsoft Azure.</p><p>3. Hybrid</p><p><strong>Hybrid</strong> deployment is the combination of cloud and existing on-premises infrastructure to connect the cloud resources to internal systems.</p><p><strong>Business implementation example of Cloud infrastructure</strong></p><p>Cloud technologies may seem to be complicated at the first glance, but they provide additional abstraction layers on top of Virtual Machines, Servers, Databases and etc. An example of ecosystem is the <a href="https://www.acumatica.com/faq/"><strong>Acumatica SaaS</strong></a><strong> infrastructure built on AWS components. </strong>Although you can have local instances under Private Cloud Subscription requiring additional set up, SaaS provides direct and easy access to the ERP instance itself with no need to directly create a virtual machine, database, make IP configurations for security, manage Database backups or monitor the health on AWS Amazon Console. When additional database storage is needed on 90% usage of current amount, or disaster event database backups, monitoring, or CPU performance optimization must be configured, we would not need to have deep technical skills to manage the processes like it could be done on SQL Server Management Studio usage scenario. The SaaS model abstracts complexities and simplifies ongoing system management.</p><p><strong>Advantages of Cloud Hosting</strong></p><p>An advantage of the Cloud hosting is the presence of the shared availability of software resources. For example, we can directly access to remote Databases rather than being limited to CRUD via the UI. This is extremely helpful during the software development process when we need to validate the presence of some data in the system and we can not do it on UI level because of Front-End issues or software user access levels.</p><p>Another advantage of Cloud technologies is that many AWS managed services automatically replicate data across multiple locations. An <strong>Availability Zone</strong> consists of one or more <strong>Data Centers</strong> with independent power, networking, and cooling. Multiple <strong>Availability Zones</strong> together form an AWS <strong>Region</strong>. Geographical locations can be found here — <a href="https://aws.amazon.com/about-aws/global-infrastructure/regions_az/">https://aws.amazon.com/about-aws/global-infrastructure/regions_az/</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/539/1*BVDvhNCaSB3wzRHeFhaahg.png" /><figcaption>Region, Availability Zone and Data Center</figcaption></figure><p><strong>AWS Shared Responsibility Model</strong></p><p>Here are shown the roles and <a href="https://aws.amazon.com/compliance/shared-responsibility-model/">responsibilities</a> of the Customer and AWS. Customer is responsible for properly configuring the service and their applications, AWS is responsible for security and protection of customer created infrastructure that runs the services offered in the AWS Cloud. The responsibilities are categorized.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SOi8k0bdjl1S5z46-EvGmg.png" /><figcaption>Cloud and User responsibilities</figcaption></figure><p>AWS is responsible for hardware, software, network components, and the infrastructures.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ublNG0TmFWQHp-6EJHVEwQ.png" /><figcaption>Amazon responsibilities</figcaption></figure><p>Customer is responsible for data validation, correct region selection, accurate implementation of business requirements onto AWS, activating multi-factor authentication and etc.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1005/1*AvfebYj1QFoZmAy2lfVynw.png" /><figcaption>Customer responsibilities</figcaption></figure><p>For additional security Amazon provides a concept of <strong>Root User</strong> and <strong>Identity and Access Management</strong>, <strong>IAM</strong> <strong>Account</strong>. This allows the creation of users, roles, and policies to control permissions securely.</p><p>Here is an example of Amazon infrastructure and its components.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XDVtC9Y35BBgSifhQTGQ9w.png" /><figcaption>Infrastructure</figcaption></figure><p>1. <strong>Internet gateway</strong> — is a connection point that makes it possible for users to access your public resources and allows those resources to communicate with the internet, connects <strong>VPC</strong> and the net.</p><p>2 <strong>Application Load Balancer</strong> — distributes incoming user traffic across multiple EC2 instances for better performance and availability.</p><p>3. <strong>Public subnet</strong> — a network segment containing public-facing resources like load balancers and NAT gateways.</p><p>4. <strong>NAT gateway</strong> — enables private resources to access the internet while preventing unwanted inbound connections.</p><p>5. <strong>App subnet</strong> — a private network segment where EC2 instances run your application code securely.</p><p>6. <strong>Auto Scaling group</strong> — automatically adjusts the number of EC2 instances based on user demand.</p><p>7. <strong>Amazon EBS volumes</strong> — Amazon Elastic Block Store, which storage volumes are attached to EC2 instances to store application data.</p><p>8. <strong>Database subnet</strong> — a highly secure network segment dedicated to database resources.</p><p>9. <strong>Amazon Aurora DB (primary and replica)</strong> — a managed database service that provides both write and read capabilities with automatic replication.</p><h3><strong>Key AWS Services Overview</strong></h3><p><strong>Amazon Q Developer</strong> — A generative-AI powered assistant from AWS to improve the development process. It helps to write more accurate code in various languages including C# and SQL. First, we need to download the <strong>AWS Toolkit </strong>extension by this link.</p><p><a href="https://marketplace.visualstudio.com/items?itemName=AmazonWebServices.AWSToolkitforVisualStudio2022">https://marketplace.visualstudio.com/items?itemName=AmazonWebServices.AWSToolkitforVisualStudio2022</a></p><p>In Visual Studio Extensions open the AWS Toolkit, enable the Amazon Q Developer option and log in to Free Tier section. Open the Amazon Q chat from View.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*U_A0VXg9fgCvRF1Bx8HghA.png" /><figcaption>Visual Studio 2022</figcaption></figure><p><a href="https://aws.amazon.com/ec2/"><strong>Amazon Elastic Compute Cloud, Amazon EC2</strong></a> — A web service that provides resizable compute capacity in the cloud, like virtual server. Imagine having a computer, with processor and memory capacity, in a remote AWS Cloud Data Center. You can automatically increase or decrease the computing capacity based on real-time demand. Instead of paying for initial monthly subscriptions, the user can pay exactly for the running process. EC2 instances are billed based on usage, typically per second for modern instance types, and can be stopped when not needed to reduce costs. When you create the instance you select from predefined configurations of memory, storage, CPU and network capacity. Instance can have running, stopped, or terminated states, as you decide. <strong>Amazon Machine Images, AMIs</strong> are templates containing the OS and initial software configuration for instances. After all the tasks, the instance can be stopped to avoid spending money.</p><p>To create an EC2 instance, we need to log in at <a href="https://aws.amazon.com/console/">https://aws.amazon.com/console/</a> page by <strong>IAM</strong> account. Then we go to <strong>AWS Management Console</strong> profile.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/839/1*WCln8Yr2fp8oJgvDRXPvgw.png" /><figcaption>Amazon Console</figcaption></figure><p>You will use the <strong>IAM</strong> credentials to log in. On the <strong>All services</strong> section select the <strong>EC2</strong>. In new page you see the EC2 management tools and options.</p><p>On the dashboard we should select the <strong>Launch instance</strong> button. On the new screen we should select the operating system, <strong>Amazon Machine Image</strong> and other option.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/930/1*mo9f0WKcriH_JR_Q5lUQ4w.png" /><figcaption>Amazon Machine Image</figcaption></figure><p>Then we select an <strong>Instance type</strong> and click on the <strong>Create a new key pair </strong>button, which opens a pop-up window.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*HZkwkkLUN05CaPJXqDrsDQ.png" /><figcaption>Amazon EC2 Instance Type</figcaption></figure><p>There is no special setup on the pop-up window, just use <strong>RSA type</strong>, <strong>.pem format</strong> and name it. A new file would be automatically downloaded. The file contains encrypted private key which would be used to generate a password for Admin user of the Virtual Machine’s OS. The private key file must be stored securely and never shared.</p><p>Other fields should remain the same. Pay attention on <strong>Allow RDP traffic from</strong> checkbox which describes the IP addresses you could connect to virtual machine from. RDP should be restricted to specific IP addresses, accessed through a VPN, or replaced with AWS Systems Manager Session Manager. For education purposes we can have this publicly open temporarily. Then press the Launch the instance button. You should have something like this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/633/1*qxyUcjEtykMm4pt8of7D1A.png" /><figcaption>Launch EC2 Instance</figcaption></figure><p>Go back to the instance page click to <em>Connect</em> button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*y-KUfYN_WlMRVRkd7yGg7g.png" /></figure><p>On the new screen open the RDP client tab and click Get password. Upload the file, which has been downloaded when you created key value or add that file’s data in the form, and press Decrypt password. After this step the password would be generated.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KDYhAnEy7k2ISMOTgTFLcw.png" /><figcaption>Connect to Instance</figcaption></figure><p>We can also open the <strong>Remote Desktop Connection</strong> desktop app on laptop and add the <strong>Public DNS </strong>and<strong> Username</strong> there like this. If the setup is correct, a new window would open where you should add the password. We can also <strong>Connect using Fleet Manager</strong> to open the instance in browser.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/410/1*5bBaUiwn-zFKNQAK35_vtw.png" /><figcaption>Remote Desktop Connection</figcaption></figure><p>The remote machine is ready to be used. Ony 1 active user is allowed to connect to it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/973/1*d9GQMa0Nq_bKzJQf_N-kfg.png" /><figcaption>Virtual Machine</figcaption></figure><p><strong>AWS</strong> <strong>Lambda functions</strong> — service, pieces of code that run in response to events or triggers.</p><p><strong>Amazon Simple Storage Service, S3</strong> provides ability to store files and make them available publicly. Objects are kept in containers called buckets. We can keep websites here as well. Click the <strong>Create bucket</strong> button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yEGyx4oZGmZr89m9nNGAiQ.png" /><figcaption>Amazon Bucket</figcaption></figure><p>On the new screen add name and create the bucket. Open the bucket record and edit the <strong>Block public access (bucket settings)</strong> section by removing the check box if it was not removed during the creation of bucket. Then edit the <strong>Object Ownership </strong>section as shown in the screenshot.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*j062KQdIuJt28qisMSRLWA.png" /><figcaption>Bucket Ownership Control</figcaption></figure><p>The final step is the making bucket component public on <strong>Object actions</strong> tab. After confirming the action, the content would be publicly available, so be careful to avoid having sensitive data here.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Yfy5WeyDyJuiw9WwYpkNWw.png" /><figcaption>Public Object</figcaption></figure><p><strong>Amazon Elastic Block Storage</strong>, <strong>EBS</strong> — Persistent block storage, which is like external storage attached to virtual machines as <strong>EC2</strong>. The <strong>EBS</strong> volumes are organized into two main categories: solid-state drives (SSDs) and hard-disk drives (HDDs). SSDs are used for transactional workloads with frequent read/write operations with small I/O size. HDDs are used for large streaming workloads that need high throughput performance.</p><p><strong>Amazon Virtual Private Cloud</strong> (Amazon VPC) — Allows to create isolated network environments.</p><p><a href="https://docs.aws.amazon.com/elasticloadbalancing/"><strong>Elastic Load Balancing (ELB)</strong></a> — Distributes incoming traffic across multiple EC2 instances or Availability Zones. Practical implementations are Application Load Balancers, Network Load Balancers, Gateway Load Balancers, and Classic Load Balancers.</p><p><strong>Amazon CloudWatch</strong> — provides monitoring and observability to track performance metrics and set up alarms.</p><p><strong>Amazon Elastic Container Service, ECS</strong> and <strong>Elastic Kubernetes Service, EKS</strong> — Container orchestration services.</p><p><a href="https://aws.amazon.com/rds/"><strong>Amazon Relational Database Service, RDS</strong></a> — Database container supporting SQL Server, Oracle, MySQL, PostgreSQL, MariaDB and cloud native Aurora engine types. Database scalability is also available when <a href="https://en.wikipedia.org/wiki/High_availability">space is getting full</a>.</p><p>For the next step, we will check the <strong>Amazon Aurora and Relational Database Service</strong>, RDS for MS SQL. Amazon RDS is a managed database service, which can be used for ERP systems, e-commerce platforms, business intelligence and other areas. Let’s create a new database instance. Open the <a href="https://console.aws.amazon.com/rds/">https://console.aws.amazon.com/rds/</a> URL, click on <strong>Create a database</strong> button and, on the new screen, select the <strong>Full configuration</strong> option as some default values should be changed. Select <strong>Microsoft SQL Server</strong> as the database engine option and the appropriate SQL Server edition (for example: Express, Web, Standard, or Enterprise) based on your requirements. For testing and investigation purposes the free of charge options are enough.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Vj-9F4Ul9-3Zc1LeI8-WEg.png" /><figcaption>Amazon Database</figcaption></figure><p>For the majority of the fields the Platform would automatically suggest and fill the values, we need to manually edit some of them. Configure the instance credentials by adding a user-friendly database name in <strong>DB instance identifier</strong> field and creating a password for the <em>admin</em> <strong>Master username</strong>. In the <strong>Connectivity</strong> section we can choose to connect to an <strong>EC2 </strong>instance but this step is not mandatory. For education purposes we can select the <strong>Yes</strong> option for <strong>Public access </strong>field to have the database available from SSMS of your local laptop. In production environments, databases should remain private and be accessed through VPN connections, bastion hosts, or application servers within the same <strong>VPC</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*icrjPywGx6DiPXNqmalgRw.png" /><figcaption>Connectivity</figcaption></figure><p>Click Create database button on the bottom of the screen. It would take a while to have the database created. Click on the hyperlink value of <strong>VPC security groups</strong> field in <strong>Connectivity &amp; security</strong> tab to open the <strong>Security Groups</strong> page.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VQBAQvLVT4GArh7LfXEoeA.png" /><figcaption>Database Overview</figcaption></figure><p>Click on the security group to have tab options available for it. Open the <strong>Inbound rules</strong> tab and click the <strong>Edit inbound rules </strong>button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KWJjQKOOT0srWXt5j5bjLw.png" /><figcaption>Inbound Rules</figcaption></figure><p>Here we should add a new inbound rule to add our IP Address to the whitelist. Just add a new line and select the <strong>MSSQL</strong> value on the <strong>Type</strong> dropdown field. After selecting the <strong>My IP</strong> value on <strong>Source</strong> dropdown field, your local computer’s ID would automatically get added. Pay attention on your device IP next time, as it could be changed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LBtHtqjt22rkDVrYmeN-xA.png" /><figcaption>IP Availability</figcaption></figure><p>Now we can connect to database using our preferred SQL client tool and start working with SQL Server database in the AWS Cloud. To connect to the database via SSMS, we need the <strong>Endpoint</strong> and <strong>Port</strong>. The <strong>Port</strong> should be added on the end of the <strong>Endpoint</strong> with comma. Do not forget to delete the created database to avoid spending money.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*d9b6nE_8UcR2S4lk_MnfWQ.png" /><figcaption>MS SQL Server</figcaption></figure><p><strong>Non-relational databases</strong> — group of databases like are Amazon DynamoDB, Amazon ElastiCache, Amazon MemoryDB for Redis, Amazon DocumentDB with MongoDB compatibility, Amazon Keyspaces for Apache Cassandra, Amazon Neptune, Amazon Timestream and Amazon Quantum Ledger Database (Amazon QLDB).</p><p>The table shows the brief description of databases.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*g69fubqpnvadb0XMOgeddw.png" /><figcaption>Database comparison</figcaption></figure><h3><strong>Three-Tier Application Architecture in AWS</strong></h3><p>With AWS we can have 3-tier application architecture. The components are these</p><p>Presentation layer — UI, HTML, CSS, JS</p><p>Application layer — Business logic</p><p>Data layer — Databases</p><p>The presentation layer and application layer were hosted together on <strong>Amazon EC2 instances</strong>. These EC2 instances ran a web server that served the frontend files (HTML, CSS, JS) and also handled backend operations such as creating, reading, updating, and deleting records. Traffic was distributed using an <strong>Application Load Balancer</strong>, and the instances scaled automatically using an <strong>Auto Scaling Group</strong>. The data layer could consist of <strong>Amazon DynamoDB</strong> for data and <strong>Amazon S3</strong> for storing static files. In this architecture, the presentation layer and application layer are tightly coupled because both are hosted on the same EC2 instances.</p><p>The same project can be redesigned as serverless application like this.</p><p>1. The <strong>presentation layer</strong> is hosted on <strong>Amazon S3</strong> using static website hosting, with <strong>Amazon CloudFront</strong> for global content caching and <strong>Amazon Route 53</strong> for domain name management. Even though the site is static, JavaScript is used to make API calls and dynamically load data.</p><p>2. The <strong>application layer</strong> is moved to <strong>AWS Lambda</strong>, where backend code runs only in response to events. <strong>Amazon API Gateway</strong> is used to expose APIs that the frontend calls to perform actions like viewing or updating the data.</p><p>3. The <strong>data layer</strong> remains unchanged, continuing to use <strong>DynamoDB</strong> and <strong>S3</strong>, showing how modular design allows parts of the system to be replaced without affecting others.</p><h3><strong>Summary</strong></h3><p>These examples demonstrate common patterns used to deploy and manage infrastructure in the AWS Cloud based on specific business requirements. Understanding these concepts helps in making informed infrastructure and architecture decisions.</p><h3><strong>Used links and sources</strong></h3><p>1. <a href="https://aws.amazon.com/what-is-cloud-computing/">https://aws.amazon.com/what-is-cloud-computing/</a></p><p>2. <a href="https://www.acumatica.com/faq/">https://www.acumatica.com/faq/</a></p><p>3. <a href="https://aws.amazon.com/compliance/shared-responsibility-model/">https://aws.amazon.com/compliance/shared-responsibility-model/</a></p><p>4. <a href="https://aws.amazon.com/ec2/">https://aws.amazon.com/ec2/</a></p><p>5. <a href="https://docs.aws.amazon.com/elasticloadbalancing/">https://docs.aws.amazon.com/elasticloadbalancing/</a></p><p>6. <a href="https://aws.amazon.com/rds/">https://aws.amazon.com/rds/</a></p><p>7. <a href="https://docs.aws.amazon.com/pdfs/whitepapers/latest/aws-overview/aws-overview.pdf">https://docs.aws.amazon.com/pdfs/whitepapers/latest/aws-overview/aws-overview.pdf</a></p><p>8. <a href="https://learn.epam.com/catalog/detailsPage?id=c7a9bc75-5715-42e5-b7cd-812e72d375a4">https://learn.epam.com/catalog/detailsPage?id=c7a9bc75-5715-42e5-b7cd-812e72d375a4</a> — AWS Technical Essentials</p><p><strong>Contact me</strong> on <a href="https://linkedin.com/in/vchgnmir">LinkedIn</a>, <a href="https://www.instagram.com/vachmir/">Instagram</a>, <a href="https://www.tiktok.com/@vachmir">TikTok</a> and <a href="https://www.facebook.com/vachmirian">Facebook</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=92ca483bf3f2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Conversion of Acumatica UOMs]]></title>
            <link>https://vachmir.medium.com/conversion-of-acumatica-uoms-ab38b96c991b?source=rss-b9e92984cbe5------2</link>
            <guid isPermaLink="false">https://medium.com/p/ab38b96c991b</guid>
            <category><![CDATA[c-sharp-programming]]></category>
            <category><![CDATA[customization]]></category>
            <category><![CDATA[ecommerce]]></category>
            <category><![CDATA[acumatica]]></category>
            <category><![CDATA[development]]></category>
            <dc:creator><![CDATA[Vachagan Mirzoian]]></dc:creator>
            <pubDate>Sun, 21 May 2023 12:51:37 GMT</pubDate>
            <atom:updated>2023-05-21T12:51:37.027Z</atom:updated>
            <content:encoded><![CDATA[<p>Acumatica provides functionality for Ecommerce Item management. On the user interface each Item has 2 important fields, quantity and measurement unit. Sometimes we need to convert item quantity measurements within Acumatica systems and Ecommerce store. The simplest way is to use the Base Unit and EA. But we can have some specific cases.</p><p>Stock Item can use Sales Unit field for item quantity calculation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/714/1*3M7mSPzXPTk9TSJofHN6Zg.png" /></figure><p>The used Sales Unit Conversion Factor is here.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/725/1*c1cQ66g3KTcNm2f55p5KbA.png" /></figure><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6a91c4c6d4bbb3a9cd4c5a8348286fd4/href">https://medium.com/media/6a91c4c6d4bbb3a9cd4c5a8348286fd4/href</a></iframe><p>We can use an additional dropdown list to choose which unit is used for final quantity calculation. The field Shopify Qty Export UOM is added in the EPORT UOM group.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/568/1*xiwOFHTMPgKLKec3HX8rTA.png" /></figure><p>A new Group is added from Customization Project Editor’s ADD CONTROLS tab.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*cZDK_WqUl_AmYttAixtyKg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*DEhyRptWosENBGAdg5Ho-A.png" /></figure><p>Now we Sync the Acumatica Item Quantity to Shopify.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*ATaweyIlJ9xv8nNCIgK7ZA.png" /></figure><p>Here we see the number 500 000. As 500 000 / 2 000 = 250, we can assume that there is a quantity of 250 items having EA Unit Of Measure.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*wdmW3WHVxZbMnllPzYWAuw.png" /></figure><p>This is the method segment that is responsible for showing the field value on Export Shopify Inventory Quantities screen and sending the quantity to Shopify Store.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b6d9c89a676f8ec24d5a5f5a0f6767cb/href">https://medium.com/media/b6d9c89a676f8ec24d5a5f5a0f6767cb/href</a></iframe><p>As the Rate is kept on Stock Item, we must find the item in InventoryItem DAC. We add simple PXSelect&lt;&gt;, to get Stock Item data based on item.InventoryID field. Note that the item here is an element of List&lt;BZItemSync&gt;.</p><p>Here is the PXSelect finding the exact item.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7a525f1480ec502ad23b562ecc6457eb/href">https://medium.com/media/7a525f1480ec502ad23b562ecc6457eb/href</a></iframe><p>The SalesUnit field of invItem variable is used as an argument for the GetItemUomFactor() method.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/64e4f0aefa14657e509c3628255b2e0f/href">https://medium.com/media/64e4f0aefa14657e509c3628255b2e0f/href</a></iframe><p>The method contains PXSelect to retrieve the whole row value of measurement unit specified in Sales Unit field.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/37d49e154de0a2f3363eb045fef9670d/href">https://medium.com/media/37d49e154de0a2f3363eb045fef9670d/href</a></iframe><p>Then we get the final Unit Conversion Rate.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/dcbf6586f0f96e562c9dc0b3ac19ae2b/href">https://medium.com/media/dcbf6586f0f96e562c9dc0b3ac19ae2b/href</a></iframe><p>We will always multiply the Item quantity by UnitRate. The UnitRate can be a rational number or a positive real number. For example, if we convert 2.5 KG to grams, we multiply 2.5 by conversion rate 1000 to get 2500, and if we convert 3600 grams to KG, we will multiply 3600 by 1/1000 to get 3.6.</p><p>For the code</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2fb4549448022d99e39f9b8fd3e08212/href">https://medium.com/media/2fb4549448022d99e39f9b8fd3e08212/href</a></iframe><p>we have the following mathematics.</p><p>250 / (1/2000) = 500 000,</p><p>where 1/2000 is the value returned by GetItemUomFactor, as UnitMultDiv field value is “Divide” and UnitRate field value is 2000.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ab38b96c991b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Runtime and Constant Dropdown List in Acumatica ERP]]></title>
            <link>https://vachmir.medium.com/runtime-and-constant-dropdown-list-in-acumatica-erp-da83441169f4?source=rss-b9e92984cbe5------2</link>
            <guid isPermaLink="false">https://medium.com/p/da83441169f4</guid>
            <category><![CDATA[acumatica]]></category>
            <category><![CDATA[magento]]></category>
            <category><![CDATA[erp]]></category>
            <category><![CDATA[attributes]]></category>
            <category><![CDATA[c-sharp-programming]]></category>
            <dc:creator><![CDATA[Vachagan Mirzoian]]></dc:creator>
            <pubDate>Sun, 04 Dec 2022 18:27:27 GMT</pubDate>
            <atom:updated>2022-12-04T18:27:27.955Z</atom:updated>
            <content:encoded><![CDATA[<p>The UI of any website can contain a dropdown lists. The values shown on UI pages can be constantly predefined or generated during runtime. The same takes a place in Acumatica ERP system.</p><p>As we know the backbone of any Acumatica project are Data Access Class, Business Logic Controller or Graph and the corresponding ASPX Screen. This concept reminds the ASP.NET MVC. Each DAC contains fields holding or representing a value. As in Acumatica, in general, the concepts of attributes, generics, reflection and event are widely used for everything, the conversion of simple field into a dropdown one is achieved by using attributes. Let’s look at the example of a DAC.</p><p><strong>Data Access Class</strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e9c8658e5b411d58086664a17776ec27/href">https://medium.com/media/e9c8658e5b411d58086664a17776ec27/href</a></iframe><p>To be brief, each Acumatica DAC class must implement IBqlTable interface. The class not mandatorily can contain a Primary and Foreign Key declarations. Each field consists of 2 components, class field and property field. And finally, the property field in most cases must be decorated by at least one of data type attributes and PXUIField attribute. More details can be found in <a href="http://acumatica-builds.s3.amazonaws.com/builds/22.2/PDF/AcumaticaERP_FrameworkDevelopmentGuide.pdf">Acumatica Framework Development Guide</a> (page 236).</p><p><strong>Business Logic Controller</strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/09f0e30da3f0f781d00def55725ff254/href">https://medium.com/media/09f0e30da3f0f781d00def55725ff254/href</a></iframe><p>Ths code showed the graph core functionality. At first the class is inherited from PXGraph&lt;T&gt; generic class, where the <strong>T</strong> type parameter is the declared class itself. Besides regular methods, the class contains Acumatica graph-specific elements, Selects and Event Handlers. More details can be found in <a href="http://acumatica-builds.s3.amazonaws.com/builds/22.2/PDF/AcumaticaERP_FrameworkDevelopmentGuide.pdf">Acumatica Framework Development Guide</a> (page 19).</p><p><strong>Screen</strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b26fa47e4dc7e8e0176529d24e5dffa0/href">https://medium.com/media/b26fa47e4dc7e8e0176529d24e5dffa0/href</a></iframe><p>Here we see the typical ASP.NET code. For information look at <em>Essential ASP.NET Web Forms Development, Full Stack Programming with C#, SQL, Ajax, and JavaScript</em> Capter 4.</p><p>Now let’s investigate the steps required to create runtime dropdown lists in Acumatica.</p><p>As each kind of field has corresponding Attribute, for dropdown list field PXStringListAttribute can be used. Depending on data we want to save in database, PXIntListAttribute, PXDecimalListAttribute and etc. can be used.</p><p>The values required to be shown on the screen, can be directly given to attribute as array arguments. Dropdown list is formed by 2 components, labels and UI values.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9d4a09f09e2967bab2d8167954cf1f81/href">https://medium.com/media/9d4a09f09e2967bab2d8167954cf1f81/href</a></iframe><p>The final result is this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dwmN3UPtrJ4q0Au5q9xTTQ.png" /></figure><p>For more flexibility we can use another approach.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2131730332de0b16567ed31c824f7c6f/href">https://medium.com/media/2131730332de0b16567ed31c824f7c6f/href</a></iframe><p>We declare a class derived from PXStringListAttribute class. We “unify” the values using Pair() mehtod and giving the values to base class. Then we use our customly created BZListAttribute class on the field. The result on screen is the same.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/68a5027ece1e413d8028ea5f6e28bff7/href">https://medium.com/media/68a5027ece1e413d8028ea5f6e28bff7/href</a></iframe><p>To retrieve data at runtime, we use the C# concept of reflection. In this case we do not give any string to DAC’s field attribute. The value would be extracted from compiled code instead. It is important to have PXStringList attribute with null array. The presence of this attribute is mandatory because it is the only way to tell to Acumatica about visual appearance of a field on screen ASPX level. We would have simple text input field if we do not use PXStringList attribute or any of its derived classes. Besides that, to interact with Acumatica fields, we use event handlers. So, to change the field values, we call generic SetList&lt;Field&gt;() method of PXStringList attribute inside RowSelected event handler. The method takes 4 arguments:</p><p>1. DAC cache,</p><p>2. DAC row,</p><p>3. Labels,</p><p>4. UI Values</p><p>For first, we have simple JSON data-based models to be used for REST API requests. These fields and attributes would be retrieved and shown on screen tab columns as dropdown lists.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/cbf63054af64d59000d3be9ae473b6e2/href">https://medium.com/media/cbf63054af64d59000d3be9ae473b6e2/href</a></iframe><p>Here we want to show the model’s <strong>field property name</strong> and <strong>field’s attribute’s input string value</strong> on screen for further use. Here is the complete code of required logic.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b587e8620d1ed5d2ba5aa66e8bdee871/href">https://medium.com/media/b587e8620d1ed5d2ba5aa66e8bdee871/href</a></iframe><p>On Acumatica screen, as Data field column values we want to show the model’s properties. To do that we create an object of data model class. Then we find its type and read the type’s internal content by simple LINQ commands. That content is stored in 2 Lists which then are given to SetList&lt;Field&gt;() method.</p><p>For Field Name or Key column, we show the attribute’s input strings. We find the class properties and store them as an array. Then for each of property element of array, we find the element’s name. The array of names is stored in Lists. The lists are converted into arrays before being used as method arguments.</p><p>The final result of the code is this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*L-dxsdyKbTiyk1kcatMuUg.png" /></figure><p><strong>Used Recourses</strong></p><p>1. Acumatica Framework Development Guide — <a href="http://acumatica-builds.s3.amazonaws.com/builds/22.2/PDF/AcumaticaERP_FrameworkDevelopmentGuide.pdf">http://acumatica-builds.s3.amazonaws.com/builds/22.2/PDF/AcumaticaERP_FrameworkDevelopmentGuide.pdf</a></p><p>2. Essential ASP.NET Web Forms Development, Full Stack Programming with C#, SQL, Ajax, and JavaScript</p><p><strong>Contact me</strong> on <a href="https://linkedin.com/in/vchgnmir">LinkedIn</a>, <a href="https://www.instagram.com/vachmir/">Instagram</a>, <a href="https://www.tiktok.com/@vachmir">TikTok</a> and <a href="https://www.facebook.com/VachMir/">Facebook</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=da83441169f4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[As classificações do banco de dados e os principais conceitos]]></title>
            <link>https://vachmir.medium.com/as-classifica%C3%A7%C3%B5es-do-banco-de-dados-e-os-principais-conceitos-297d23958373?source=rss-b9e92984cbe5------2</link>
            <guid isPermaLink="false">https://medium.com/p/297d23958373</guid>
            <category><![CDATA[programming-languages]]></category>
            <category><![CDATA[bases-de-datos]]></category>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[armenian-it]]></category>
            <category><![CDATA[programação]]></category>
            <dc:creator><![CDATA[Vachagan Mirzoian]]></dc:creator>
            <pubDate>Sat, 02 Apr 2022 16:12:42 GMT</pubDate>
            <atom:updated>2022-04-02T16:12:42.336Z</atom:updated>
            <content:encoded><![CDATA[<p>Programação é o trabalho feito com um algoritmo específico com dados. Mas primeiro você tem que manter alguns dados. Eles são armazenados em um banco de dados. Muitas consultas, definidas pela <a href="https://en.wikipedia.org/wiki/Query_language">Linguagem de consulta</a>, são usadas para obter as informações. Essas linguagens são compostas por <a href="https://www.javatpoint.com/dbms-sql-command">5 partes lógicas</a>.</p><p>1) Linguagem de definição de dados, linguagem de descrição de dados (DDL) — CREATE, ALTER, DROP TRUNCATE,</p><p>2) Linguagem de manipulação de dados (DML) — INSERT, UPDATE, DELETE,</p><p>3) Linguagem de Controle de Dados (DCL) — GRANT, REVOKE,</p><p>4) Linguagem de Controle de Transação (TCL) — COMMIT, ROLLBACK</p><p>5) Linguagem de Consulta de dados (DQL) — SELECT</p><p>Existe muitos princípios para classificar bancos de dados e seus sistemas de gerenciamento. De acordo com a atividade empresarial, distinguem-se as tecnologias nuvem e os <a href="https://pt.wikipedia.org/wiki/Armaz%C3%A9m_de_dados">Armazém de dados</a>, que se destinam a satisfazer as necessidades do negócio.</p><p>De acordo com a distribuição territorial, separamos um <a href="https://pt.wikipedia.org/wiki/Banco_de_dados_distribu%C3%ADdo">banco de dados distribuído</a>, cujos dados podem ser fisicamente isolados uns dos outros, mas os servidores são iguais, os dados, estando em <a href="https://www.scylladb.com/2021/12/22/what-do-you-mean-by-a-distributed-database/">computadores separados</a>, são processados por processadores diferentes, os servidores são interligados pela Internet. Podem estar no mesmo Datacenter, no mesmo endereço físico, mas independentemente da localização geográfica dos seus subelementos, toda a base de dados é <a href="https://stackoverflow.com/questions/50062045/precise-difference-between-distributed-database-and-decentralised-database">1 unidade lógica</a> — <a href="https://www.scylladb.com/2021/12/22/what-do-you-mean-by-a-distributed-database/">Cluster</a>. Para manter as passagens adequadas, deve haver uma conexão intensa entre elas, para Replicação e Duplicação. Os bancos de <a href="https://medium.com/There%20is%20also%20a%20Centralized%20database,%20which%20is%20completely%20in%20one%20place.%20This%20option%20is%20often%20used%20in%20the%20case%20of%20LAN%20networks,%20when%20the%20organization%20occupies%20a%20limited%20space%20and%20uses%20a%20central%20server%20in%20which%20the%20database%20is%20located.%20There%20are%20several%20centers%20in%20a%20Decentralized%20system,%20like%20a%20centralized%20database,%20the%20sub-elements%20may%20differ%20in%20their%20rights%20and%20capabilities.">dados distribuídos são</a> Homogêneos ou Heterogêneos. No caso de sistemas homogêneos, todos os servidores utilizam o mesmo Sistema de gerenciamento de banco de dado, o mesmo SGBD.</p><p>Há também um <a href="https://en.wikipedia.org/wiki/Centralized_database">banco de dados centralizado</a>, que está completamente em um só lugar. Esta opção é frequentemente usada no caso de redes LAN, quando a organização ocupa um espaço limitado e utiliza um servidor central no qual está localizada a base de dados. Existem vários centros em um <a href="https://cointelegraph.com/explained/decentralized-and-distributed-databases-explained">Sistema Descentralizado</a>, como um banco de dados centralizado, os subelementos podem diferir em seus direitos e capacidades.</p><p>Em termos de arquitetura de software, os bancos de dados podem ser sistemas autônomos do cliente que os utiliza, ou podem ser <a href="https://en.wikipedia.org/wiki/Embedded_database">embutidos</a> como SQLite, usados como biblioteca ou qualquer outro projeto. Outro exemplo é o SQL Server Compact, trabalhando com <a href="https://en.wikipedia.org/wiki/Data_compaction">compactando</a> dados e escrever mais código em volumes menores ou trabalhando com <a href="https://pt.wikipedia.org/wiki/Compress%C3%A3o_de_dados">compressão</a> código existente e pressionando o código em menos memória física.</p><p>Para obter velocidade, são projetados bancos de dados <a href="https://en.wikipedia.org/wiki/Parallel_database">paralelos</a>, especialmente para o processamento de grandes volumes de informações.</p><p>Os dados da base de dados podem ser estruturados ou não estruturados, tipos intermediários são possíveis. Os dados que possuem um <a href="https://en.wikipedia.org/wiki/Data_model">Modelo de Dados</a> são Estruturados. Existem também os tipos <a href="https://pt.wikipedia.org/wiki/Dados_semiestruturados">semiestruturados</a>.</p><p>Dependendo da existência da estrutura do model, os bancos de dados também possuem modelos, relacionais ou não relacionais, mas alguns bancos de dados podem trabalhar com mais de 1 modelo. O exemplo clássico de bancos de dados relacionais é o SQL. Bancos de dados não relacionais são bancos de dados com chave-valor, colunas largas, orientados a documentos, alguns bancos de dados gráficos e assim por diante. Com <a href="https://www.youtube.com/watch?v=W2Z7fbCLSTw">Search Engine</a> e bancos de dados multi-modelo incluem propriedades de 2 grupos.</p><p>A tabela mostra uma comparação das características dos 5 modelos fundamentais.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*Gak9KjAbTaQUmLHxcS8BBg.png" /></figure><p><strong>Banco de Dados Relacional</strong> — Os dados são armazenadas em tabelas, onde o produto cartesiano é base matemática que permite combinar ou relacionar linhas e colunas entre si.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/570/1*3GzVkw8DSoF6e6_Bfr4tSw.png" /></figure><p>Exemplos clássicos são SQL, T-SQL e MySQL. Como uma tabela é uma unidade única e independente em um banco de dados SQL, todas as linhas e colunas devem ser iguais, portanto, antes de estender qualquer linha, uma coluna deve ser adicionada à tabela, colocar o valor na interseção com a linha necessária e escrever “null” nos outros campos.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/48bb8a34d55508be529c172815720081/href">https://medium.com/media/48bb8a34d55508be529c172815720081/href</a></iframe><p>Adicionamos uma coluna e, em seguida, excluímos a coluna inteira, ou seja, não é possível excluir apenas 1 caixa específica. Bases orientadas à colunas foram projetados para corrigir essa deficiência. Pode ser comparado ao trabalho feito com arranjos dinâmicos e estáticos, quando no caso de arrays dinâmicos o comprimento muda, e no caso de arrays estáticos a melhor opção é escrever null ou 0s. Em bases relacionais, a normalização de tabelas é extremamente importante. A informação sobre o objeto, dependendo do tipo, são agrupados em tabelas separadas para que apenas os dados homogêneos sejam encontrados em cada tabela. No caso de um banco de dados não relativo, o objeto específico com todos os seus campos é armazenado em um documento, de modo que os dados mistos fiquem em um só lugar.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/814/1*ws1iGRM_ycepXpqFENy5cA.png" /></figure><p>Mapeadores Relacionais de Objeto são usados para comunicar a linguagem de consulta de dados e a linguagem server-side. Ele transforma as relações entre de tabelas em objetos ou classes, que são usados pela maioria das linguagens de programação, permitindo que eles se desfaçam dos muitos relacionamentos entrelaçados entre tabelas. SQL e .NET usam o Entity Framework, que permite que você trabalhe diretamente com as bases. Linguagem de .NET, como C# são usados para trabalhar com MRO, mas ao mesmo tempo pode ficar longe da camada de banco de dados. Então o Entity Framework é uma interface sem a qual tivemos que usar o ADO.NET, que envolve escrever código no estilo SQL.</p><p>A tabela mostra os conceitos possíveis e seus significados.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*n_Cf-1WD77SkI7r5g1j0Ng.png" /></figure><p><strong>Pares chave-valor</strong> — dados são objetos do array Associativo trabalhando com a Hash Table, ou são elementos do Dicionário, onde linhas são os dados e cada linha é uma unidade separada. Diferente de outros bancos de dados, neste caso os campos vazios não são preenchidos com calhaus, o que faz com que a memória não seja sobrecarregada. É <a href="https://www.ibm.com/cloud/learn/nosql-databases">a forma mais simples</a> e a abstração essencial de bases não relacionais. Muitos aplicativos, usando linguagem como o <a href="https://aws.amazon.com/redis/">Redis</a>, operam em uma base na memória, ou seja, as informações são transferidas para um computador cliente. É eficaz para armazenamento em cache, operações em tempo real, etc.</p><p><strong>Grafo </strong>— A informação não é os dados estáticos, mas as conexões e relacionamentos entre os elementos do banco de dados, ou seja, funciona com uma abordagem de relacionamento em primeiro lugar. Ele é baseado em grafos direcionais, portanto possui vértices — Nodes, que são objetos de qualquer tipo, portanto podem conter campos. O grafo possui aresta que mostram as conexões entre os vertices e possui propriedades que armazenam informações adicionais. Sistemas típicos são <a href="https://en.wikipedia.org/wiki/TigerGraph">TigerGraph</a> com GSQL, e <a href="https://en.wikipedia.org/wiki/Neo4j">Neo4j</a> com linguagens Cypher. <a href="https://en.wikipedia.org/wiki/ArangoDB">ArangoDB</a>, por exemplo, além de grafos também trabalha com documentos e pares chave-valor. Permite evitar entidades Associativas, Junções e Tabelas de pesquisa que estão disponíveis para bancos de dados relativos e fornecem esquemas adicionais, conexões e arquiteturas mais complexas. Como os bancos de dados grafos se concentram em relacionamentos, essa abordagem é mais conveniente para armazenar dados interconectados com relacionamentos complexos. Um exemplo desse problema é a <a href="https://memgraph.com/blog/why-your-business-should-use-a-graph-database">otimização de cadeias</a>, que ocorre em cadeias produtivas, quando é preciso obter peças diferentes de fornecedores diferentes e obter o produto final, os problemas logísticos podem ser melhorados indefinidamente. Ele é usado para garantir a segurança da internet, para evitar fraudes de cartões bancários, quando é necessário analisar muitas transações consecutivas, para encontrar desvios. Isso pode exigir elementos de aprendizado de máquina.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/761/1*41rRALLazcALUaTECc9veQ.png" /></figure><p><a href="https://en.wikipedia.org/wiki/Document-oriented_database"><strong>Base orientado a documentos</strong></a><strong> </strong>— destinam-se ao uso geral, portanto, dados não homogêneos podem ser armazenados no mesmo documento, o que causa problemas de normalização. É o principal tipo de banco de dados não relacional e um subconjunto de bases de pares chave-valor. É o conceito diametralmente oposto dos bancos de dados relacionais. Bancos de dados baseados em documentos e os outros usam o <a href="https://medium.com/spidernitt/orm-and-odm-a-brief-introduction-369046ec57eb">Mapeamento de Documentos de Objeto</a>, mas isso é <a href="http://www.pps-design.org/arch:orm-nosql">problemático</a> porque, diferentemente dos bancos de dados relasionais, os bancos de dados não relasionais não têm standardização, cada base tem sua própria singularidade e o desenvolvimento de um ODM de uso limitado não é economicamente viável. As informações são armazenadas no documento como JSON, XML ou outro formato. No domínio do banco de dados, o documento é acessível por meio de um índice ou chave exclusiva, e como metadadas. Exemplos de bancos de dados são <a href="https://en.wikipedia.org/wiki/MongoDB">MongoDB</a> e RedisJSON.</p><p><a href="https://en.wikipedia.org/wiki/Wide-column_store"><strong>Wide Column Database</strong></a><strong> </strong>— a informação é a coluna completa, cada coluna é um ficheiro separado e pode ser armazenado separadamente na memória. A obtenção de dados específicos é mais rápida porque a coluna contém o mesmo tipo de dados que é serializado ou desserializado rapidamente. À primeira vista, o banco de dados baseado em colunas <a href="https://docs.microsoft.com/en-us/azure/architecture/data-guide/big-data/non-relational-data">pode parecer muito semelhante</a> aos relacionais, mas as colunas podem ser facilmente alteradas. Pode ser representado como um par chave-valor bidimensional.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/817/1*9ffbydgo2NzcfONpusUdIw.png" /></figure><p>Existem diferentes implementações de bancos de dados baseados em colunas, no contexto de cada implementação a prioridade de linha ou coluna é diferente, ou seja, na base, além da coluna, a linha também pode ter um papel. Ou o sistema de gerenciamento de banco de dados, DBMS pode ter uma importância em bancos de dados <a href="https://en.wikipedia.org/wiki/Column-oriented_DBMS">orientados a colunas</a>. No caso de base <a href="https://en.wikipedia.org/wiki/Super_column">Super coluna</a>, cada elementօ — coluna, também pode ser um composto e conter mais de 1 subelemento. A imagem mostra como outras subtabelas virtuais são criadas numa tabela.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/478/1*ikTtm7XfdQrz5iC5H7G58g.png" /></figure><p>Um caso especial é “JSON”, que contém um objeto, que possui outros sub-objetos, eles também possuem seus sub-objetos e etc.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1028b63efa8d79b4c5b072feb27635c6/href">https://medium.com/media/1028b63efa8d79b4c5b072feb27635c6/href</a></iframe><p>Observando a aparência da árvore, vemos a existência de subcampos:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*-XBwJLVP3HvSkb26m3z6jA.png" /></figure><p>Todo o banco de dados é um <a href="https://en.wikipedia.org/wiki/Keyspace_(distributed_data_store)">Keyspace</a>.</p><p>Os exemplos óbvios são <a href="https://www.influxdata.com/what-is-time-series-data/">séries temporais</a>, como temperatura, atividade sísmica, dados biométricos e outros eventos periódicos. Por exemplo, um dia do mês é a chave para a coluna e os dados sobre a atividade sísmica são os dados da linha inteira. As <a href="https://logz.io/blog/nosql-database-comparison/">tecnologias</a> são linguagem CQL, Apache HBase և <a href="https://www.scylladb.com/glossary/wide-column-database/">ScyllaDB</a>.</p><p><strong>Bases do mecanismo de pesquisa</strong> — projetado para trabalhar com grandes quantidades de dados em tempo quase real. Tecnologias bem conhecidas são <a href="https://en.wikipedia.org/wiki/Apache_Solr">Solr</a> e <a href="https://www.elastic.co/guide/en/cloud/current/ec-api-principles.html">Elasticsearch</a>. O <a href="https://aws.amazon.com/opensearch-service/the-elk-stack/what-is-elasticsearch/">Elasticsearch</a> fornece APIs REST e usa documentação de formato JSON perfeita sem esquema. As consultas entre endpoints são executadas por meio (XXX) de verbos HTTP, como GET, POST, PUT ou PATCH e DELETE. Os documentos estão localizados em servidores diferentes, portanto, as consultas funcionam em paralelo. A base de dados é pré-indexada, permitindo recuperar os dados mais rapidamente.</p><p><strong>Multi model</strong> — combina os princípios de bancos de dados relativos e não relativos. Um exemplo de banco de dados é a <a href="https://fauna.com/">Fauna</a> API, que é compatível principalmente com o GraphQL, mas muitas <a href="https://docs.fauna.com/fauna/current/drivers/csharp">linguagens de programação</a> também podem usar o Fauna para suas consultas próprias (XXX). JSON é usado com pouca frequência e Replicação não é necessária aqui.</p><p>Ao implementar conceitos de banco de dados na vida real, temos <a href="https://www.dataversity.net/review-pros-cons-different-databases-relational-versus-non-relational/">2 modelos principais</a>, relacionais e não relacionais.</p><p>Ao trabalhar (XXX) com bancos de dados, estamos lidando com uma série de conceitos, por exemplo:</p><p>1. Database</p><p>2. Cloud,</p><p>3. Data Warehouse e Data Lake,</p><p>4. OLAP e OLTP,</p><p>5. Quantitative e Qualitative,</p><p>6. Data model, Database model</p><p>7. Structurized e Unstructured,</p><p>8. Replication e Duplication,</p><p>9. Functional Dependency, Partial Dependency, Transitive Dependency</p><p>10. Key,</p><p>11. Normalization, Normal Forms,</p><p>12. Partitioning and Sharding,</p><p>13.CRUD,</p><p>14. Indexing,</p><p>15. View,</p><p>16. Union, Intersect, Except</p><p>17. Transaction,</p><p>18. Stored Procedures</p><p>19. JOIN</p><p>20. Triggers</p><p>21. Schema</p><p><strong>1. Banco de dados </strong>— um ambiente abstrato de armazenamento, que muitas vezes ocupa memória real e dispositivos físicos, claro, existem modificações específicas para cada situação.</p><p><strong>2. Nuvem</strong> — sistema de servidor remoto e base de dados para atividades de negócios.</p><p><strong>3. Data Warehouse</strong> — um sistema centralizado para (da XXX) inteligência de negócios e análise científica. Eles são capazes de processar petabytes de informação alcançando, diferentemente das bases de dados clássicos, supercomputadores são usados como fonte de hardware. Teoricamente utiliza Dados Estruturados e Dados Semiestruturados, consequentemente possui normalização, pureza e singularidade dos dados. Possui uma arquitetura de três camadas:</p><p>1) Bottom layer — consiste no servidor principal, que geralmente é um base relacional, realizando o processo <a href="https://rivery.io/blog/etl-vs-elt/">ETL ou ELT</a>,</p><p>2) Middle layer — consiste em <a href="https://www.ibm.com/cloud/blog/olap-vs-oltp">OLAP</a>, camada de processamento analítico online, que agiliza as consultas,</p><p>3) Top layer — é o front-end ou interface semelhante.</p><p>Combina informações de <a href="https://www.dataversity.net/review-pros-cons-different-databases-relational-versus-non-relational/">sistemas</a> de transações como CRM, HRM e ERP, bases de dados de processamento de dados em tempo real, até bancos de dados não relacionais como <a href="https://en.wikipedia.org/wiki/Flat-file_database">flat files</a> e outros ficheros. Está disponível para uso final como software, tecnologia de nuvem ou hardware.</p><p>Convencionalmente, pode-se comparar com “Stack” quando há regulamentação.</p><p><strong>Data Lake</strong> — um sistema de uso geral para <a href="https://pt.wikipedia.org/wiki/BLOB">objetos grandes binários</a>, como fotos, vídeos ou áudio. Dados não estruturados podem ser armazenados <a href="https://blogs.oracle.com/bigdata/post/data-lake-data-warehouse-and-databasewhatx27s-the-difference">eficiente</a>. Em caso de <a href="https://en.wikipedia.org/wiki/Data_lake">má administração</a>, transforma-se em <a href="https://www.nvisia.com/insights/data-swamp">Data Swamp</a>. Pode ser comparado ao conceito de “Heap”.</p><p>A <a href="https://aws.amazon.com/big-data/datalakes-and-analytics/what-is-a-data-lake/">comparação</a> de Data Warehouse e Data Lake está na tabela.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*15C_rB55FUzZlMljpYh67A.png" /></figure><p><strong>4. </strong><a href="https://www.ibm.com/cloud/learn/olap"><strong>OLAP</strong></a><strong> ou Processamento Analítico Online </strong>— Análise multidimensional de dados armazenados em Data Warehouse. As dimensões são localização, tipo de objeto, tempo, etc. Por utilizar bases de dados relacionais bidimensionais, as tabelas são combinadas para formar dados multidimensionais (XXX a partir) de camadas. As consultas são complicadas e contêm um grande número de linhas. Eles não alteram os dados existentes, pois a maioria deles apenas os lê (XXX).</p><p><a href="https://www.ibm.com/cloud/learn/oltp"><strong>OLTP</strong></a><strong> ou Online Tansactional Processing </strong>— processamento de transações em escala larga. Garante que a mesma informação seja usada por muitos computadores, também indexa os dados. As consultas são simples e contêm algumas linhas. A mudança de dados é rápida. Os sistemas de pagamento online são um bom exemplo.</p><p><strong>5. Dados quantitativos</strong> — somente pela sua existência já possuem uma descrição objetiva, são descritos por indicadores estatísticos — quantidade, valor, tamanho, etc. Podem ser discretos ou contínuos. Eles combinam com dados estruturados.</p><p><strong>Dados qualitativos</strong> — dados agrupados, agrupados de acordo com qualquer atributo. Como a unificação é um fenômeno subjetivo e pode ser realizada de muitas outras formas, os dados qualitativos são não estruturados ou semiestruturados, ou seja, há necessidade de maiores esclarecimentos e classificação. Corresponder a dados não estruturados.</p><p>6. <a href="https://en.wikipedia.org/wiki/Data_model">Modelo de Dados</a> — é obtido por <a href="https://en.wikipedia.org/wiki/Data_modeling">modelagem</a>, dá aos dados uma estrutura semântica, define a relação entre si e a semelhança com as propriedades dos objetos do mundo real.</p><p>Modelo de Base — define a estrutura lógica do banco de dados. Os modelos são rede, documento, relacional, Entidade-atributo-valor, etc.</p><p><strong>7. Dados Estruturados</strong> — Dados quantitativos compostos por números e valores, apresentados em forma de tabelas, possuem modelos pré-definidos, armazenados em Data Warehouses, as consultas são feitas em SQL ou linguagem similar. Estrutura de dados brutos que ainda não foram processados, podem obter uma estrutura mesmo <a href="https://www.searchenginejournal.com/this-is-structured-data/379148/">marcando-os</a> como linguagem HTML (XXX). O site pode ser otimizado para se tornar mais perceptível pelo mecanismo de busca.</p><p><strong>Dados não estruturados</strong> — dados qualitativos, o estado inicial dos dados quando o modelo de dados está ausente, portanto, é fácil obter grandes quantidades, o que requer muita memória. Porque pode ser adaptado a diferentes formatos de arquivo, pode ser redefinido para necessidades específicas e obter um uso eficiente dos recursos. Os casos de uso são <a href="https://www.ibm.com/cloud/blog/structured-vs-unstructured-data">Data mining</a>, <a href="https://www.ibm.com/cloud/learn/natural-language-processing">NLP</a> e preditive analytics, armazenados de forma mais eficiente em Cloud Data lakes, desenvolvidos em sistemas NoSQL.</p><p>Para dizer brevemente, os dados do banco de dados podem ser estruturados ou não estruturados, tipos mistos também são possíveis. Os dados que possuem um Data Model são estruturados, que são obtidos por modelagem, ou seja, dá aos dados uma estrutura semântica, define a relação entre eles, a semelhança com as propriedades dos objetos do mundo real. Existem também os tipos semiestruturados.</p><p><strong>8. Replicação </strong>— o software especial encontra as alterações feitas em diferentes partes da base de dados e faz com que todas as peças pareçam iguais, ou seja, cancela as alterações ou espalha a alteração em outras partes.</p><p><strong>Duplicação </strong>— 1 base de dados principal é escolhido e seu conteúdo duplicado, outras alterações são feitas com esse 1 base de dados principal. É o mesmo Backup.</p><p><strong>9. Dependência Funcional</strong> — restrição, escrita “X → Y”, onde “X” está associado a “Y”. Por exemplo, o número de identificação do veículo, VIN, associado à potência do motor, está escrito “VIN → Motor”, porque um determinado carro tem apenas 1 capacidade. A notação “Motor → VIN” está incorreta, pois há muitos carros com a mesma capacidade. Na tabela, o aluno pode se matricular em mais de uma aula e ter qualquer número de semestre.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/536/1*wyoLZw1UzphJIwBRYtVKzw.png" /></figure><p>Quando 2 linhas na tabela têm o mesmo “ Student ID”, elas têm o mesmo valor de “Semester”. Aqui temos uma dependência funcional “StudentID → Semestre”. Outro exemplo de dependência é a relação {StudentID, Lecture} → {TA, Semester} quando temos um conjunto de atributos {StudentID, Lecture} pré-selecionado e {TA, Semester} onde {StudentID, Lecture} é uma superchave.</p><p>No exemplo a seguir, cada funcionário pode ter apenas 1 “Department ID”. Como todos podem trabalhar apenas em um departamento, o ID do funcionário também define o departamento, como {ID do funcionário → ID do departamento}.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/713/1*hCk7a4O8wasE3k1Mm1VCnA.png" /></figure><p>O Employee ID é definido pelo nome do funcionário — {Employee ID → Employee Name}. Há também uma dependência funcional na tabela com um atributo não chave — {Department ID → Department Name}. Embora haja uma dependência funcional em {Employee ID → Department ID}, obter “Department ID” usando “Employee ID” não é lógico.</p><p><a href="https://www.tutorialspoint.com/Partial-Dependency-in-DBMS"><strong>Dependência parcial</strong></a><strong> </strong>— ocorre quando uma coluna não-chave é funcionalmente dependente de uma das partes das colunas-chave candidatas.</p><p>Considere o exemplo.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*9KvZCACpLgyLFAfobcD_ew.png" /></figure><p>A chave primária consiste nas colunas StudentID e ProjectNo. As colunas StudentName e ProjectName devem depender da chave primária. StudentName pode ser determinado por StudentID e ProjectName pode ser determinado por ProjectNo. Portanto, temos uma dependência parcial. Isso também viola as regras da 2ª forma normal.</p><p><strong>Dependência transitiva </strong>— um tipo de dependência funcional quando a 1ª coluna está conectada à 3ª através da 2. A tabela abaixo mostra um exemplo:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/939/1*kT0nHQVBwq1z6YI6teMnAw.png" /></figure><p>Se conhecemos o livro, também sabemos a nacionalidade do autor, {Book} → {Author nationality}, porque usando o livro primeiro encontramos o autor, {Book} → {Author}, e depois usando o autor, encontramos o nacionalidade do autor, { Author → Author Nationality}. Aqui, o atributo não-chave define outro atributo não-chave.</p><p><strong>10. Chave </strong>— um atributo ou coluna que permite identificar uma linha. Existem grupos.</p><p>1) <a href="https://en.wikipedia.org/wiki/Superkey">Super Key</a> — um conjunto de atributos que identifica exclusivamente cada linha, não possui requisitos mínimos de tamanho, podendo incluir outras chaves mais compactas. Define a dependência funcional.</p><p>2) <a href="https://en.wikipedia.org/wiki/Candidate_key">Candidate key</a> — como uma “Super Key” mas com o tamanho mínimo possível. As colunas que fazem parte disso são chamadas de “Prime Attribute”, outros atributos são chamados de “Non-Prime attribute”. Uma tabela sem valor “NULL” tem pelo menos 1 “ Candidate key”. São todas as combinações possíveis para identificar a linha.</p><p>3) <a href="https://en.wikipedia.org/wiki/Primary_key">Primary Key</a> — uma seleção que consiste em um conjunto mínimo de atributos que define exclusivamente a linha. É um caso especial de “ Candidate key”. O máximo pode ser de 16 colunas e 900 bytes.</p><p>4) <a href="https://en.wikipedia.org/wiki/Foreign_key">Foreign key</a> — um conjunto de colunas que consiste na chave primária de outra tabela. A tabela que contém a “ Foreign Key” é chamada de filha e aquela que contém a chave primária é chamada de pai. A chave escrita na tablea filha é igual à chave primária de outra tabela ou tem um valor NULL. Isso é chamado de <a href="https://en.wikipedia.org/wiki/Referential_integrity">integridade referencial</a>.</p><p>5) Chave simples — uma chave que consiste em apenas um atributo, uma coluna.</p><p>6) Chave concatenada — consiste em 2 ou mais colunas.</p><p>7) <a href="https://www.bbc.co.uk/bitesize/guides/z4wf8xs/revision/4">Compound key</a> — consiste em 2 ou mais colunas, que são a chave primária mostrando outra tabela.</p><p>8) <a href="https://en.wikipedia.org/wiki/Composite_key">Composite key</a> — um caso especial de chave primária, consistindo em 2 ou mais colunas, das quais pelo menos 1 não é uma chave simples. Considere a <a href="https://www.bbc.co.uk/bitesize/guides/z4wf8xs/revision/4">tabela</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/941/1*1EJ6ql6q8qtcI6T1h-6Xzw.png" /></figure><p>Não é possível obter um valor com apenas 1 campo, pois há valores duplicados em cada coluna. Combinando os valores das colunas “Team” e “Squad number” criamos a Primary key.</p><p>9) <a href="https://en.wikipedia.org/wiki/Natural_key">Natural key</a> — um identificador exclusivo, que também coincide com o objeto do mundo real, tem um significado comercial.</p><p>10) <a href="https://en.wikipedia.org/wiki/Surrogate_key">Surrogate key</a> — um identificador único, que por si só é um valor (XXX), está mais preocupado (XXX) com a estrutura lógica dos dados, o Data Model, do que com a estrutura física da memória, o <a href="https://en.wikipedia.org/wiki/Storage_model">Storage model</a>. Ele pode atuar como uma chave primária no contexto de algum banco de dados específico. É uma chave com um <a href="https://www.mssqltips.com/sqlservertip/5431/surrogate-key-vs-natural-key-differences-and-when-to-use-in-sql-server/">valor gerado automaticamente</a> ao registrar valores de teste no banco de dados.</p><p><strong>11. </strong><a href="https://en.wikipedia.org/wiki/Database_normalization"><strong>Normalization</strong></a><strong> </strong>— O processo de construção de bases de dados relationais usando formas normais para reduzir a duplicação de dados e aumentar a integridade dos dados. Colunas e Tabelas são organizadas para que as dependências sejam implementadas de acordo com as restrições de integridade da bases de dados. É realizado por síntese de bases ou por decomposição, ou seja, construindo ou destruindo novas hierarquias de tabelas. Trazer uma forma normal também pode ter um efeito negativo na velocidade, dificultar a gravação de consultas etc. e pode exigir a desnormalização. O conceito se aplica apenas a (à bases) bancos (XXX) de dados relationais, embora bases não relationais também possam ser melhorados (XXX), mas com outros conceitos e abordagens.</p><p><strong>Formas normais</strong> — Estratégias usadas para normalização, cada nível subsequente também satisfaz o nível anterior.</p><p><strong>1ª forma normal</strong> — cada coluna deve ter células de valor único, valores duplicados não são permitidos. Em vez (XXX instead of) de armazenar valores duplicados em uma linha com um ID específico, você deve escrever os itens duplicados separadamente em uma tabela separada usando o mesmo ID.</p><p>Considere um exemplo de uma tabela incorreta.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/902/1*SRwnVaIdIqIGlorg1L_-iA.png" /></figure><p><strong>2ª forma normal </strong>— não há atributo non-prime que seja funcionalmente dependente (XXX) de qualquer subconjunto de chaves candidatas. Ou seja, as colunas que não são primárias não devem ser funcionalmente dependentes das colunas candidatas à chave primária. Com uma chave primária de 1 coluna, a tabela está sempre na segunda forma normal. Antes de se tornar o 2º cavalo, a tabela deve estar na 1ª forma normal.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/527/1*5bkFDnXydNZKjnHtITujFw.png" /></figure><p>A provável chave primária nesta tabela é um composto que consiste nas colunas “Manufacturer” e “Model”. A coluna “Manufacturer country” não é a chave primária, nem pode ser considerada como tal, e depende do “Manufacturer”. Esta é uma violação das condições da 2ª forma normal. Para cumprir os requisitos é necessário ter 2 mesas.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/791/1*WbTKAnhJp3XAfVV6W8Gdog.png" /></figure><p>Tabela contendo Dependência parcial.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*9KvZCACpLgyLFAfobcD_ew.png" /></figure><p>Para trazer a 2ª forma normal, dividimos em partes.</p><p>Para trazer a tabela para a 2ª forma normal, dividimos em partes. (XXX)</p><p>Para trazer tablea a 2ª forma normal, dividimos-la em partes. (XXX)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/816/1*a0G6oFrxDfom3YIzMeiAMQ.png" /></figure><p>No exemplo a seguir também, a segunda forma normal é violada.</p><p>A chave primária consiste nas colunas “PART” e “WAREHOUSE”, mas a coluna “WAREHOUSE_ADDRESS” depende apenas da coluna “WAREHOUSE”. O mesmo “WAREHOUSE” pode ter endereços diferentes em linhas diferentes. Devemos garantir que todo Warehouse tenha sempre 1 endereço, ou seja, o Armazém (XXX ele) deve ser usado como chave primária, escrito em uma tabela separada.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/761/1*-eiz2bG7GVL7T0Z7IislFQ.png" /></figure><p><a href="https://en.wikipedia.org/wiki/Third_normal_form">3rd normal form</a> — as colunas que não pertencem à chave primária, não devem depender das colunas que não pertencem à chave, coluna não-chave deve depender apenas da coluna chave. Define redução de duplicação, facilita o gerenciamento de dados e integridade referencial. Esta tabela já é a 2ª forma, mas não corresponde à 3ª forma normal.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/703/1*9IWShazISrP7xE1Y3341xA.png" /></figure><p>O Torneio e o seu Ano, são suficientes para identificar a linha de forma única, são a chave primária. Mas o problema é que a coluna não chave “Data de Nascimento” depende da chave primária com a coluna mediadora “Vencedor”, então é permitido que a mesma pessoa possa aparecer com datas de nascimento diferentes. Ao dividir a tabela em partes, resolvemos o problema. A coluna “Vencedor” é a chave à qual apenas 1 valor já corresponde.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/894/1*cw5mcSd9Ecwa_NgERZ4edg.png" /></figure><p><strong>Boyce-Code ou 3–5 Normal Form </strong>— Uma tabela na 3ª forma normal que não possui chaves candidatas correspondentes. Existe uma <a href="https://www.studytonight.com/dbms/boyce-codd-normal-form.php">dependência</a> A → B onde “A” é uma super chave, então outras colunas, como “B”, são encontradas usando super chave. Deve haver apenas chave primária.</p><p><strong>4th Normal Form</strong> — a tabela não contém 2 ou mais dados independentes de valores múltiplos (XXX Table does not contain 2 or more independent, multi-valued data). Existem 2 conexões — “Employee e Skill Proficiency” e “Employee e Language Proficiency”. Você não pode ter relações “Skill Code e Language Proficiency”, e “Language Code e Skill Proficiency”, eles não estão relacionados entre si.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/849/1*lZ3cQcAGL2bWuhM2Oso89A.png" /></figure><p>Se <a href="http://kseminar.staff.ipb.ac.id/files/2014/02/NormalForms.pdf">preenchermos</a> essa tabela com dados, escreveremos valores “Null”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/378/1*bpEs__H-UpySoZOxmi8ZYw.png" /></figure><p>Para corrigir, escrevemos o seguinte. Não há necessidade de escrever “Null”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/909/1*JptTTKZERifrHQBV2IUrMQ.png" /></figure><p><strong>5th Normal Key</strong> — A chave composta não contém dependências cíclicas.</p><p><strong>12. </strong><a href="https://en.wikipedia.org/wiki/Partition_(database)"><strong>Partitioning</strong></a><strong> </strong>— divisão em unidades independentes. Existem 2 formas na base relacional, horizontal e vertical. Um exemplo de segmentação vertical é a normalização, quando ao invés de (XXX instead of) ter 5 colunas em 1 tabela, temos 2 ou mais tabelas com menos de 5 colunas. A divisão horizontal é chamada de “Sharding”. Considere a <a href="https://medium.com/@jeeyoungk/how-sharding-works-b4dec46b3f6">imagem</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/766/1*C7DnNVFFRaQ53C-HpzfQSA.png" /></figure><p><a href="https://en.wikipedia.org/wiki/Shard_(database_architecture)"><strong>Sharding</strong></a><strong> </strong>— camadas horizontais, de modo que as peças recém-obtidas mantenham o esquema de base e colunas. Uma planilha ou documento é fragmentado porque é difícil trabalhar com um pedaço pedaços, e pedaços pequenos podem ser armazenados em bases diferentes (XXX diferentes bancos de dados) ou em um servidor, processados em paralelo com diferentes processadores (XXX). Melhora a indexação e procurando (XXX). O <a href="https://docs.oracle.com/en/cloud/paas/nosql-cloud/csnsd/shard-keys-and-primary-keys.html">Sharding Key</a> pode ser usada para a transação de particionamento. Elementos com a mesma chave tornam-se unidades inseparáveis, mudam juntos, formam uma unidade lógica — “Logical Shard”.</p><p><strong>13. CRUD </strong>— Operações básicas “Criar”, “Ler”, “Atualizar” e “Excluir” para gerenciar o banco de dados.</p><p>Com os comandos “CREATE” e “INSERT” são usados para criar a tabela e inserir os dados, em seguida lemos os dados.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/40098321d9310306625c9bba6b14f7a0/href">https://medium.com/media/40098321d9310306625c9bba6b14f7a0/href</a></iframe><p>A tabela de livros contém ID, título, ISBM e nomes de autores e editora. Nem todos os livros têm 2 autores e uma editora.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*EM54Wz4lEKBCVivKqqDqpg.png" /></figure><p>A primeira parte do código a seguir adiciona uma nova coluna para patronímicos na tabela USER, altera os valores NULL padrão e exclui a mesma coluna (XXX). As linhas que contêm compras feitas antes de 2019 são excluídas. Ao final, a tabela e a base são deletados com o comando “DROP”.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/335fd28eb9c02422f308a1a42cdf0a63/href">https://medium.com/media/335fd28eb9c02422f308a1a42cdf0a63/href</a></iframe><p>Ao adicionar uma coluna, temos a seguinte imagem.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/809/1*fEniIW3xiLBoVixZ7wZwIQ.png" /></figure><p><strong>14. </strong><a href="https://stackoverflow.com/questions/1108/how-does-database-indexing-work"><strong>Indexing</strong></a><strong> </strong>— desenvolvimento de consultas que leem dados mais rapidamente, criação de novas colunas (1). Eles estão próximos das chaves de significado. Assim como uma chave é um atributo que descreve dados, um índice é um atributo adicional. É claro que para salvar o recurso adicional pode ser necessária uma memória. Se soubermos o índice de uma determinada linha, trabalharemos com esse local de uma só vez, não haverá necessidade de pegar a tabela inteira. Vamos anunciar um índice.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/74ac0db7464e17b11b5fc327ddd20070/href">https://medium.com/media/74ac0db7464e17b11b5fc327ddd20070/href</a></iframe><p>Na primeira parte do código temos que deletar todas as linhas da tabela, e verificar o título. Na segunda parte aceleramos a execução da consulta. Deve-se notar que a vantagem da indexação é óbvia quando usada em tabelas grandes.</p><p><strong>15. View </strong>— uma tabela lógica que exibe apenas dados, mas não é armazenada fisicamente na memória (2). O código cria “VIEW”, que incluirá livros C# com 2 autores e, em seguida, modificará para ver todos os livros SQL.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1bcc6d0722ff5d964e1d2e5357d75bde/href">https://medium.com/media/1bcc6d0722ff5d964e1d2e5357d75bde/href</a></iframe><p>O resultado do trabalho da primeira parte do código.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*6QztyMj92eIzlj5RDZv2wA.png" /></figure><p>O “VIEW” após a mudança.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*KgTTWZi-Y_JfUwFs3Vv2Gw.png" /></figure><p><strong>16. UNIÃO, EXCETO e INTERSECT </strong>— criação de combinações de linhas (3).</p><p><strong>17. Transaction </strong>— Contexto de 1 ou mais operações, unidade de trabalho (4).</p><p>O algoritmo de pseudocódigo é o seguinte:</p><p>1. Inicie uma transação com “BEGIN TRAN”</p><p>2. Faça consultas, alterações de dados</p><p>3. Se não houver problema, escreva “Commit” para finalizar</p><p>4. Se houver algum problema, retorne à sua posição original com rollback.</p><p>Existem 3 versões.</p><p>1. Explicit transaction — inicia diretamente com o comando “BEGIN TRANSACTION”, termina com o comando “COMMIT TRANSACTION” ou “ROLLBACK TRANSACTION”.</p><p>2. Implicit transaction — é como uma transação explícita, funciona com os comandos “COMMIT TRANSACTION” e “ROLLBACK TRANSACTION”, mas com o comando “SET IMPLICIT_TRANSACTIONS ON” você deve iniciar uma transação “oculta”, após a qual os objetos da transação serão “bloqueado”. Nesse caso, eles continuam sendo desenvolvidos usando os comandos “Commit” e “Rollback”.</p><p>3. Auto-commit transaction — uma transação que ocorre de tempos em tempos, que não é feita explícita ou implicitamente. Os comandos “SELECT” e “INSERT” são um exemplo de transação automática. Em caso de inserção de dados inconsistentes, o “Rollback” ocorre automaticamente, e os dados não são alterados devido a um erro.</p><p>Cada transação deve atender a 4 condições chamadas — ACID.</p><p>1. Atômica — todas as operações são tão inseparáveis quanto um átomo, executadas em conjunto ou falhando em conjunto.</p><p>2. Consistente — o resultado é previsível, antes da transação a base permanece estável, infalível.</p><p>3. Isolado — garante que, em vez de atuar nos mesmos dados ao mesmo tempo, os dados sejam sequenciados.</p><p>4. Durável — o resultado final não depende do processo de execução. Se houver um resultado depois de (XXX) transação completo, após o recebimento do qual o sistema falhou, o resultado não deve desaparecer.</p><p>Checkpoint — algoritmo, que transfere os dados armazenados no log de transações e os dados alterados durante o processo de transação para a memória física. Primeiro, Log files são armazenados na memória, os dados brutos do cache do buffer, vão para a memória, o Checkpoint Log Sequence Number é gravado na página de inicialização ou boot page. Existem <a href="https://academy.sqlbak.com/checkpoint/">4 tipos</a> — Automatic, Indirect, Manual e Internal. Cada alteração feita na transação <a href="https://codingsight.com/database-checkpoints-in-sql-server/">não é imediatamente transferida</a> do buffer pool para a memória, mas é feita de acordo com o princípio “Checkpoint”’.</p><p>A maioria das consultas DDL no T-SQL são transacionais (5).</p><p><strong>18. Stored Procedures </strong>— um objeto armazenado na base de dados, pode aceitar parâmetros, também pode retornar (6).</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/105b911533a6998e27b34d2cb0105959/href">https://medium.com/media/105b911533a6998e27b34d2cb0105959/href</a></iframe><p>Para executar o procedimento use “EXEC GetProduct”.</p><p><strong>19. JOIN </strong>— uma ferramenta para selecionar colunas de 2 ou mais tabelas (7). Existem muitos modelos matemáticos, mas no T-SQL existem <a href="https://docs.microsoft.com/en-us/sql/relational-databases/performance/joins?view=sql-server-ver15">5 tipos lógicos</a> — Inner Join, Left Outer, Join Right, Outer Join, Full Outer Join e Cross Join. Aparência principal․</p><p>SELECT</p><p>FROM Table A</p><p>JOIN Table B</p><p>ON …</p><p>WHERE …</p><p>Primeiramente criamos tabelas para armazenar os dados do Buyer, Product e Order.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0c0f5268c62412cef3ff00d83cf93306/href">https://medium.com/media/0c0f5268c62412cef3ff00d83cf93306/href</a></iframe><p>Após preencher os dados usando o comando INSERT INTO, obtemos as tabelas Buyer, Product e Order com o comando SELECT.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*f4qAt7VOxdBG_R3SE6Zmlw.png" /></figure><p>Usando a tabela Order, podemos descobrir quem comprou o quê (XXX).</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/90800451bed9d56f3ea642b9fcc91212/href">https://medium.com/media/90800451bed9d56f3ea642b9fcc91212/href</a></iframe><p>Pegamos o nome, sobrenome, cidade da tabela de Buyer. Selecionamos o nome do produto na tabela de produtos. Mas temos que combinar a tabela de Buyer com as tabelas de Products e Orders. O resultado é ordenado alfabeticamente.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/439/1*8bKRytPkJjOiyk9GFIOi9Q.png" /></figure><p><strong>20. Triggers</strong> — é um stored procedure executado após um evento (8). Os DML Triggers funcionam após eventos específicos como Inserir, Excluir e Atualizar. Eles são compilados com antecedência e começam a funcionar automaticamente. Um Trigger é declarado, o evento é definido, o corpo é escrito.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/cb544b7c2c4d1b2687172adc570ecbd1/href">https://medium.com/media/cb544b7c2c4d1b2687172adc570ecbd1/href</a></iframe><p>Linhas com IDs maiores que 16 são excluídas da tabela de Order, mas a exclusão ativa os gatilhos que adicionam 2 pedidos novos (XXX). Ao examinar a coluna ID, garantimos que as linhas sejam excluídas primeiro e depois adicionadas novamente.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*kQAVX-C5d-1_jbwfZxe7uQ.png" /></figure><p>Também podemos criar JOIN dentro do corpo do Trigger.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ff53ebcd6197f5d5901690e5a1ca413c/href">https://medium.com/media/ff53ebcd6197f5d5901690e5a1ca413c/href</a></iframe><p>Assim que tentamos fazer algum INSERT, obtemos o texto “JOIN was done instead of INSERT” e a tabela JOIN.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/431/1*xT5RmYLS_jL_c1Y6a7-4Hw.png" /></figure><p><strong>21․ </strong><a href="https://www.ibm.com/cloud/learn/database-schema"><strong>Schema</strong></a><strong> </strong>— o conjunto de atributos de uma tabela ou relação e seus elementos. Ele é definido pelo código da linguagem de programação, como DDL (9), mas esse termo geralmente significa representação gráfica. O star schema é frequentemente usado durante a desnormalização (10). É o relacionamento das tabelas ou outras unidades no banco de dados, hierarquia e blueprint. É armazenado e descrito no dicionário, como metadados.</p><p>Deve-se entender que o desenho dos bancos de dados é baseado em pesquisas científicas e conceitos teóricos. Cada empresa pode fornecer sua arquitetura própria (XXX) de bases de dados para necessidades certas (XXX) de negócios.</p><p><strong>Recursos usados</strong></p><p>1) Learn SQL Database Programming, Query and manipulate DBs from popular relational DB servers using SQL, Chapter 4</p><p>2) SQL Pocket Guide, A Guide to SQL Usage, 4th Ed., Chapter 5</p><p>3) T-SQL Querying, Developer Reference, Chapter 3</p><p>4) Beginning T-SQL with Microsoft SQL Server 2005 and 2008, Chapter 10</p><p>5) Exam Ref 70–761 Querying Data with Transact-SQL, Chapter 3.2</p><p>6) Microsoft SQL Server 2019, A Beginner’s Guide, 7th Ed. Chapter 8</p><p>7) Beginning T-SQL, A Step-by-Step Approach, 4th Ed. Chapter 5</p><p>8) Beginning T-SQL, A Step-by-Step Approach, 4th Ed. Chapter 5, Chapter 13</p><p>9) Learn SQL Database Programming, Query and manipulate DBs from popular relational DB servers using SQL, Chapter 1</p><p>10) Database Design and Relational Theory, Normal Forms and All That Jazz, 2nd Ed., Chapter 8</p><p>Data Lake vs Data Warehouse — <a href="https://www.talend.com/resources/data-lake-vs-data-warehouse/">https://www.talend.com/resources/data-lake-vs-data-warehouse/</a></p><p>Data lake և data warehouse — <a href="https://www.ibm.com/cloud/blog/cloud-data-lake-vs-data-warehouse-vs-data-mart">https://www.ibm.com/cloud/blog/cloud-data-lake-vs-data-warehouse-vs-data-mart</a></p><p>Qualitative և Quantitative data — <a href="https://www.g2.com/articles/qualitative-vs-quantitative-data">https://www.g2.com/articles/qualitative-vs-quantitative-data</a></p><p>Structured e Unstructured data — <a href="https://www.ibm.com/cloud/blog/structured-vs-unstructured-data">https://www.ibm.com/cloud/blog/structured-vs-unstructured-data</a></p><p>Tipos de transações — <a href="https://www.sqlshack.com/modes-of-transactions-in-sql-server/">https://www.sqlshack.com/modes-of-transactions-in-sql-server/</a></p><p>Escreve-me no <a href="https://linkedin.com/in/vchgnmir">LinkedIn</a>, <a href="https://www.instagram.com/vachmir/">Instagram</a>, <a href="https://www.tiktok.com/@vachmir">Tiktok</a> e <a href="https://www.facebook.com/VachMir/">Facebook</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=297d23958373" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Database Classifications and The Main Concepts]]></title>
            <link>https://vachmir.medium.com/the-database-classifications-and-the-main-concepts-c09f9db1fc9f?source=rss-b9e92984cbe5------2</link>
            <guid isPermaLink="false">https://medium.com/p/c09f9db1fc9f</guid>
            <category><![CDATA[database]]></category>
            <category><![CDATA[transactions]]></category>
            <category><![CDATA[functional-dependency]]></category>
            <category><![CDATA[sql-server]]></category>
            <category><![CDATA[normalization]]></category>
            <dc:creator><![CDATA[Vachagan Mirzoian]]></dc:creator>
            <pubDate>Wed, 09 Mar 2022 11:27:44 GMT</pubDate>
            <atom:updated>2022-04-02T16:17:17.882Z</atom:updated>
            <content:encoded><![CDATA[<p>Programming is the job done with a specific algorithm with data. But first you have to keep some data. They are stored in a database. Many queries defined by <a href="https://en.wikipedia.org/wiki/Query_language">Query language</a> are used to get the information. These languages are made up of <a href="https://www.javatpoint.com/dbms-sql-command">5 logical parts</a>.</p><p>1) Data Definition Language, Data Description Language (DDL) — CREATE, ALTER, DROP TRUNCATE,</p><p>2) Data Manipulation Language (DML) — INSERT, UPDATE, DELETE,</p><p>3) Data Control Language (DCL) — GRANT, REVOKE,</p><p>4) Transaction Control Language (TCL) — COMMIT, ROLLBACK</p><p>5) Data Query Language (DQL) — SELECT</p><p>There are many principles for classifying databases and their management systems. According to business activity, one can distinguish <a href="https://en.wikipedia.org/wiki/Cloud_database">Cloud technologies</a> and <a href="https://en.wikipedia.org/wiki/Data_warehouse">Large warehouses</a>, which are for meeting the needs of the business.</p><p>According to the territorial distribution, we separate a <a href="https://en.wikipedia.org/wiki/Distributed_database">distributed database</a>, the data of which can be physically isolated from each other, but servers are equal, the data, being in <a href="https://www.scylladb.com/2021/12/22/what-do-you-mean-by-a-distributed-database/">separate computers</a>, are processed by different processors, the servers are interconnected by the Internet. They can be in the same Data center at the same physical address, but regardless of the geographical location of its sub-elements, the whole database is <a href="https://stackoverflow.com/questions/50062045/precise-difference-between-distributed-database-and-decentralised-database">1 logical unit</a> — <a href="https://www.scylladb.com/2021/12/22/what-do-you-mean-by-a-distributed-database/">Cluster</a>. In order to keep the passages adequate, there must be an intensive connection between them, for Replication and Duplication. Distributed <a href="https://www.tutorialspoint.com/distributed_dbms/distributed_dbms_database_environments.htm">databases are</a> Homogenous or Heterogenous. In the case of homogeneous systems, all servers use the same DBMS.</p><p>There is also a <a href="https://en.wikipedia.org/wiki/Centralized_database">Centralized database</a>, which is completely in one place. This option is often used in the case of LAN networks, when the organization occupies a limited space and uses a central server in which the database is located. There are several centers in a <a href="https://cointelegraph.com/explained/decentralized-and-distributed-databases-explained">Decentralized system</a>, like a centralized database, the sub-elements may differ in their rights and capabilities.</p><p>In terms of software architecture, databases can be either stand-alone systems from the client that uses them, or they can be <a href="https://en.wikipedia.org/wiki/Embedded_database">embedded</a> in the program, used as a library or any other project, such as SQLite. Other example is SQL Server Compact, working by <a href="https://en.wikipedia.org/wiki/Data_compaction">compacting</a> data to write more code in smaller volumes or by <a href="https://en.wikipedia.org/wiki/Data_compression">compressing</a> existing code by pressing the code into less physical memory.</p><p>In order to achieve speed, <a href="https://en.wikipedia.org/wiki/Parallel_database">parallel databases</a> are designed, especially for processing large volumes of information.</p><p>Data of database can be Structured or Unstructured, intermediate types are possible. The data that has a <a href="https://en.wikipedia.org/wiki/Data_model">Data Model</a> is Structured. There are also <a href="https://en.wikipedia.org/wiki/Semi-structured_data">Semi-structured</a> types.</p><p>Depending on the structured or unstructured being of the data model, databases also have <a href="https://en.wikipedia.org/wiki/Database_model">models</a>, relative or non-relative but some databases may work with more than 1 model. The classic example of relational databases is SQL. Non-relative databases are key-value based ones, Wide column, document orientated, some graph databases, and so on. With <a href="https://www.youtube.com/watch?v=W2Z7fbCLSTw">Search Engine</a> and multi–model databases include properties of 2 groups.</p><p>The table shows a comparison of the <a href="https://en.wikipedia.org/wiki/NoSQL#Performance">features</a> of the 5 fundamental models.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*Gak9KjAbTaQUmLHxcS8BBg.png" /></figure><p><a href="https://en.wikipedia.org/wiki/Relational_database"><strong>Relational Database</strong></a><strong> </strong>— Data is stored in tables, where Cartesian product is mathematical base allowing to combine or relate rows and columns with each other.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/570/1*3GzVkw8DSoF6e6_Bfr4tSw.png" /></figure><p>Classic examples are SQL, T-SQL and MySQL. Since a table is an unique and independent unit in a SQL database, all rows and columns must be equal, so before extending any row, a column must be added to the table, put the value at the intersection with the required row, and write “null” in the other fields.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/48bb8a34d55508be529c172815720081/href">https://medium.com/media/48bb8a34d55508be529c172815720081/href</a></iframe><p>We add a column, then delete the whole column, that is, it is not possible to delete only 1 specific box. Column-oriented databases were designed to correct this shortcoming. It can be compared to the work done with dynamic and static arrays, when in the case of dynamic arrays the length changes, and in the case of static arrays the best option is to write “null” or 0s. In relational databases, table normalization is extremely important. Data, relating to object, depending on the type, are grouped into separate tables so that only the homogeneous data is found in each table. In the case of a non-relative database, the specific object with all its fields is stored in a separate document, so mixed data are in one place.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/814/1*ws1iGRM_ycepXpqFENy5cA.png" /></figure><p>Object Relational Mappers are used to communicate the data querying language and the server–side language. It transforms the table relationships into objects or classes used by most programming languages, allowing them to break away from the many intertwined relationships between tables. SQL and .NET use Entity Framework, which allows you to work directly with the database using any .NET language, such as C# , but at the same time stay away from the database layer. So the Entity Framework is an interface without which we had to use ADO.NET, which involves writing code in SQL style.</p><p>The table shows the possible concepts և their meaning.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EBO04o6qZIyR82X8hBbYrg.png" /></figure><p><a href="https://en.wikipedia.org/wiki/Key%E2%80%93value_database"><strong>Key-value pairs</strong></a><strong> </strong>— data are objects of the Associative array working with the Hash Table”, or are elements of the Dictionary, in other words, row is the data, where each row is a separate unit. Unlike other databases, in this case the empty fields are not filled with placeholders, due to which the memory is not overloaded. It is the <a href="https://www.ibm.com/cloud/learn/nosql-databases">simplest form</a> and the main abstraction of non-relative bases. Many applications, using languages like <a href="https://aws.amazon.com/redis/">Redis</a>, operate on an in-memory basis, that is, information is transferred to a client computer. It is effective for caching, real-time operations, etc.</p><p><strong>Graph</strong> — The main information is not the static data but the connections and relationships between the elements of the database, in other words, it works with a relationships-first approach. It is based on directional graphs, so it has vertices — Nodes, which are objects of any type, so can contain fields. Graph has also edge that shows the connections between vertices and properties that store additional information. Typical systems are <a href="https://en.wikipedia.org/wiki/TigerGraph">TigerGraph</a> with GSQL, and <a href="https://en.wikipedia.org/wiki/Neo4j">Neo4j</a> with Cypher languages. <a href="https://en.wikipedia.org/wiki/ArangoDB">ArangoDB</a>, for example, in addition to graphs works also with documents and key-value pairs. Allows you to avoid Associative entities, Joins e Lookup tables that are available for relative databases and provide additional schemes, connections and more complex architecture. Since graphic databases focus on relationships, this approach is most convenient for storing interconnected data having complex relationships. An example of such a problem is <a href="https://memgraph.com/blog/why-your-business-should-use-a-graph-database">Chain optimization</a>, which occurs in production chains, when you have to get different parts from different suppliers and get the final product. Logistical problems can be improved indefinitely using graphs. It is used to ensure internet security, to prevent bank card fraud, when it is necessary to analyze many consecutive transactions, to find deviations. This may require machine learning elements.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/761/1*41rRALLazcALUaTECc9veQ.png" /></figure><p><a href="https://en.wikipedia.org/wiki/Document-oriented_database"><strong>Document-oriented Database</strong></a> — are intended for general use, so non-homogeneous data can be stored in the same document, which causes normalization problems. It is the main type of non-relative databases and a subset of key-value pair databases. It is the diametrically opposite concept of the relative databases. Document–based and other non-relational databases use <a href="https://medium.com/spidernitt/orm-and-odm-a-brief-introduction-369046ec57eb">Object Document Mapping</a>, but this is <a href="http://www.pps-design.org/arch:orm-nosql">troublesome</a> because unlike relative databases, non-relative databases have no standardization, each database has its own uniqueness, and developing a limited-use ODM is not economically viable. The information is stored in the document as JSON, XML or other format. In the database domain, the document is accessible through a unique index or key, as well as through metadata. Examples of databases are <a href="https://en.wikipedia.org/wiki/MongoDB">MongoDB</a> and RedisJSON.</p><p><a href="https://en.wikipedia.org/wiki/Wide-column_store">Wide Column Database</a> — information is the full column, each column is a separate file and can be stored separately in memory. Obtaining specific data is faster because the column contains the same type of data that is serialized or deserialized quickly. At first glance, the column–based database <a href="https://docs.microsoft.com/en-us/azure/architecture/data-guide/big-data/non-relational-data">may look very similar</a> to relative ones, but the columns can be easily changed. Can be represented as a two-dimensional key-value pair.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/817/1*9ffbydgo2NzcfONpusUdIw.png" /></figure><p>There are different implementations of column-based databases, in the context of each implementation the line or column priority is different, that is, in the database, in addition to the column, the row can also have a role. Or the database management system, “DBMS” can have an importance in <a href="https://en.wikipedia.org/wiki/Column-oriented_DBMS">Column-oriented</a> databases. In the case of a <a href="https://en.wikipedia.org/wiki/Super_column">Super column</a> database, each element, column, can also be a compound and containing more than 1 sub-element. The picture shows how other virtual sub-tables are created in the table.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/478/1*ikTtm7XfdQrz5iC5H7G58g.png" /></figure><p>A special case is “JSON”, which contains an object, which has sub-objects, they also have their sub-objects, and etc.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1028b63efa8d79b4c5b072feb27635c6/href">https://medium.com/media/1028b63efa8d79b4c5b072feb27635c6/href</a></iframe><p>Looking at the appearance of the tree, we see the existence of subfields:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*-XBwJLVP3HvSkb26m3z6jA.png" /></figure><p>The whole database is one <a href="https://en.wikipedia.org/wiki/Keyspace_(distributed_data_store)">Keyspace</a>.</p><p>The obvious examples are <a href="https://www.influxdata.com/what-is-time-series-data/">time series</a>, such as temperature, seismic activity, biometric data, and other periodic events. For example, one day of the month is the key for the column, and the data on seismic activity is the entire line data. <a href="https://logz.io/blog/nosql-database-comparison/">Technologies</a> are CQL language, Apache HBase և <a href="https://www.scylladb.com/glossary/wide-column-database/">ScyllaDB</a>.</p><p><strong>Search Engine Database</strong> — designed to work with large amounts of data in almost real time. Well-known technologies are <a href="https://en.wikipedia.org/wiki/Apache_Solr">Solr</a> and <a href="https://www.elastic.co/guide/en/cloud/current/ec-api-principles.html">Elasticsearch</a>. <a href="https://aws.amazon.com/opensearch-service/the-elk-stack/what-is-elasticsearch/">Elasticsearch</a> provides REST APIs and uses schemeless JSON format documentation. Queries between endpoints are executed via HTTP verbs, like GET, POST, PUT or PATCH and DELETE. The documents are located on different servers, so the queries work in parallel. The database is pre-indexed, allowing to retrieve the data faster.</p><p><strong>Multi model</strong> — combines the principles of relative and non-relative databases. An example of a database is the <a href="https://fauna.com/">Fauna</a> API, which is primarily compatible with GraphQL, but many <a href="https://docs.fauna.com/fauna/current/drivers/csharp">programming languages</a> can use Fauna for their own queries as well. JSON is relatively infrequently used, and Replication is not required here.</p><p>When implementing database concepts in real life, we have <a href="https://www.dataversity.net/review-pros-cons-different-databases-relational-versus-non-relational/">2 main models</a>, relational and non-relational.</p><h4>When working with databases, we are dealing with a number of concepts, for example:</h4><p>1. Database</p><p>2. Cloud,</p><p>3. Data Warehouse and Data Lake,</p><p>4. OLAP and OLTP,</p><p>5. Quantitative and Qualitative,</p><p>6. Data model, Database model</p><p>7. Structurized and Unstructured,</p><p>8. Replication and Duplication,</p><p>9. Functional Dependency, Partial Dependency, Transitive Dependency</p><p>10. Key,</p><p>11. Normalization, Normal Forms,</p><p>12. Partitioning and Sharding,</p><p>13.CRUD,</p><p>14. Indexing,</p><p>15. View,</p><p>16. Union, Intersect, Except</p><p>17. Transaction,</p><p>18. Stored Procedures</p><p>19. JOIN</p><p>20. Triggers</p><p>21. Schema</p><p><strong>1. Database </strong>— an abstract storage environment, which often occupies real memory and physical devices, of course, there are specific modifications for each situation.</p><p><strong>2. Cloud</strong> — remote server system and database for business activities.</p><p><strong>3. Data Warehouse </strong>— a centralized system for business intelligence and scientific analysis. They are able to process petabytes of information, unlike classical databases, super computers are used as hardware supply. Theoretically uses Structured Data and Semi-structured Data, consequently has normalization, data purity and uniqueness. Has a three-layer architecture:</p><p>1) Bottom layer — consists of the main server, which is usually a relational database, performing <a href="https://rivery.io/blog/etl-vs-elt/">ETL or ELT</a> process,</p><p>2) Middle layer — consists of <a href="https://www.ibm.com/cloud/blog/olap-vs-oltp">OLAP</a>, Online analytical processing layer, which speeds up queries,</p><p>3) Top layer — is the front end or similar interface.</p><p>Combines information from transaction <a href="https://www.dataversity.net/review-pros-cons-different-databases-relational-versus-non-relational/">systems</a> such as CRM or customer relationship management, HRM or human resources management and ERP or enterprise resource planning, real-time data processing databases, even non-relational databases like <a href="https://en.wikipedia.org/wiki/Flat-file_database">flat files</a>, and other sources. It is available for end-use as software, cloud technology or hardware.</p><p>Conventionally, it can be compared with “Stack” when there is a regulation.</p><p><a href="https://www.ibm.com/cloud/blog/what-is-a-data-lake"><strong>Data Lake</strong></a> — a general purpose system for <a href="https://en.wikipedia.org/wiki/Binary_large_object">binary large objects</a> such as pictures, videos or audio. Unstructured data can be stored <a href="https://blogs.oracle.com/bigdata/post/data-lake-data-warehouse-and-databasewhatx27s-the-difference">efficiently</a>. In case of <a href="https://en.wikipedia.org/wiki/Data_lake">poor management</a>, it turns into <a href="https://www.nvisia.com/insights/data-swamp">Data Swamp</a>. Can be compared to the concept of “Heap”.</p><p>Data Warehouse and Data Lake <a href="https://aws.amazon.com/big-data/datalakes-and-analytics/what-is-a-data-lake/">comparison</a> is on table.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*15C_rB55FUzZlMljpYh67A.png" /></figure><p><strong>4. </strong><a href="https://www.ibm.com/cloud/learn/olap"><strong>OLAP</strong></a> or <strong>Online Analytical Processing</strong> — Multidimensional analysis of data ​​stored in Data Warehouse. Dimensions are location, type of object, time, etc. Because it uses two dimensioned relational databases, the tables are combined to form multidimensional data from layers. Queries are complicated and contain large number of lines. They do not change the existing data, as most of them only read them.</p><p><a href="https://www.ibm.com/cloud/learn/oltp"><strong>OLTP</strong></a><strong> </strong>or <strong>Online Tansactional Processing</strong> — large-scale transaction processing. Ensures that the same information is used by many, also indexes the data. The queries are simple and contain a few lines. The change of data is fast. Online payment systems are a good example.</p><p><strong>5. Quantitative data </strong>— only by their existence they already have an objective description, they are described by statistical indicators — quantity, value, size, etc. They can be discrete or continuous. They match with structured data.</p><p><strong>Qualitative data</strong> — grouped data, grouping according any attribute. As the unification is a subjective phenomenon and can be carried out in many other ways, the qualitative data are unstructured or semi–structured, that is, there is a need for further clarification and classification. Match with Unstructured data.</p><p><strong>6. </strong><a href="https://en.wikipedia.org/wiki/Data_model"><strong>Data Model </strong></a>— is obtained by <a href="https://en.wikipedia.org/wiki/Data_modeling">modeling</a>, gives the data a semantic structure, defines the relationship with each other and the similarity with the properties of real world objects.</p><p><strong>Database Model</strong> — defines the logical structure of the database. Models are network, document, relational, Entity–attribute–value, etc.</p><p><strong>7. Structured Data</strong> — Quantitative data consisting of numbers and value, presented in the form of tables, have predefined models, stored in Data Warehouses, queries are made in SQL or similar language. Structure of raw data that has not yet been processed, can get a structure even <a href="https://www.searchenginejournal.com/this-is-structured-data/379148/">by marking it HTML</a> language. The site can be optimized to become more noticeable by the search engine.</p><p><strong>Unstructured Data</strong> — qualitative data, the initial state of data when the Data model is missing, therefore it is easy to get large quantities, which requires a lot of memory. Because it can be adapted to different file formats, it can be redefined for specific needs and achieve efficient use of resources. Use cases are <a href="https://www.ibm.com/cloud/blog/structured-vs-unstructured-data">Data mining</a>, <a href="https://www.ibm.com/cloud/learn/natural-language-processing">NLP</a> and predictive analytics, more efficiently stored in Cloud Data lakes, developed in NoSQL systems.</p><p>To say briefly, database data can be Structured or Unstructured, mixed types are possible as well. The data that has a Data Model is structured, which is obtained by modeling, that is, it gives the data a semantic structure, defines the relationship between them, the similarity with the properties of real-world objects. There are also Semi-structured types.</p><p><strong>8. Replication </strong>— the special software finds the changes made in different parts of the database and makes all the pieces to look the same, that is, either cancels the changes or spreads the change on other parts.</p><p><strong>Duplication </strong>— 1 main database is chosen, and its content duplicated, further changes are made with that 1 main database. It is the same as Backup.</p><p><strong>9. Functional Dependency</strong> — constraint, written “X → Y”, where “X” is associated with “Y”. For example, the vehicle identification number, VIN, associated with engine power, is written “VIN → Engine”, because a particular car has only 1 capacity. The notation “Engine → VIN” is incorrect, as there are many cars with the same engine capacity. In the table, the student can enroll in more than one lecture and have any number of semester.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/536/1*wyoLZw1UzphJIwBRYtVKzw.png" /></figure><p>When 2 rows in the table have the same “Student ID”, they have the same “Semester” value. Here we have a “StudentID → Semester” functional dependency. Another example of dependency is the {StudentID, Lecture} → {TA, Semester} relationship when we have a pre-selected {StudentID, Lecture} set of attributes, and {TA, Semester} where {StudentID, Lecture} is a super key.</p><p>In the following example, each employee can have only 1 “Department ID”. Since everyone can work only in one department, Employee ID defines the department also, like {Employee ID → Department ID}.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/713/1*hCk7a4O8wasE3k1Mm1VCnA.png" /></figure><p>Employee ID defines the employee name — {Employee ID → Employee Name}. There is also a functional dependency in the table with a non-key attribute — {Department ID → Department Name}. Although there is a functional dependency on {Employee ID → Department ID}, getting “Department ID” using “Employee ID” is not logical.</p><p><a href="https://www.tutorialspoint.com/Partial-Dependency-in-DBMS"><strong>Partial Dependency</strong></a><strong> </strong>— occurs when a non-key column is functionally dependent on one of the parts of candidate key columns.</p><p>Consider the example.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*9KvZCACpLgyLFAfobcD_ew.png" /></figure><p>The primary key consists of StudentID and ProjectNo columns. The StudentName and ProjectName columns must depend on the primary key. StudentName can be determined by StudentID, and ProjectName can be determined by ProjectNo. So we have a partial dependency. This also violates the rules of the 2nd normal form.</p><p><strong>Transitive dependency</strong> — a type of functional dependency when the 1st column is connected to the 3rd through 2. The table below shows an example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/939/1*kT0nHQVBwq1z6YI6teMnAw.png" /></figure><p>If we know the book, then we also know the author’s nationality, {Book} → {Author nationality}, because using the book we first find the author, {Book} → {Author}, and then using the author, we find the author’s nationality, {Author → Author Nationality}. Here the non-key attribute defines another non-key attribute.</p><p><strong>10. Key</strong> — an attribute or column that allows you to identify a row. There are groups.</p><p>1) <a href="https://en.wikipedia.org/wiki/Superkey">Super Key</a> — a set of attributes that uniquely identifies each row, has no minimum size requirements, so may include other more compact keys. Defines functional dependency.</p><p>2) <a href="https://en.wikipedia.org/wiki/Candidate_key">Candidate key</a> — like a “Super Key” but with the possible minimum size. Columns that are part of this are called “Prime Attribute”, other attributes are called “Non-Prime attribute”. A table with no “NULL” value has at least 1 “Candidate key”. It is all the possible combinations to identify the line.</p><p>3) <a href="https://en.wikipedia.org/wiki/Primary_key">Primary Key</a> — a selection consisting of a minimum set of attributes that uniquely defines the row. It is a special case of “Candidate key”. The maximum can be 16 columns and 900 bytes.</p><p>4) <a href="https://en.wikipedia.org/wiki/Foreign_key">Foreign key</a> — a set of columns consisting of the primary key of another table. The table containing the “Foreign Key” is called the child, and the one containing the primary key is called the parent. The key written in the child table is either equal to the primary key of another table or has a NULL value. This is called <a href="https://en.wikipedia.org/wiki/Referential_integrity">Referential integrity</a>.</p><p>5) Simple key — a key consisting of only one attribute, a column.</p><p>6) Concatenated key — consists of 2 or more columns.</p><p>7) <a href="https://www.bbc.co.uk/bitesize/guides/z4wf8xs/revision/4">Compound key</a> — consists of 2 or more columns, which are the primary key showing another table.</p><p>8) <a href="https://en.wikipedia.org/wiki/Composite_key">Composite key</a> — a special case of a primary key, consisting of 2 or more columns, at least 1 of which is not a simple key. Consider the <a href="https://www.bbc.co.uk/bitesize/guides/z4wf8xs/revision/4">table</a>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/941/1*1EJ6ql6q8qtcI6T1h-6Xzw.png" /></figure><p>It is not possible to get a value with only 1 field, as there are duplicate values in each column. Combining the values of the “Team” and “Squad number” columns we create the Primary key.</p><p>9)<a href="https://en.wikipedia.org/wiki/Natural_key"> Natural key</a> — a unique identifier, which also coincides with the object of the real world, has a business significance.</p><p>10) <a href="https://en.wikipedia.org/wiki/Surrogate_key">Surrogate key</a> — a unique identifier, which itself is a value, is more concerned with the logical structure of data, the Data Model, than with the physical structure of memory, the <a href="https://en.wikipedia.org/wiki/Storage_model">Storage model</a>. It can act as a primary key in the context of some specific database. Is a key with an <a href="https://www.mssqltips.com/sqlservertip/5431/surrogate-key-vs-natural-key-differences-and-when-to-use-in-sql-server/">auto-generated value</a> when registering test values in the database.</p><p><strong>11. </strong><a href="https://en.wikipedia.org/wiki/Database_normalization"><strong>Normalization</strong></a><strong> </strong>— The process of building relational databases using normal forms to reduce data duplication and to increase data integrity. Columns and Tables are organized so that dependencies are implemented according to the constraints of database integrity. It is carried out either by synthesis of bases or by decomposition, that is, by building or destroying new hierarchies of tables. Bringing a normal form can also have a negative effect on speed, make it difficult to write queries, etc., and may require de-normalization. The concept applies only to relative databases, although non-relational databases can also be improved but with other concepts and approaches.</p><p><em>Normal Forms</em> — Strategies used for normalization, each subsequent level satisfies the previous level as well.</p><p><em>1st normal form </em>— each column must have a uniquely valued cells, duplicate values ​​are not allowed. Instead of storing duplicate values ​​in a row having a specific Id, you should write the duplicate items separately in a separate table using the same Id.</p><p>Consider an example of an incorrect table.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/902/1*SRwnVaIdIqIGlorg1L_-iA.png" /></figure><p>After riding a normal horse, we have the following appearance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/892/1*x0oYlzP_t0XoTAx_7y9ddw.png" /></figure><p><em>2nd normal form </em>— there is no non-prime attribute that is functionally dependent on any subset of candidate keys. That is, columns that are not primary, should not be functionally dependent on the primary key candidate columns. With a 1-column primary key, the table is always in the second normal form. Before becoming the 2nd horse, the table must be in 1st normal form.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/527/1*5bkFDnXydNZKjnHtITujFw.png" /></figure><p>The possible primary key in this table is a compound consisting of “Manufacturer” and “Model” columns. The “Manufacturer country” column is not the primary key, cannot even be considered as such, and it depends on the “Manufacturer”. This is a violation of the conditions of the 2nd normal form. To meet the requirements you must have 2 tables.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/791/1*WbTKAnhJp3XAfVV6W8Gdog.png" /></figure><p>Table containing Partial dependency.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*9KvZCACpLgyLFAfobcD_ew.png" /></figure><p>To bring the 2nd normal form, we divide it into parts.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/816/1*a0G6oFrxDfom3YIzMeiAMQ.png" /></figure><p>In the following example also, the second normal form is violated.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/613/1*-HswYD1vZSmApH12xeLjnw.png" /></figure><p>The primary key consists of “PART” and “WAREHOUSE” columns, but the “WAREHOUSE_ADDRESS” column depends only on the “WAREHOUSE” column. The same warehouse may have different addresses in different rows. We should ensure every Warehouse always to have 1 address, that is, the Warehouse should be used as the primary key, written in a separate table.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/761/1*-eiz2bG7GVL7T0Z7IislFQ.png" /></figure><p><a href="https://en.wikipedia.org/wiki/Third_normal_form"><em>3rd normal form</em></a><em> </em>— the columns that do not belong to the primary key, should not depend on the columns that do not belong to the key, non–key column should depend only on the key column. Defines duplication reduction, facilitates data management and Referential integrity. This table is already the 2nd form, but does not correspond to the 3rd normal form.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/703/1*9IWShazISrP7xE1Y3341xA.png" /></figure><p>The Tournament and its Year, are enough to identify line uniquely, they are the primary key. But the problem is that the non-key column “Date of Birth” depends on the primary key with the “Winner” mediator column, so it is allowed that the same person can appear with different dates of birth. By dividing the table into parts, we solve the problem. The “Winner” column is the key to which only 1 value already corresponds.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/894/1*cw5mcSd9Ecwa_NgERZ4edg.png" /></figure><p><em>Boyce-Code</em> or <em>3–5 Normal Form</em> — A table in the 3rd normal form that does not have matching candidate keys. There is an A → B <a href="https://www.studytonight.com/dbms/boyce-codd-normal-form.php">dependency</a> where “A” is a super key, so other columns, such as “B”, are found using super key. There should be only primary key.</p><p><em>4th Normal Form</em>— Table does not contain 2 or more independent, multi-valued data. There are 2 connection — “Employee and Skill Proficiency” and “Employee and Language Proficiency”. You cannot have “Skill Code and Language Proficiency”, and “Language Code and Skill Proficiency” relations, they are not related to each other.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/849/1*lZ3cQcAGL2bWuhM2Oso89A.png" /></figure><p>If we <a href="http://kseminar.staff.ipb.ac.id/files/2014/02/NormalForms.pdf">fill</a> such a table with data, we will write “Null” values.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/378/1*bpEs__H-UpySoZOxmi8ZYw.png" /></figure><p>To correct, we write the following. There is no need to write “Null”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/909/1*JptTTKZERifrHQBV2IUrMQ.png" /></figure><p><em>5th Normal Form — </em>Compound key does not contain cyclic dependencies.</p><p><strong>12. </strong><a href="https://en.wikipedia.org/wiki/Partition_(database)"><strong>Partitioning</strong></a> — division into independent units. There are 2 ways in relational base, horizontal and vertical. An example of vertical segmentation is normalization, when instead of having 5 columns in 1 table, we have 2 or more tables which have less than 5 columns. The horizontal division is called “Sharding”. Consider the <a href="https://medium.com/@jeeyoungk/how-sharding-works-b4dec46b3f6">picture</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/766/1*C7DnNVFFRaQ53C-HpzfQSA.png" /></figure><p><a href="https://en.wikipedia.org/wiki/Shard_(database_architecture)"><strong>Sharding</strong></a><strong> </strong>— horizontal layering, so that the newly obtained pieces hold the base scheme and columns. A spreadsheet or document is fragmented because it is difficult to work with a large chunk, and small chunks can be stored in different databases or on a server, processed in parallel with different processors. Improves indexing and searching. <a href="https://docs.oracle.com/en/cloud/paas/nosql-cloud/csnsd/shard-keys-and-primary-keys.html">Sharding Key</a> can be used for partitioning transaction. Elements with the same key become inseparable units, change together, form a logical unit — “Logical Shard”.</p><p>13. CRUD — Basic “Create”, “Read”, “Update” and “Delete” operations to manage the database.</p><p>With the “CREATE” and “INSERT” commands are used to create table and insert data, then we read the data.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/40098321d9310306625c9bba6b14f7a0/href">https://medium.com/media/40098321d9310306625c9bba6b14f7a0/href</a></iframe><p>The table of books contains ID, title, ISBM, and names of authors and publisher. Not all books have 2 authors and a publisher.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*EM54Wz4lEKBCVivKqqDqpg.png" /></figure><p>The first part of the following code adds a new column for patronymics in the USER table, changes the default NULL values, and then deletes the same column. The lines that contain purchases made before 2019 are deleted. In the end, the table and database are deleted with the command “DROP”.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/335fd28eb9c02422f308a1a42cdf0a63/href">https://medium.com/media/335fd28eb9c02422f308a1a42cdf0a63/href</a></iframe><p>When adding a column, we have the following image.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/809/1*fEniIW3xiLBoVixZ7wZwIQ.png" /></figure><p><strong>14. </strong><a href="https://stackoverflow.com/questions/1108/how-does-database-indexing-work"><strong>Indexing</strong></a> — development of queries that read data faster, creation of new columns (1). They are close to the keys in meaning. Just as a key is a attribute that describes data, so an index is an additional attribute. It is clear that to save the additional feature a memory may be required. If we know the index of a particular line, we will work with that place at once, there will be no need to take the whole table. Let’s announce an index.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/74ac0db7464e17b11b5fc327ddd20070/href">https://medium.com/media/74ac0db7464e17b11b5fc327ddd20070/href</a></iframe><p>In the first part of the code we have to delete all the rows of the table, and check the title. In the second part we accelerate the execution of the query. It should be noted that the advantage of indexing is obvious when used in large tables.</p><p><strong>15. View</strong> — a logical table that only displays data but is not physically stored in memory (2). Code creates “VIEW”, which will include C# books that have 2 authors, then modify to see all SQL books.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1bcc6d0722ff5d964e1d2e5357d75bde/href">https://medium.com/media/1bcc6d0722ff5d964e1d2e5357d75bde/href</a></iframe><p>The result of the work of the first part of the code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*6QztyMj92eIzlj5RDZv2wA.png" /></figure><p>The “VIEW” after change.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*KgTTWZi-Y_JfUwFs3Vv2Gw.png" /></figure><p><strong>16. UNION, EXCEPT and INTERSECT</strong> — creation of line combinations (3).</p><p><strong>17. Transaction </strong>— Context of 1 or more operations, work unit (4).</p><p>The pseudo-code algorithm is as follows:</p><p>1. Start a transaction with BEGIN TRAN,</p><p>2. Make queries, data changes,</p><p>3. If there is no problem, write Commit to finish,</p><p>4. If there is a problem, return to its original position with Rollback.</p><p>There are 3 versions.</p><p><em>1. Explicit transaction </em>— starts directly with “BEGIN TRANSACTION” command, ends with “COMMIT TRANSACTION” or “ROLLBACK TRANSACTION” command.</p><p><em>2. Implicit transaction</em> — is like an explicit transaction, works with “COMMIT TRANSACTION” and “ROLLBACK TRANSACTION” commands, but with “SET IMPLICIT_TRANSACTIONS ON” command you have to start a “hidden” transaction, after which the transaction objects will be “locked”. In this case, they continue to be developed using the “Commit” and “Rollback” commands.</p><p><em>3. Auto-commit transaction</em> — a transaction happening from time to time, which is not done explicitly or implicitly. The “SELECT” and “INSERT” commands are an example of an automatic transaction. In case of entering inconsistent data, “Rollback” occurs automatically, and the data is not changed due to an error.</p><p>Any transaction must meet 4 conditions called ACID.</p><p>1. Atomic — all operations are as inseparable as an atom, either performed together or failing together.</p><p>2. Consistent — the result is predictable, before the transaction the base remains stable, infallible.</p><p>3. Isolated — ensures that instead of acting on the same data at the same time, data usage is sequenced.</p><p>4. Durable — the final result does not depend on the execution process. If there is a complete transaction result, after receiving which the system has failed, the result should not disappear.</p><p><em>Checkpoint </em>— algorithm, which transfers data stored in the transaction log and data changed during the transaction process, to the physical memory. First, the Log files are stored in memory, the raw data from the buffer cache goes to memory, the Checkpoint Log Sequence Number is written to the boot page. There are <a href="https://academy.sqlbak.com/checkpoint/">4 types</a> — Automatic, Indirect, Manual and Internal. Every change made to the transaction is <a href="https://codingsight.com/database-checkpoints-in-sql-server/">not immediately transferred</a> from the buffer pool to the memory, but is done according to the “Checkpoint” principle.</p><p>Most DDL queries in T-SQL are transactional (5).</p><p><strong>18. Stored Procedures </strong>— an object stored in the database, can accept parameters, can also return (6).</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/105b911533a6998e27b34d2cb0105959/href">https://medium.com/media/105b911533a6998e27b34d2cb0105959/href</a></iframe><p>To run procedure use “EXEC GetProduct”.</p><p><strong>19. JOIN</strong> — a tool for selecting columns from 2 or more tables (7). There are many mathematical models, but in T-SQL there are <a href="https://docs.microsoft.com/en-us/sql/relational-databases/performance/joins?view=sql-server-ver15">5 logical types</a> — Inner Join, Left Outer, Join Right, Outer Join, Full Outer Join and Cross Join. Main appearance․</p><p>SELECT</p><p>FROM Table A</p><p>JOIN Table B</p><p>ON …</p><p>WHERE …</p><p>First we create tables to store the data of the Buyer, Product and Order.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0c0f5268c62412cef3ff00d83cf93306/href">https://medium.com/media/0c0f5268c62412cef3ff00d83cf93306/href</a></iframe><p>After filling data using INSERT INTO command, we get Buyer, Product and Order tables with command SELECT.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*f4qAt7VOxdBG_R3SE6Zmlw.png" /></figure><p>Using the Order table, we can find out who bought what.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/90800451bed9d56f3ea642b9fcc91212/href">https://medium.com/media/90800451bed9d56f3ea642b9fcc91212/href</a></iframe><p>We take the name, surname, city from the buyer’s table. We select the product name from the product table. But we have to combine the Buyer’s table with the Product and Order tables. The result is ordered alphabetically.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/439/1*8bKRytPkJjOiyk9GFIOi9Q.png" /></figure><p><strong>20. Triggers </strong>— a stored procedure running after an event (8). DML Triggers work after specific events like Insert, Delete and Update. They are compiled in advance and start working automatically. A trigger is declared, the event is defined, the body is written.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/cb544b7c2c4d1b2687172adc570ecbd1/href">https://medium.com/media/cb544b7c2c4d1b2687172adc570ecbd1/href</a></iframe><p>Lines with IDs bigger than 16 are deleted from the order table, but the deletion activates the triggers that adds 2 new orders. When looking at the ID column, we make sure that lines are deleted first, then added again.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*kQAVX-C5d-1_jbwfZxe7uQ.png" /></figure><p>We can also create JOIN inside the trigger’s body.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ff53ebcd6197f5d5901690e5a1ca413c/href">https://medium.com/media/ff53ebcd6197f5d5901690e5a1ca413c/href</a></iframe><p>As soon as we try to do any INSERT, we get the text “JOIN was done instead of INSERT” and JOIN table.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/431/1*FfhqEpujMNsAlzdzPI9GBg.png" /></figure><p><strong>21․ </strong><a href="https://www.ibm.com/cloud/learn/database-schema"><strong>Schema</strong></a><strong> </strong>— the set of attributes of a table or relation and its elements. It is defined by the programming language code, like DDL (9), but this term more often means graphic representation. The star schema is often used during denormalization (10). Is the relationship of the tables or other units in the database, hierarchy and <a href="https://en.wikipedia.org/wiki/Database_schema">blueprint</a>. Is stored and described in <a href="https://en.wikipedia.org/wiki/Data_dictionary">dictionary</a>, as metadata.</p><p>It should be understood that the design of databases is based on the scientific researches and theoretical concepts. Each company can provide his own database architecture for certain business needs.</p><p><strong>Resources used</strong></p><p>1) Learn SQL Database Programming, Query and manipulate DBs from popular relational DB servers using SQL, Chapter 4</p><p>2) SQL Pocket Guide, A Guide to SQL Usage, 4th Ed., Chapter 5</p><p>3) T-SQL Querying, Developer Reference, Chapter 3</p><p>4) Beginning T-SQL with Microsoft SQL Server 2005 and 2008, Chapter 10</p><p>5) Exam Ref 70–761 Querying Data with Transact-SQL, Chapter 3.2</p><p>6) Microsoft SQL Server 2019, A Beginner’s Guide, 7th Ed. Chapter 8</p><p>7) Beginning T-SQL, A Step-by-Step Approach, 4th Ed. Chapter 5</p><p>8) Beginning T-SQL, A Step-by-Step Approach, 4th Ed. Chapter 5, Chapter 13</p><p>9) Learn SQL Database Programming, Query and manipulate DBs from popular relational DB servers using SQL, Chapter 1</p><p>10) Database Design and Relational Theory, Normal Forms and All That Jazz, 2nd Ed., Chapter 8</p><p>Data Lake vs. Data Warehouse — <a href="https://www.talend.com/resources/data-lake-vs-data-warehouse/">https://www.talend.com/resources/data-lake-vs-data-warehouse/</a></p><p>Data Lake and Data Warehouse — <a href="https://www.ibm.com/cloud/blog/cloud-data-lake-vs-data-warehouse-vs-data-mart">https://www.ibm.com/cloud/blog/cloud-data-lake-vs-data-warehouse-vs-data-mart</a></p><p>Qualitative and Quantitative data — <a href="https://www.g2.com/articles/qualitative-vs-quantitative-data">https://www.g2.com/articles/qualitative-vs-quantitative-data</a></p><p>Structured and Unstructured data — <a href="https://www.ibm.com/cloud/blog/structured-vs-unstructured-data">https://www.ibm.com/cloud/blog/structured-vs-unstructured-data</a></p><p>Types of transactions — <a href="https://www.sqlshack.com/modes-of-transactions-in-sql-server/">https://www.sqlshack.com/modes-of-transactions-in-sql-server/</a></p><p><strong>Contact me</strong> on <a href="https://linkedin.com/in/vchgnmir">LinkedIn</a>, <a href="https://www.instagram.com/vachmir/">Instagram</a>, <a href="https://www.tiktok.com/@vachmir">TikTok</a> and <a href="https://www.facebook.com/VachMir/">Facebook</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c09f9db1fc9f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Տվյալների Բազաների դասակարգումները և դրանց հետ արվող հիմնական գործողությունները]]></title>
            <link>https://vachmir.medium.com/%D5%BF%D5%BE%D5%B5%D5%A1%D5%AC%D5%B6%D5%A5%D6%80%D5%AB-%D5%A2%D5%A1%D5%A6%D5%A1%D5%B6%D5%A5%D6%80%D5%AB-%D5%A4%D5%A1%D5%BD%D5%A1%D5%AF%D5%A1%D6%80%D5%A3%D5%B8%D6%82%D5%B4%D5%B6%D5%A5%D6%80%D5%A8-%D6%87-%D5%A4%D6%80%D5%A1%D5%B6%D6%81-%D5%B0%D5%A5%D5%BF-%D5%A1%D6%80%D5%BE%D5%B8%D5%B2-%D5%B0%D5%AB%D5%B4%D5%B6%D5%A1%D5%AF%D5%A1%D5%B6-%D5%A3%D5%B8%D6%80%D5%AE%D5%B8%D5%B2%D5%B8%D6%82%D5%A9%D5%B5%D5%B8%D6%82%D5%B6%D5%B6%D5%A5%D6%80%D5%A8-b1d3e9e1953a?source=rss-b9e92984cbe5------2</link>
            <guid isPermaLink="false">https://medium.com/p/b1d3e9e1953a</guid>
            <category><![CDATA[database]]></category>
            <category><![CDATA[t-sql]]></category>
            <category><![CDATA[armenian-it]]></category>
            <category><![CDATA[ծրագրավորում]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Vachagan Mirzoian]]></dc:creator>
            <pubDate>Mon, 07 Mar 2022 21:51:21 GMT</pubDate>
            <atom:updated>2022-04-02T16:15:45.426Z</atom:updated>
            <content:encoded><![CDATA[<p>Ծրագրավորումն իրենից ներկայանցնում է տվյալների հետ կոնկրետ ալգորիթմով կատարվող աշխատանք։ Բայց նախ պետք է ինչ–որ մի ձև պահել այդ տվյալերը։ Դրանք պահվում են տվյալների բազայում։ Ինֆորմացիան ստանալու համար օգտագործվում են բազում որևէ «<a href="https://en.wikipedia.org/wiki/Query_language">Query language</a>»–ի սահմանած հարցումներ։ Այդ լեզուները կազմված են լինում տրամաբանորերն առանձնացված <a href="https://www.javatpoint.com/dbms-sql-command">5 կտորներից</a>՝</p><p>1) Data Definition Language, Data Description Language (DDL) — CREATE, ALTER, DROP TRUNCATE,</p><p>2) Data Manipulation Language (DML) — INSERT, UPDATE, DELETE,</p><p>3) Data Control Language (DCL) — GRANT, REVOKE,</p><p>4) Transaction Control Language (TCL) — COMMIT, ROLLBACK</p><p>5) Data Query Language (DQL) — SELECT</p><p>Բազաների և դրանց կառավարման համակարգերի դասակարումների համար կան բազում սկզբուննքներ։ Ըստ բիզնես–գործունեության կարելի է առանձնացնել <a href="https://en.wikipedia.org/wiki/Cloud_database">ամպային տեխնոլոգիաները</a> և <a href="https://en.wikipedia.org/wiki/Data_warehouse">մեծ պահեստները</a>, որոնք բիզնեսի կարիքների բավարարման համար են։</p><p>Ըստ տարածքային բաշխվածության առանձնացնում ենք <a href="https://en.wikipedia.org/wiki/Distributed_database">բաշխված բազա</a>, որի տվյալները կարող են լինել ֆիզիկապես իրարից մեկուսի, բայց իրարար հավասար սերվերներում, տվյալները, գտնվելով <a href="https://www.scylladb.com/2021/12/22/what-do-you-mean-by-a-distributed-database/">առանձին համակարգիչներում</a>, մշակվում են տարբեր պրոցեսորներով, սերվերները փոխկապակցված են ինտերնեով։ Կարող են ընդհանուր «Data center»–ում՝ նույն ֆիզիկական հասցեում լինել, բայց ենթատարրերի աշխարհագրական դիրքից ամբող բազան <a href="https://stackoverflow.com/questions/50062045/precise-difference-between-distributed-database-and-decentralised-database">1 տրամաբանական միավոր</a>` <a href="https://www.scylladb.com/2021/12/22/what-do-you-mean-by-a-distributed-database/">Cluster</a> է։ Հատվածները համարժեք պահելու համար դրանց միջև պետք է լինի ինտենսիվ կապ, պատճենավորում՝ «Replication» և կրկնօրինակում՝ «Duplication» ապհովելու համար։ Բաշխված բազաները <a href="https://www.tutorialspoint.com/distributed_dbms/distributed_dbms_database_environments.htm">լինում են</a> «Homogenous» կամ համասեռ և «Heterogenous» կամ տարասեռ։ Համասեռ համակարգերի դեպքում բոլոր սերվերներն օգտագործում են նույն «DBMS»–ները։</p><p>Կա նաև <a href="https://en.wikipedia.org/wiki/Centralized_database">կենտրոնացված բազա</a>, որն ամբողջությամբ գտնվում է 1 տեղում։ Այս տարբերակը հաճախ է հանդիպում «LAN» ցանցերի դեպքում, երբ սահմանափակ տարածք զբաղեցնող կազմակերպությունում օգտագործվում է կենտրոնական սերվեր, որում էլ գտնվում է բազան։ <a href="https://cointelegraph.com/explained/decentralized-and-distributed-databases-explained">Ապակենտրոնացված</a> համակարգում կան մի քանի կենտրոններ, և կենտրոնացված բազայի նման, ենթատարրերը կարող են տարբերվել իրենց իրավունքներով և կարևորությամբ։</p><p>Ծրագրային ճարտարապետության տեսանկյունից բազաները կարող են լինել կա՛մ դրանք օգտագործող ծրագրից՝ «Client»–ից առանձին ինքնուրույն համակարգեր, կա՛մ լինել ծրագրին ներկառուցված՝ «<a href="https://en.wikipedia.org/wiki/Embedded_database">Embedded</a>», կցվել և օգտագործվել գրադարանի կամ որևէ այլ պրոյեկտի ձևով, ինչպես SQLite–ը։ SQL Server Compact–ը աշխատում է տվյալների <a href="https://en.wikipedia.org/wiki/Data_compaction">կոմպակտավորման</a>՝ փոքր ծավալում ավելի շատ կոդ գրելու և <a href="https://en.wikipedia.org/wiki/Data_compression">կոմպրեսավորման</a>՝ եղած կոդը սեղմելով ավելի քիչ ֆիզիկական հիշողություն զբաղեցնելու հիման վրա։</p><p>Արագագործության հասնելու համար նախագծված են <a href="https://en.wikipedia.org/wiki/Parallel_database">զուգահեռությամբ</a> աշխատող բազաներ, հատկապես մեծածավալ ինֆորմացիա մշակելու համար։</p><p>Բազայում գտնվող տվյալը կարող է լինել Կառուցված՝ «Structured» կամ Չկառուցված՝ «Unstructured», հնարավոր են միջանկյալ տեսակներ։ Կառուցված են այն տվյալները, որոնք ունեն «<a href="https://en.wikipedia.org/wiki/Data_model">Data Model</a>»։ Կան նաև <a href="https://en.wikipedia.org/wiki/Semi-structured_data">Semi–structured</a> տիպեր։</p><p>Ըստ տվյալների մոդելի կառուցվածության կամ չկառուցվածության, բազաները նույնպես ունենում են <a href="https://en.wikipedia.org/wiki/Database_model">մոդելներ</a>՝ հարաբերական և ոչ հարաբերական, կան նաև բազաներ, որ աշխատում են 1–ից ավելի մոդելներով։ Հարաբերական բազաների դասական օրինակը SQL–ն է։ Ոչ հարաբերական բազաներ են բանալի–արժեք զույգերը, ընդլայնված սյունը, փաստաթղթայինը, որոշ գրաֆային բազաներ և այլն: <a href="https://www.youtube.com/watch?v=W2Z7fbCLSTw">Որոնաղական մոտեցումներով</a> և բազմամոդել բաազաները ներառում են 2 խմբի հատկությունները։</p><p>Աղյուսակը ցույց է տալիս 5 ֆունդամենտալ մոդելների <a href="https://en.wikipedia.org/wiki/NoSQL#Performance">հատկանիշների</a> համեմատությունը։</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*Gak9KjAbTaQUmLHxcS8BBg.png" /></figure><p>Relational կամ <a href="https://en.wikipedia.org/wiki/Relational_database">Հարաբերական տվյալների բազա</a> — տվյալները պահվում են աղյուսակներում, որոնցում էլ տողերի և այուների հարաբերությամբ՝ Դեկարտյան արտադրյալով, կազմվում են համակցություններ կամ հարաբերություններ։</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/570/1*3GzVkw8DSoF6e6_Bfr4tSw.png" /></figure><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/48bb8a34d55508be529c172815720081/href">https://medium.com/media/48bb8a34d55508be529c172815720081/href</a></iframe><p>Ավելացնում ենք սյուն, հետո ջնջում ամբողջ սյունը, այսինքն՝ միայն 1 կոնկրետ վանդակ ջնել հնարավոր չէ։ Այս թերությունը շտկելու համար նախագծվել են սյունակենտրոն՝ Column–oriented բազաները։ Կարելի է համեմատել է դինամիկ և ստատիկ զանգվածներով արվող աշխատանքի հետ, երբ դինամիկ զանգվածի դեպքում երկարությունը փոփոխվում է, իսկ ստատիկի դեպքում առավելագույնը կարելի է անպետք դաշտում «null» կամ 0–ներ գրել։ Հաւաբերական բազաներում չափազանց կարևոր է ղյուսակի նորմալիզացիան։ Օբյեկտին վերաբերող տվյալները, կախված տիպից, խմբավորվում են առանձին այղյուսակներում, այնպես, որ դրանցից յուաքանչյուրում գտնվեն միայն նույնատեսակ և համասեռ տվյալներ։ Ոչ հարաբերական բազայի դեպքում կոնկրետ օբյեկտն է իր բոլոր դաշտերով պահվում առանձին փաստաթղթում, այսինքն խառը տվյալներ գտնվում են մեկ տեղում։</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/814/1*ws1iGRM_ycepXpqFENy5cA.png" /></figure><p>Տվյալների հետ աշխատող լեզվի և սերվերի կառավարումն իրականացնող լեզվի միջև կապի հաամար օգտագործվում են «Object Relational Mapper»–ներ։ Այն աղյուսակների ունեցած հարաբաերությունները դարձնում է ծրգրավորման լեզուների մեծ մասի կողմից կիրառելի օբյեկտներ կամ կլասներ, թույլ տալով կտրվել աղյուսակների միջև եղած բազում խճճված կապերից։ SQL–ի և .NET–ի միջև կիրառվում է «Entity Framework», որը թույլ է տալիս .NET–ի որևէ լեզվով, օրինակ՝ C#–ով գրվող կոդով աշխատել անմիջապես բազայի և տվյալների հետ, բայց միևնույն ժամանակ կտրված մնալ բազայի շերտից։ Ուստի Entity Framework–ն ինտերֆեյս է, առանց որի ստիպված էինք օգտվել «ADO.NET»–ից, որ ենթադրում է SQL–ի ոճով կոդ գրել։</p><p>Աղյուսակը ցույց է տալիս կարևոր հասկացությունները և դրանց նշանակությունը։</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*Y_DSvAr5UVe2s4e1WIxPgg.png" /></figure><p><a href="https://en.wikipedia.org/wiki/Key%E2%80%93value_database"><strong>Key–value pairs</strong></a> կամ <strong>Բանալի–արժեքային զույգ</strong> — տվյալները հանդիսանում են «Hash Table»–ով աշխատող «Associative array»–ի օբյեկտներ, «Dictionary»–ի տարրեր, այլ կերպ՝ տողեր, որոնցից յուրաքանչյուրն ինքն իրենով առանձին միավոր է։ Ի տարբերություն այլ բազաների, այս դեպքում դատարկ դաշտերը տեղապահներով չեն լրացվում, որի շնորհիվ հիշողությունը չի ծանրաբեռնվում։ Ոչ հարաբերական բազաների <a href="https://www.ibm.com/cloud/learn/nosql-databases">ամենապարզ ձևն</a> ու գլխավոր աբստրակցիան է։ Շատ դրսևորումներ, օրինակ «<a href="https://aws.amazon.com/redis/">Redis</a>» լեզուն, աշխատում են «In-memory» սկզբունքով, այսինքն ինֆորմացիան տեղափոխվում է «Client» համակարգիչ։ Արդյունավետ է քեշավորման, իրական ժամանակում գործողությունների կատարման և այլնի համար։</p><p><strong>Graph </strong>— հիմական ինֆորմացիան ոչ այնքան ստատիկ տվյալներն են, որքան, որ բազայի տարրեր միջև եղած կապերն ու հարաբերությունները, այլ կերպ ասած՝ աշխատում է «relationships-first» մոտեցմամբ։ Նախագծված է ուղորդված <a href="https://arxiv.org/ftp/arxiv/papers/1510/1510.00945.pdf">գրաֆների</a> հիաման վրա, ուստի ունի գագաթներ՝ «Node»–եր, որոնք հանդիսանում են որևէ տիպի օբյեկտ և կարող են պարունակել դաշտեր, ունի կողեր, որոնք ցույց են տալիս գագաթների միջև կապերը, ունի հատկություններ, որոնք պահում են լրացուցիչ ինֆորմացիա։ Տիպիկ համակարգեր են «<a href="https://en.wikipedia.org/wiki/TigerGraph">TigerGraph</a>»–ը GSQL լեզվով և «<a href="https://en.wikipedia.org/wiki/Neo4j">Neo4j</a>»–ն Cypher լեզվով, իսկ օրինակ՝ «<a href="https://en.wikipedia.org/wiki/ArangoDB">ArangoDB</a>»–ն գրաֆայինից բացի, աշխատում է նաև փաստաթղթային ու բանալի–արժեք զույգով։ Թույլ է տալիս խուսափել «Associative entity»–ներից, Join–ներից և Lookup table–ներից, որոնք կա առկա են հարաբերական բազաների դեպքում և առաջ են բերում լրացուցիչ սխեմաներ, կապեր և ավելի կոմպլեքս ճարտարապետություն։ Քանի որ գրաֆային բազաներում մեծ ուշադրություն է դարձվում հարաբերություններին, ապա այս մոտեցումն ամենահարմարն է բարդ կապերով իրար փոխկապակցված տվյալներ պահելու հարմար։ Նման խնդիր օրինակ է «<a href="https://memgraph.com/blog/why-your-business-should-use-a-graph-database">Chain optimization</a>», որը հանդիպում է արտադրական շղթաներում, երբ տարբեր մատակարարներից պետք է ստանալ տարբեր դետալներ ու ստանալ վերջնական արտադրանք, բնակնաբար լոգիստիկ խնդիրները կարելի է անվերջ բարելավել։ Կիրառվում է ինտերնետային անվտանգության ապահովման և բանկային քարտերի խարդախությունների կանխման համար, երբ պետք է վերլուծել իրար հաջորդող բազում գործարքներ և գտնել շեղումներ։ Սա կարող է պահանջել նաև մեքենայական ուսուցման տարրեր։</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/761/1*41rRALLazcALUaTECc9veQ.png" /></figure><p><a href="https://en.wikipedia.org/wiki/Document-oriented_database"><strong>Document–oriented</strong></a> կամ <strong>Փաստաթղթային հիքով բազա</strong> — նախատեցված են ընդհանուր օգտագործման համար, ուստի նույն փաստաթղթում կարող են պահվել ոչ համասեռ տվյալներ, ինչն էլ նորմալիզացիայի խնդիրներ է առաջացնում։ Ոչ հարաբերական բազների հիմնական տիպն է ու բանալի–արժեք զույգով աշխատող բազաների ենթախումբ։ Հարաբերական բազայի տրամագծորեն հակառակ կոնցեպտն է։ Փաստաթղթային և մյուս ոչ հարաբերական բազաներն օգտագործում են «<a href="https://medium.com/spidernitt/orm-and-odm-a-brief-introduction-369046ec57eb">Object Document Mapping</a>», բայց դա <a href="http://www.pps-design.org/arch:orm-nosql">խանդրահարույց</a> է, քանի որ ի տարբերություն հարաբերական բազաների, ոչ հարաբերականները չունեն ստանդարիզացիա, ամեն բազա իր յուրահատկությունն ունի ու ամեն մեկի համար սահմանափակ կիրառություն ունեցող «ODM» մշակելը տնտեսապես շահավետ չէ։ Փաստաթղթոււմ ինֆորմացին պահվում է JSON, XML կամ այլ ձևաչափով։ Բազայի տիրույթում փաստաթուղթը հասանելի է եզակի ինդեքսի կամ բանալու ձևով, ինչպես նաև մետատվյալների միջոցով։ Բազայի օրինակներ են <a href="https://en.wikipedia.org/wiki/MongoDB">MongoDB</a>–ն ու RedisJSON–ը։</p><p><a href="https://en.wikipedia.org/wiki/Wide-column_store"><strong>Wide Column</strong></a> կամ <strong>Ընդլայնված սյունով բազա </strong>— պիտանի ինֆորմացիան հենց ամբողջական սյունն է, ամեն սյուներն առանձին ֆայլեր են ու կարող են հիշողության մեջ առանձին գրանցվել։ Կոնկրետ տվյալ ստանալն արագ է տեղի ունենում, քանի որ սյունը պարունակում է նույն տիպի տվյալներ, որոնց սերիալիզացիան և դեսերիալիզացիան ավելի արագ են տեղի ունենում։ Առաջին հայացքից հարաբերական բազաներին շատ <a href="https://docs.microsoft.com/en-us/azure/architecture/data-guide/big-data/non-relational-data">նման է թվում</a>, բայց սյուները հեշտությամբ կարող են փոփոխվել։ Կարելի է ներկայացնել, որպես երկչափանի Բանալի–արժեքային զույգ։</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/817/1*9ffbydgo2NzcfONpusUdIw.png" /></figure><p>Կան սյուների վրա հիմնաված բազաների տարբեր իմպլեմենտացիաներ, որոնցից ամեն մեկի կոնտեքստում տողի կամ սյան առաջնայինությունը տարբեր է, այսինքն՝ բազայում, սյունից բացի, տողը նույնպես կարող է դեր ունենալ։ Կամ հենց բազան կառավաող համակարգը՝ «DBMS»–ը կարող է կարևոր լինել, օրինակ՝ «<a href="https://en.wikipedia.org/wiki/Column-oriented_DBMS">Column–oriented</a>» բազաներում։ «<a href="https://en.wikipedia.org/wiki/Super_column">Super column</a>»–ի դեպքում սյան ամեն տարրը՝ տողը, նույնպես կարող է լինել բաղադրյալ և պարունակել 1–ից ավել ենթատարրեր։ <a href="https://www.dataversity.net/wide-column-database/">Նկարում</a> պատկերված է, թե ինչպես են աղյուսակում ստեղծվում տրամաբանակական այլ ենթաաղյուսակներ։</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/478/1*ikTtm7XfdQrz5iC5H7G58g.png" /></figure><p>Մասնավոր դեպք է «JSON»–ը, որն իր մեջ պարունակում է օբյեկտ, որն ունենում է ենթաօբյեկտներ, դրանք էլ ունեն իրենց ենթաօբյեկտները և այլն։</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1028b63efa8d79b4c5b072feb27635c6/href">https://medium.com/media/1028b63efa8d79b4c5b072feb27635c6/href</a></iframe><p>Ծառի տեսքին նայելիս՝ տեսնում ենք ենթադաշտերի առկայությունը՝</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*-XBwJLVP3HvSkb26m3z6jA.png" /></figure><p>Ամբողջ բազան հանդիսանում է մեկ «<a href="https://en.wikipedia.org/wiki/Keyspace_(distributed_data_store)">Keyspace</a>»։</p><p>Ակնառու դրսևորումներ են <a href="https://www.influxdata.com/what-is-time-series-data/">ժամանակագրական հաջորդականությամբ</a> ստացվող և պահվով տվյալները, օրինակ՝ ջերմաստիճանը, սեյսմիկ ակտիվությունը, կենսաչափական տվյալները և այլ պարբերական իրադարձությունները։ Օրինակ՝ ամսվա ինչ–որ օր հանդիսանում է բանալի, իսկ սեյսմիկ ակտիվության վերաբերյալ տվյալները զբաղեցնում են ամբողջ տողը։ <a href="https://logz.io/blog/nosql-database-comparison/">Տեխնոլոգիաներ</a> են CQL լեզուն, Apache HBase–ը և <a href="https://www.scylladb.com/glossary/wide-column-database/">ScyllaDB</a>–ն։</p><p><strong>Search Engine</strong> կամ <strong>Որոնաղական համակարգերի բազա</strong> — նախատեսված է մեծածավալ տվյալների հետ գրեթե իրական ժամանակում աշխատելու համար։ Հայտնի տեխնոլոգիաներից են <a href="https://en.wikipedia.org/wiki/Apache_Solr">Solr</a>–ը և <a href="https://www.elastic.co/guide/en/cloud/current/ec-api-principles.html">Elasticsearch</a>–ը։ <a href="https://aws.amazon.com/opensearch-service/the-elk-stack/what-is-elasticsearch/">Elasticsearch</a>–ը տրամադրում է REST API–ներ և օգտագործում է անսխեմա JSON ֆորմատով փաստաթղփեր։ Ծայրակետերի միջև հարցումներն իրականացվում են HTTP բայերով՝ GET POST, PUT կամ PATCH և DELETE։ Փաստաթղթերը գտնվում են տարբեր սերվերների վրա, ուստի հարցումներն աշխատում են զուգահեռությամբ։ Բազայում նախապես իրականացվում է ինդեքսավորում, որի հիման վրա հաջորդ քայլով տվյալ ստանալն ավելի արագ է տեղի ունենում։</p><p><strong>Multi model</strong> կամ <strong>Բազմամոդել </strong>— համադրում է հարաբերական և ոչ հարաբերական բազաների սկզբուքները։ Բազայի օրինակ է «<a href="https://fauna.com/">Fauna</a>» API–ը, որը հիմնականում գործում է «GraphQL»–ի հետ համադրված, բայց բազում <a href="https://docs.fauna.com/fauna/current/drivers/csharp">ծրագրավորման լեզուներ</a> ևս կարող են «Fauna»–ն օգտագործել սեփական հարցումների համար։ Համեմատաբար քիչ է կիրառվող JSON–ը, իսկ պատճենավորում՝ «Replication» չի պահանջվում։</p><p>Բազաների կոնցեպտների իրականացման ժամանակ ունենում ենք <a href="https://www.dataversity.net/review-pros-cons-different-databases-relational-versus-non-relational/">2 հիմնական մոդել</a>՝ հարաբերական և ոչ հարաբերական։</p><h4>Բազաների հետ աշխատելիս գործ ենք ունենում մի շարք հասկացությունների հետ, օրինակ՝</h4><p>1. Database՝ Տվյալների բազա</p><p>2. Cloud,</p><p>3. Data Warehouse և Data Lake,</p><p>4. OLAP և OLTP,</p><p>5. Quantitative` Քանակական և Qualitative՝ Որակական տվյալներ,</p><p>6. Data model, Database model</p><p>7. Structurized և Unstructured տվյալներ,</p><p>8. Replication և Duplication,</p><p>9. Functional Dependency, Partial Dependency, Transitive Dependency</p><p>10. Key՝ բանալիներ,</p><p>11. Normalization, Normal Forms,</p><p>12. Partitioning՝ մասնատում և Sharding՝ շերտավորում,</p><p>13.CRUD,</p><p>14. Indexing,</p><p>15. View,</p><p>16. Union, Intersect, Except</p><p>17. Transaction,</p><p>18. Stored Procedures</p><p>19. JOIN</p><p>20. Triggers</p><p>21. Schema</p><p><strong>1. Database</strong> կամ <strong>Տվյալների բազա</strong> — տվյալների պահպանման աբստրակտ միջավայր, որը հաճախ զբաղեցնում է իրական հիշողություն՝ սարքավորում, բնականաբար ամեն իրավիճակի համար կան կոնկրետ մոդիֆիկացիաներ։</p><p><strong>2. Cloud</strong> — հեռավար սերվերային համակարգ և բազա՝ բիզնես գործունեության համար։</p><p><strong>3. </strong><a href="https://www.ibm.com/cloud/learn/data-warehouse"><strong>Data Warehouse</strong></a><strong> </strong>— կենտրոնացված համակարգ՝ բիզնես բանականության և գիտահեն վերլուծությունների համար։ Ի վիճակի են մշակել պետաբայթերի հասնող ինֆորմացիա, ի տարբերություն դասական բազաների, տեխնիկական ապահովման համար պետք են սուպեր համակարգիչներ։ Տեսականորեն օգտագործում է «Structured Data» և «Semi–structured Data», հետևաբար ունի նորմալիզացիա և տվյալների մաքրություն ու եզակիություն։ Ունի եռաշերտ ճարտարապետություն՝</p><p>1) Ստորին շերտ — կազմված է հիմանկան սերվերից, որը սովորաբար հարաբերական բազա է, իրականացնում է <a href="https://rivery.io/blog/etl-vs-elt/">ETL կամ ELT</a> պրոցես</p><p>2) Միջին շերտ — կազմած է <a href="https://www.ibm.com/cloud/blog/olap-vs-oltp">OLAP</a> կամ «Online analytical processing» շերտից, որն արագացնում է հարցումները,</p><p>3) Վերին շերտ — հանդիսանում է Front end կամ նմանատիպ այլ ինտերֆեյս</p><p>Ի մի է բերում տրանզակցիա իրականացնող <a href="https://www.dataversity.net/review-pros-cons-different-databases-relational-versus-non-relational/">համակարգերի</a>` CRM կամ «customer relationship management», HRM «human resources management» և ERP «enterprise resource planning», իրական ժամանակում տվյալներ մշակող օպերատիվ բազաների, անգամ ոչ հարաբերական բազաների՝ <a href="https://en.wikipedia.org/wiki/Flat-file_database">հարթ ֆայլեր</a> և այլ աղբյուրների կողմից ստացվող ինֆորմացիաները։ Վերջնական օգտագործման համար հասանելի է որպես ծրագրային ապահովում, ամպային տեխնոլոգիա կամ սարքավորում։</p><p>Պայմանականորեն կարելի է համեմատել «Stack»–ի հետ, երբ կա կանոնակարգ։</p><p><a href="https://www.ibm.com/cloud/blog/what-is-a-data-lake"><strong>Data Lake</strong></a> — ընդհանուր նշանակության համակարգ, երկուական ֆայլային <a href="https://en.wikipedia.org/wiki/Binary_large_object">օբյեկտների</a> համար, ինչպիսիք են նկարները, վիդեոները կամ աուդիոները, «Unstructured» տվյալներ պահելն է <a href="https://blogs.oracle.com/bigdata/post/data-lake-data-warehouse-and-databasewhatx27s-the-difference">արդյունավետ</a>, օգտագործում է ոչ հարաբերական բազաների համար, բայց <a href="https://www.mongodb.com/databases/data-lake-vs-data-warehouse-vs-database">կարող է պահել</a> մոդել ունեցող տվյլաներ էլ։ Աչքաթող անելու և <a href="https://en.wikipedia.org/wiki/Data_lake">թերի կառավարելու</a> դեպքում վերածվում է «<a href="https://www.nvisia.com/insights/data-swamp">Data Swamp</a>»–ի։ Կարելի է համեմատել «Heap»–ի կոնցեպտի հետ։</p><p>Աղյուսակում <a href="https://aws.amazon.com/big-data/datalakes-and-analytics/what-is-a-data-lake/">համեմատվում են</a> «Data Warehouse»–ը և «Data Lake–ը։</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*15C_rB55FUzZlMljpYh67A.png" /></figure><p><strong>4. </strong><a href="https://www.ibm.com/cloud/learn/olap"><strong>OLAP</strong></a><strong> </strong>կամ <strong>Online Analytical Processing </strong>— Data Warehouse–ում պահվող արժեքների բազմաչափ վելուծություն։ Չափումներ են տեղադրությունը, առարկայի տեսակը, ժմանակը և այլն։ Քանի որ օգտագործում է հարաբերական բազաներ, որոնցում միայն 2 չափում է, աղյուսակները համադրվում են և ստեղծում բազմաչափ ֆորմատով տվյալներ՝ խորանարդներ։ Հարցումները բարդ են և ներառում են մեծաքանակ տողեր։ Չեն փոփոխում առկա տվյալները, քանի որ մեծամասամբ միայն կարդում են դրանք։</p><p><a href="https://www.ibm.com/cloud/learn/oltp"><strong>OLTP</strong></a><strong> </strong>կամ <strong>Online Tansactional Processing</strong> — մեծածավալ տրանզակցիաների մշակում։ Ապահովում է, որ նույն ինֆորմացիան շատերի կողմից օգտագործվի, ինդեքսավորում է տվյալները։ Հարցումները պարզ են և ներառում են մի քանի տող։ Տվյալների փոփոխությունն արագ է ընթանում։ Լավ օրինակ են օնլայն վճարային համակարգերը։</p><p><strong>5. Քանակական տվյալներ</strong> — միայն իրենց գոյությամբ արդեն ունեն օբյեկտիվ բնութագիր, նկարագրվում են վիճակագրական հանտկանիշերով՝ քանակաով, արժեքով, չափով և այլն։ Լինում են դիսկրետ կամ անընդհատ։ Համընկնում են Structured տվյալների հետ։</p><p><strong>Որակական տվյալներ </strong>— որևէ հատկանիշով կամ ատրիբուտով միավորված տվյալներ։ Քանի որ միավորումը սուբյեկտիվ երևույթ է ու կարող է շատ այլ ձևերով էլ իրականացվել, որակական տվյալները չկառուցված կամ կիսակառուցված են, այսինքն՝ կա հետագա հստակացման և դասակարգման կարիքու հնարավորություն։ Համընկնում են Unstructured տվյալների հետ։</p><p><strong>6. </strong><a href="https://en.wikipedia.org/wiki/Data_model"><strong>Data Model</strong></a><strong> </strong>— ստացվում է <a href="https://en.wikipedia.org/wiki/Data_modeling">մոդելավորմամբ</a>, տվյալներին տալիս է իմաստային կառուցվածք, սահմանում իրար հետ հարաբերվելը և իրական աշխարհի օբյեկտների հատկությունների հետ ունեցած նմանությունը։</p><p><strong>Database Model </strong>— սահմանում է տվյալների բազայի տրամաբանական կառուցվածքը։ Մոդելներ են ցանցայինը, փաստաթղթայինը, հարաբերականը, օբյետտ–ատրիբուտ–սյունը և այլն։</p><p><strong>7. Structured Data </strong>— քանակական տվյալներ, որ կազմված են թվերից և արժեքից, ներկայացվում են աղյուսակների տեսքով, ունեն նախասահմանված մոդելներ, պահվում են Data Warehouse–ներում, հարցումներն արվում են SQL–ական լեզվով։ Դեռևս չմշակված նախնական տվյալներին կառուցվածք՝ «Structure» կարելի է հաղորդել անգամ <a href="https://www.searchenginejournal.com/this-is-structured-data/379148/">HTML լեզվով նշագրելու</a> միջոցով։ Կարելի է կայքն օպտիմիզանցել որոնողական համակարգի կողմից ավելի նկատելի դառնալու համար։</p><p><strong>Unstructured Data </strong>— որակական տվյալեր, տվյալների նախնական վիճակը, երբ բացակայում է Data model–ը, և ըստ այդմ մեծ քանակներ ստանալը հեշտ է, ինչն էլ պահանջում է մեծ հիշողություն։ Քանի որ կարող է ադապտացվել տարբեր ֆայլային ֆորմատների, կարելի է վերասահմանել կոնկրետ կարիքների համար և հասնել ռեսուրսների արդյունավետ օգտագործման։ Use case–եր են <a href="https://www.ibm.com/cloud/blog/structured-vs-unstructured-data">Data mining</a>–ը, <a href="https://www.ibm.com/cloud/learn/natural-language-processing">NLP</a>–ը և կանխատեսումային վերլուծությունները, ավելի արդյունավետ պահվում են Cloud Data lake–երում, մշակվում են <a href="https://www.ibm.com/cloud/learn/nosql-databases">NoSQL</a> համակարգերում։</p><p>Կարճ՝ բազայում գտնվող տվյալը կարող է լինել Կառուցված՝ «Structured» կամ Չկառուցված՝ «Unstructured», հնարավոր են միջանկյալ տեսակներ։ Կառուցված են այն տվյալները, որոնք ունեն «<a href="https://en.wikipedia.org/wiki/Data_model">Data Model</a>», որը ստացվում է <a href="https://en.wikipedia.org/wiki/Data_modeling">մոդելավորմամբ</a>, այսինքն՝ տվյալներին տալիս է իմաստային կառուցվածք, սահմանում իրար հետ հարաբերվելը և իրական աշխարհի օբյեկտների հատկությունների հետ ունեցած նմանությունը։ Կան նաև <a href="https://en.wikipedia.org/wiki/Semi-structured_data">Semi–structured</a> տիպեր։</p><p><strong>8. Replication</strong> — հատուկ ծրագիրը գտնում է բազայի տարբեր կտորներում արված փոփոխությունները և անում այնպես, բոլոր կտորները նույն տեսքն ունենան, այսինքն՝ կա՛մ չեղարկում է փոփոխությունը, կա՛մ մյուս կտորների վրա տարածում այդ փոփոխությունը։</p><p><strong>Duplication </strong>— ընտվրում է 1 գլխավոր բազա և կրկնօրինակվում դրա պարունակությունը, հետագա փոփոխություններն արվում են այդ 1 բազայի հետ։ Նույն «Backup»–ն է։</p><p><strong>9. Functional Dependency </strong>— սահմանափակող հարկադրություն, գրվում է «X→Y», որտեղ «X»–ը միանշանակորեն ասոցացված է «Y»–ի հետ։ Օրինակ՝ Ավտոմեքենայի նույնականացման համարը՝ «VIN»–ը, ասոցացված է շարժիչի հզորությանը, գրվում է «VIN→Engine», քանի որ կոնկրետ մեքենան ունի միայն 1 հզորություն։ «Engine→VIN» գրառումը սխալ է, քանի որ նույն հզորությամբ շատ մեքենաներ կան։ Աղյուսակում ուսանողը կարող է մեկից ավելի դասընթացների գրանցվել և ունենալ կամայական թվով կիսամկայային մասնակցություն։</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/536/1*wyoLZw1UzphJIwBRYtVKzw.png" /></figure><p>Երբ աղյուսակում 2 տող ունենում են նույն «Student ID»–ին, ապա նրանք նաև ունենում են նաև նույն «Semester» արժեքը։ Այստեղ ունենք «StudentID → Semester» ֆունկցիոնալ կախվածություն։ Կախվածության այլ օրինակ է «{StudentID, Lecture} → {TA, Semester}» հարաբերությունը, երբ ունենք նախապես ընտրված {StudentID, Lecture} ատրիբուտների բազմությունը և {TA, Semester} բազմությունը, որտեղ «{StudentID, Lecture}»–ը սուպեր բանալի է։</p><p>Հետևյալ օրինակում յուրաքանչյուր աշխատակից կարող է ունենալ միայն 1 «Department ID»։ Քանի որ ամեն մեկը կարող է աշխատել միայն մեկ վարչությունում, «Employee ID»–ին սահմանում է նաև վարչությունը՝ «Employee ID → Department ID»։</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/713/1*hCk7a4O8wasE3k1Mm1VCnA.png" /></figure><p>Employee ID»–ին սահմանում է նաև աշխատողի անունը՝ «Employee ID → Employee Name»։ Աղյուսակում նաև ոչ բանալի ատրիբուտով կազմված ֆունկցիոնալ կախվածություն կա՝ «Department ID → Department Name»։ Չնայած կա «Employee ID → Department ID» ֆունկցիոնալ կախվածություն, «Employee ID»–ով «Department ID» ստանալը տրամաբանական չէ։</p><p><a href="https://www.tutorialspoint.com/Partial-Dependency-in-DBMS">Partial Dependency</a> — ի հայտ է գալիս, երբ ոչ բանալի սյունը ֆունկցիոնալ կախվածության մեջ է պոտենցիալ բանալի կազմող սյուներից որևէ մեկից։</p><p>Դիտարկենք օրինակը՝</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*9KvZCACpLgyLFAfobcD_ew.png" /></figure><p>Առաջնային բանալին կազմված է «StudentID» և «ProjectNo» սյուներից։ «StudentName» և «ProjectName» սյուները պիտի կախված լինեն առաջնային բանալուց։ «StudentName»–ը կարող է որոշվել «StudentID»–ով, «ProjectName»–ը կարող է որոշվել է «ProjectNo»–ով։ Ուստի ունենք մասնավոր կախվածություն։ Սա խախտում է նաև 2–րդ նորմալ ձևի կանոնները։</p><p>Transitive dependency — ֆունկցիանալ կախվածության տեսակ, երբ 1–ին սյունը կապված է 3–ին 2–ի միջոցով։ Աղյուսակում նման օրինակ է՝</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/939/1*kT0nHQVBwq1z6YI6teMnAw.png" /></figure><p>Եթե գիտենք գիրքը, ապա գիտենք նաև հեղինակի ազգությունը՝ «{Book}→{Author nationality}», քանի որ գրքով նախ գտնում ենք հեղինակին՝ «{Book} → {Author}», իսկ հեղինակով էլ՝ հեղինակի ազգությունը՝ «{Author}→{Author nationality}»։ Ոչ բանալի ատրիբուտը սահմանում է մեկ այլ, ոչ բանալի ատրիբուտ։</p><p><strong>10. Բանալի </strong>— <a href="https://www.guru99.com/dbms-keys.html">ատրիբուտ</a> կամ սյուն, որը թույլ է տալի նույնականացնել տողը։ Կան խմբեր՝</p><p>1) <a href="https://en.wikipedia.org/wiki/Superkey">Super Key</a> — ատրիբուտների բազմություն, որը եզակիորեն նույնականացնում է յուրաքանչյուր տողը, չունի նվազագույն չափ ունենալու պահանջներ, ուստի կարող են ներառել ավելի կոմպակտ այլ բանալիներ։ Սահմանում է ֆունկցիոնալ կախվածություն։</p><p>2) <a href="https://en.wikipedia.org/wiki/Candidate_key">Candidate key</a> — նվազագույն չափ ունեցող «Super Key»։ Սրա կազմի մեջ մտնող սյուները կոչվում են «Prime Attribute», չմտնողները՝ «Non–Prime attribute»: «NULL» արժեք չպարունակող աղյուսակն ունի ամենաքիչը 1 «Candidate key»։ Հանդիսանում է տողն իդենտիֆիկացնելու հնարավոր բոլոր կոմբինացիաները։</p><p>3) <a href="https://en.wikipedia.org/wiki/Primary_key">Primary Key</a> — ատրիբունտների նվազագույն բազմությամբ կազմած ընտրություն, որը եզակիորեն սահմանում է տողը։ «Candidate key»–ի մասնավոր դեպք է։ Առավելագույնը կարող է լինել առավելագույնը 16 սյուն և 900 բայթ։</p><p>4) <a href="https://en.wikipedia.org/wiki/Foreign_key">Foreign key</a> — սյուների բազմություն, որը կազմված է այլ աղյուսակի առաջնային բանալուց։ «Foreign Key» պարունակող աղյուսակը կոչվում է երեխա կամ ժառանգ աղյուսակ, իսկ առաջնային բանալի պաունակողը՝ ծնող։ Երեխա աղյուսակում գրվող արտաքին բանաին կա՛մ հավասր է այլ աղյուսակի առաջնային բանալուն, կա՛մ ունենում է NULL արժեք։ Սա կոչվում է «<a href="https://en.wikipedia.org/wiki/Referential_integrity">Referential integrity</a>»։</p><p>5) Simple key — միայն մեկ ատրիբուտից՝ սյունից կազմբած բանալի:</p><p>6) Concatenated key — կազմված 2 կամ ավել սյուներից:</p><p>7) <a href="https://www.bbc.co.uk/bitesize/guides/z4wf8xs/revision/4">Compound key</a> — կազմված 2 կամ ավելի սյունից, որոնք այլ աղյուսակի ցույց տվող առաջնային բանալի են։</p><p>8) <a href="https://en.wikipedia.org/wiki/Composite_key">Composite key</a> — առաջնային բանալու մասնավոր դեպք, կազմված 2 կամ ավելի սյունից, որոնցից գոնե 1–ը պարզ բանալի չէ։ Դիտարկենք <a href="https://www.bbc.co.uk/bitesize/guides/z4wf8xs/revision/4">աղյուսակը</a>՝</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/941/1*1EJ6ql6q8qtcI6T1h-6Xzw.png" /></figure><p>Միայն 1 դաշտով հնարավոր չէ եզակի արժեք ստանալ, քանի որ ամեն սյան մեջ կան կրկնվող արժեքներ։ «Team» և «Squad number» սյուների արժեքները համադրելով ստեղծվում է Առաջնային բանալի։</p><p>9) <a href="https://en.wikipedia.org/wiki/Natural_key">Natural key</a> — եզակի ինդենտիֆիկատոր, որը նաև իրական աշխարհի օբյեկտի հետ է համընկնում, ունի բիզնես նշանակություն։</p><p>10) <a href="https://en.wikipedia.org/wiki/Surrogate_key">Surrogate key</a> — եզակի ինդենտիֆիկատոր, որն իրնքն իրենով էլ արժեք է, ավելի շատ առնչվում է տվյալների տրամաբանական կառուցվածքին՝ «<a href="https://en.wikipedia.org/wiki/Data_model">Data Model</a>»–ին, քան հիշողության ֆիզիկական կառաուցվածքին՝ «<a href="https://en.wikipedia.org/wiki/Storage_model">Storage model</a>»–ին։ Կոնկրետ բազայի տիրույթում կարող է հանդես գալ որպես առաջնային բանալի։ Բազայում թեստային արժեքների գրանցման ժամանակ <a href="https://www.mssqltips.com/sqlservertip/5431/surrogate-key-vs-natural-key-differences-and-when-to-use-in-sql-server/">ավտոգեներացվող արժեքով</a> բանալի է։</p><p><strong>11. </strong><a href="https://en.wikipedia.org/wiki/Database_normalization"><strong>Նորմալացում</strong></a> — նորմալ ձևերի օգտագործմամբ հարաբերական բազաները կառուցելու գործընթաց, տվյալների կրկնությունների նվազեցման և տվյալների ամբողջականության բարձրացման համար։ Սյուները և աղյուսակները կազմակերպվում են այնպես, որ կախվածություններն իրականացվեն ըստ բազաների ամբողջականության սահմանափակումների։ Իրականացվում է կա՛մ բազաների սինթեզով, կա՛մ դեկոմպոզիցիայով, այսինքն՝ աղյուակների նոր հիերախիաներ կառուցելով կամ քանդելով։ Նորմալ տեսքի բերելը կարող է արագագործության վրա նաև բացասական ազդեցություն ունենալ, դժվարեցնել հարցումներ գրելը և այլն, ու կարող է դենորմալիզացիայի կարիք առաջանալ։ Հասկացությունը կիրառվում է միայն հարաբերական բազաների համար, չնայած, որ ոչ հարաբերական բազաները նույնպես կարելի է կատարելագործել։</p><p>Նորմալ Ձևեր — նորմալացման համար օգտագործվող ռազմավարությունները, յուրաքանչյուր հաջորդ մակարդակ բավարարում է նախորդ մակարդակին էլ։</p><p><strong>1–ին նորմալ ձև</strong> — յուրաքանչյուր վանդակ պիտի ունենա եզակի արժեք, ներդրված արժեքներ թույլատրված չեն։ Կոնկրետ Id ունեցող տողի որևէ վանդակում 1–ից ավելի արժեքներ պահելու փոխարեն, պետք է դրանք գրել առանձին վանդակներում՝ օգտագործելով այդ նույն Id–ին։</p><p>Դիտարկենք սխալ աղյուսակի օրինակ՝</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/902/1*SRwnVaIdIqIGlorg1L_-iA.png" /></figure><p>1–ին նորմալ ձևի բելելուց հետո ունենում ենք հետևյալ տեսքը՝</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/892/1*x0oYlzP_t0XoTAx_7y9ddw.png" /></figure><p><strong>2–րդ նորմալ ձև</strong> — չկա «non-prime attribute», որը պոտենցիալ բանալիների որևէ ենթաբազմության հետ ֆունկցիանալ կախվածության մեջ է։ Այսինքն՝ առաջնային սյուն չհանդիսացող այլ սյուները, առաջնային բանալու թեկնածու սյուներից ֆունկցիոնալ կախվածության մեջ չպիտի լինեն։ 1 սյունանոց առաջնային բանալով աղյուսակը միշտ 2–րդ նորմալ ձևի է։ 2–րդ ձևի դառնալուց առաջ աղյուսակը նախ պիտի լինի 1–ին նորմալ ձևի։</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/527/1*5bkFDnXydNZKjnHtITujFw.png" /></figure><p>Այս աղյուսակի հավանական առաջնային բանալին բաղադրյալ է՝ կազմված «Manufacturer» և «Model» սյուներից։ «Manufacturer country» սյունը չի հանդիսանում առաջնային բանալի, անգամ չի էլ կարող դիտարկվել որպես այդպիսին և կախված է «Manufacturer»–ից։ Սա 2–րդ նորմալ ձևի պայմանների խախտում է։ Պայմաններին բավարարելու համար պետք է ունենալ 2 աղյուսակ՝</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/791/1*WbTKAnhJp3XAfVV6W8Gdog.png" /></figure><p>Մասնակի կախվածություն պարունակող աղյուսակը՝</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*9KvZCACpLgyLFAfobcD_ew.png" /></figure><p>2–րդ նորմալ ձևի բերելու համար այն տարանջատում ենք մասերի ՝</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/816/1*a0G6oFrxDfom3YIzMeiAMQ.png" /></figure><p>Հետևյալ <a href="https://www.ibm.com/docs/en/db2-for-zos/11?topic=modeling-normalization-in-database-design">օրինակում</a> նույնպես խախտված է 2–րդ նորմալ ձևը՝</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/613/1*-HswYD1vZSmApH12xeLjnw.png" /></figure><p>Առաջնային բանալին կազմված է «PART» և «WAREHOUSE» սյուներից, բայց «WAREHOUSE_ADDRESS» սյունը կախված է միայն «WAREHOUSE» սյունից։ Նույն պահեստը տարբեր տողերում կարող է ունենալ տարբեր հասցեներ։ Պետք է այնպես անել, որ 1 պահեստը միշտ 1 մեկ հասցե ունենա, այսինքն՝ պահեստը պիտի օգտագործվի որպես առաջնային բանալի, գրվի առանձին աղյուսակում։</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/761/1*-eiz2bG7GVL7T0Z7IislFQ.png" /></figure><p><a href="https://en.wikipedia.org/wiki/Third_normal_form"><strong>3–րդ նորմալ ձև</strong></a> — պիտի բանալու կազմի մեջ չմտնող սյուները կախված չլինեն բանալու կազմի մեջ չմտնող սյուներից և կախված լինեն միայն բանալի սյունից։ Սահմանում է կրկնօրինակումների նվազեցումը, հեշտացնում տվյալների կառավարումը և «Referential integrity»–ին։ Այս աղյուսակն արդեն 2–րդ ձևի է, բայց չի համապատասխանում 3–րդ նորմալ ձևին։</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/703/1*9IWShazISrP7xE1Y3341xA.png" /></figure><p>Մրցույթը և անցկացման տարին՝ {Tournament, Year}–ը, բավական են տողը միանշանակորեն որոշելու համար, հանդիսանում են առաջնային բանալի։ Բայց խնդիրն այն է, որ «Ծննդյան ամսաթիվ» ոչ բանալի սյունը «Հաղթող» միջնորդ սյունով է կախված առաջնային բանալուց և նույն մարդը կարող է տարբեր ծննդյան ամսաթվերով հանդես գալ։ Աղյուսակը մասերի բաժանոլով՝ լուծում ենք խնդիրը։ «Հաղթող» սյունը բանալի է, որին արդեն միայն 1 արժեք է համապատասխնում։</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/894/1*cw5mcSd9Ecwa_NgERZ4edg.png" /></figure><p><strong>Boyce–Code</strong> կամ <strong>3․5 Normal Form</strong> — 3–րդ նորմալ ձևում գտնվող աղյուսակ, որում չկան համընկնող թեկնածու բանալիներ։ Կա A → B <a href="https://www.studytonight.com/dbms/boyce-codd-normal-form.php">կախվածությունը</a>, որտեղ «A»–ն սուպեր բանալի է, այսինքն մյուս սյունակները, օրինակ «B»–ն որոշվում, գտնվում են սուպեր բանալիով։ Պիտի լինի միայն է առաջնային բանալի։</p><p><strong>4–րդ նորմալ ձև</strong> — աղյուսակը չի պարունակում 2 կամ ավելի անկախ, բազմարժեք տվյալներ։ Կա 2 կապ՝ «Աշխատակից և կարողություն» և «Աշխատակից և լեզվի իմացություն»։ Չի կարելի ունենալ «Skill Code և Language Proficiency» և «Language Code և Skill Proficiency» հարաբերույուններ, դրանք իրար հետ կապ չունեն։</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/849/1*lZ3cQcAGL2bWuhM2Oso89A.png" /></figure><p>Նման աղյուսակը <a href="http://kseminar.staff.ipb.ac.id/files/2014/02/NormalForms.pdf">տվյալներով լցնելու</a> դեպքում «Null» արժեքներ ենք գրելու։</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/378/1*bpEs__H-UpySoZOxmi8ZYw.png" /></figure><p>Շտկելու համար գրում ենք հետևյալը և «Null» գրելու կարիք չի լինի։</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/909/1*JptTTKZERifrHQBV2IUrMQ.png" /></figure><p><strong>5–րդ նորմալ ձև</strong> — բաղադրյալ բանալին չի պարունակում ցիկլային կախվածություններ։</p><p><strong>12. </strong><a href="https://en.wikipedia.org/wiki/Partition_(database)"><strong>Partitioning</strong></a> — ինչ–որ սկզբունքով ինքնուրույն միավորվերի բաժանում։ Հարաբերական բազայում կա 2 ձև՝ հորիզոնական և ուղահայաց։ Ուղահայաց մասնատման օրինակ է նորմալիզացիան, երբ 1 աղյուսակում 5 սյուն ունենալու փոխարեն ունենում ենք 2 կամ ավելի աղյուսակներ, որոնք ունենում են 5–ից պակաս սյուներ։ Հորիզոնական բաժանումը կոչվում է «Sharding»։ Դիտարկենք <a href="https://medium.com/@jeeyoungk/how-sharding-works-b4dec46b3f6">նկարը</a>՝</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/766/1*C7DnNVFFRaQ53C-HpzfQSA.png" /></figure><p><a href="https://en.wikipedia.org/wiki/Shard_(database_architecture)"><strong>Sharding</strong></a><strong> </strong>— հորիզոնական շերտավորում, այնպես, որ նոր ստացվող կտորները պահեն բազայի սխեման և սյուները։ Աղյուսակը կամ փաստաթուղը մասնատվում է, քանի որ մեծ կտորի հետ աշխատելը դժվար է, իսկ փոքր կտորները կարող են <a href="https://docs.mongodb.com/manual/sharding/">տարբեր բազաներում կամ սերվերում</a> պահվել և տարբեր պրոցեսորներով զուգահեռ մշակվել։ Բարելավում է ինդեքսավորումն ու որոնումը։ Բաժանման և տրանզակցիայի համար կարևոր է «<a href="https://docs.oracle.com/en/cloud/paas/nosql-cloud/csnsd/shard-keys-and-primary-keys.html">Sharding Key</a>»–ին։ Նույն բանալին ունեցող տարրերը դառնում են անբաժանելի միավոր, փոփոխվում են միասնաբար, կազմում են տրամաբանական միավոր՝ «Logical Shard»։</p><p><strong>13. CRUD</strong> — բազան կառավարելու տարրական «Create», «Read», «Update» և «Delete» գործողություններ։</p><p>«CREATE» հրամանով ստեղծում ենք բազա և աղյուսակներ, «INSERT» հրամանով ներմուծում ենք տվյալներ, հետո կարդում՝</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/40098321d9310306625c9bba6b14f7a0/href">https://medium.com/media/40098321d9310306625c9bba6b14f7a0/href</a></iframe><p>Գրքերրի աղյուսակը պարունակում է ID, վերնագիր, ISBM, հեղինակների և հրատարակչի անուններ։ Ոչ բոլոր գրքերն ունեն 2 հեղինակ և հրատարակիչ:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*EM54Wz4lEKBCVivKqqDqpg.png" /></figure><p>Հետևյալ կոդի առաջին հատվածը «USER» աղյուսակում հայրանունների համար ավելացնում է նոր սյուն և փոխում լռելյան NULL արժեքները, այնուհետև ջնջվում է այդ նույն սյունը։ Ջնջվում են այն տողերը, որոնք պարունակում են 2019 — ից առաջ կատարված գնումները։ Վերջում «DROP» համանով ջնջվում են աղյուսակը և բազան։</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/335fd28eb9c02422f308a1a42cdf0a63/href">https://medium.com/media/335fd28eb9c02422f308a1a42cdf0a63/href</a></iframe><p>Սյուն ավելացնելիս ունենում ենք հետևյալ պատկերը՝</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/809/1*fEniIW3xiLBoVixZ7wZwIQ.png" /></figure><p><strong>14. </strong><a href="https://stackoverflow.com/questions/1108/how-does-database-indexing-work"><strong>Indexing</strong></a> — տվյալներն ավելի արագ կարդացող հարցումների մշակում, նաև նոր սյուների ստեղծմում (1)։ Իմաստով մոտ են բանալիներին։ Ինչպես բանալին է հատկանիշ, որը բնութագրում է տվյալին, այնպել էլ ինդեքսն է լրացուցիչ հատկանիշ։ Պարզ է, որ այդ լրացուցից հատկանիշը պահելու համար կարող է մեծ հիշողություն պահանջվել։ Եթե գիտենք կոնկրետ տողի ինդեքսը, ապա կաշխատենք միանգամից այդ տեղի հետ, ամբողջ աղյուսակը վերցնելու կարիք չի լինի։ Հայտարարենք ինդեքս՝</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/74ac0db7464e17b11b5fc327ddd20070/href">https://medium.com/media/74ac0db7464e17b11b5fc327ddd20070/href</a></iframe><p>Կոդի 1–ին հատվածում ստիպված ենք աղյուսակի բոլոր–բոլոր տողերը վեցնել, և ստուգել վերնագիրը։ 2–րդ հատվածում արագացնում ենք հարցման կատարումը։ Պետք է նշել, որ ինդեքսավորման առավելությունը երևում է մեծ աղյուցակների մեջ օգտագործելու դեպքում։</p><p><strong>15. View </strong>— տրամաբանական աղյուսակ, որը միայն ցուցադրում է տվյալներ, բայց ֆիզիկապես հիշողության մեջ գրանցված չէ (2)։ Ստեղծենք «VIEW», որը կներառի C#–ի այն գրքերը, որոնք ունեն 2 հեղինակ, հետո կփոխենք, որպեսզի տեսնենք SQL–ի վերաբերյալ բոլոր գրքերը։</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1bcc6d0722ff5d964e1d2e5357d75bde/href">https://medium.com/media/1bcc6d0722ff5d964e1d2e5357d75bde/href</a></iframe><p>Կոդի առաջին մասի աշխատանքի արդյունքը՝</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*6QztyMj92eIzlj5RDZv2wA.png" /></figure><p>«VIEW»–ն փոփոխությունից հետո՝</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*KgTTWZi-Y_JfUwFs3Vv2Gw.png" /></figure><p><strong>16. UNION, EXCEPT և INTERSECT </strong>— տողերի համակցությունների կազմում (3)։</p><p><strong>17. Transaction</strong> — 1 կամ ավել գործողությունների կոնտեքստ, աշխատանքային միավոր (4)։</p><p>Կեղծկոդով ալգորիթմը հետևյալն է՝</p><p>1. «BEGIN TRAN» — ով սկսել տրանզակցիա</p><p>2. Կատարել հարցումները, տվյալների փոփոխությունները</p><p>3. Եթե խնդիր չկա, գրել «Commit» և ավարտել</p><p>4. Եթե խնդիր կա, Rollback վերադառնալ նախնական վիճակին</p><p>Կա 3 կարգավիճակ՝</p><p>1. Explicit transaction — ուղղակիորեն սկսվում է «BEGIN TRANSACTION» հրամանով, ավորտվում «COMMIT TRANSACTION» կամ «ROLLBACK TRANSACTION» հրամանով։</p><p>2. Implicit transaction — նման է ակնհայտ տրազակցիային, աշխատում է «COMMIT TRANSACTION» և «ROLLBACK TRANSACTION» հրամաններով, բայց «SET IMPLICIT_TRANSACTIONS ON» հրամանով պետք է սկսել «թաքուն» տրանզակցի, որից հետո տրանզակցիայի օբյեկտները կարգելափակվեն, ինչպես «Lock»–ի դեպքում, շարունակում են մշակվել «Commit» և «Rollback» հրամանների կիրառմամբ։</p><p>3. Auto–commit transaction — ժամանակի առ ժամանակ կատարվող տրանզակցիա, որն ակնհայտ կամ ոչ ակնհայտ ձևով չի կատարվում։ «SELECT» և «INSERT» հրամաններն ավտոմատ տրանզակցիայի օրինակ են։ Չհամապատասխող տվյալներ ներմուծելու դեպքում «Rollback» տեղի է ունենում ավտոմատ կերպով, այսինքն՝ սխալի պատճառով տվյալների փոփոխություն տեղի չի ունենում։</p><p>Ցանկացած տրանզակցիա պիտի բավարարի 4 պայմանի՝ ACID</p><p>1. Atomic — բոլոր գործողություններն ատոմի նման անբաժան միավոր են, կա՛մ միասնաբար կատարվում են, կա՛մ միասնաբար ձախողվում։</p><p>2. Consistent — արդյունքը կանխատեսելի է, տրանզակիցային առաջ և հետո բազան մնում է կայուն, անսխալ։</p><p>3. Isolated — ապահովում է, որ միաժամանակ նույն տվյալների հետ գործողություն կատարելու փոխարեն, տվյալները մշակվեն հաջորդաբար։</p><p>4. Durable — վերջնական արդյունքը կախված չէ կատարման ընթացքից։ Եթե կա տրանցակցիայի արդյունք, որի ստացումից հետո համակարգը խափանվել է, արդյունը չպիտի անհետանա։</p><p><em>Checkpoint </em>— «Transaction log»–ում պահվող և տրանզակցիոն գործընթացի ընթացքում փոփոխվող տվյալները ֆիզիկական հիշողության մեջ գրանցելը։ Նախ «Log» ֆայլերը գրանցվում են հիշողության մեջ, բուֆերային քեշից հում տվյալներն են գնում հիշողություն, Checkpoint Log Sequence Number–ը գրվում են «Boot page»–ում։ Կա <a href="https://academy.sqlbak.com/checkpoint/">4 տեսակ</a>՝ «Automatic», «Indirect», «Manual» և «Internal»։ Տրանզակցիայի արած ամեն փոփոխություն բուֆերային ավազանից <a href="https://codingsight.com/database-checkpoints-in-sql-server/">անմիջապես չի տեղափոխվում</a> հիշողություն, այլ կատարվում է «Checkpoint»– սահմանած սկզբունքով։</p><p>T–SQL ում DDL հարցումների մեծ մասը տրանզակցիոնալ է (5)։</p><p><strong>18. Stored Procedures </strong>— <a href="https://en.wiktionary.org/wiki/%D5%A8%D5%B6%D5%A9%D5%A1%D6%81%D5%A1%D5%AF%D5%A1%D6%80%D5%A3">ընթացակարգ</a>, բազայում պահվող օբյեկտ, կարող է ընդունել պարամետրեր, կարող է և վերադարձնել (6)։</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/105b911533a6998e27b34d2cb0105959/href">https://medium.com/media/105b911533a6998e27b34d2cb0105959/href</a></iframe><p>19. Join — 2 կամ ավելի աղյուսակներից սյուներ ընտրելու գործիք (7)։ Կան բազում մաթեմատիկակական մոդելներ, բայց T–SQL–ում կա <a href="https://docs.microsoft.com/en-us/sql/relational-databases/performance/joins?view=sql-server-ver15">5 տրամաբանական տեսակ</a>՝ «Inner Join», «Left Outer», «Join Right», «Outer Join», «Full Outer Join» և «Cross Join»։ Հիմանական տեսքը՝</p><p>SELECT</p><p>FROM Table A</p><p>JOIN Table B</p><p>ON …</p><p>WHERE …</p><p>Նախ ստեղծենք աղյուսակներ, որոնցում կպահվեն գնորդի, գնված ապրանքի և գործարքի տվյալները՝</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0c0f5268c62412cef3ff00d83cf93306/href">https://medium.com/media/0c0f5268c62412cef3ff00d83cf93306/href</a></iframe><p>«INSERT INTO» հրամանով լցնելուց հետո «SELECT»–ով ստանում ենք Գնորդ, Ապրանք և Գործարք աղյուսակները՝</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*f4qAt7VOxdBG_R3SE6Zmlw.png" /></figure><p>Գործարքների աղյուսակից <a href="https://learnsql.com/blog/how-to-join-3-tables-or-more-in-sql/">օգտվելով</a>, կարող ենք պարցել, թե ով ինչ է գնել։</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/90800451bed9d56f3ea642b9fcc91212/href">https://medium.com/media/90800451bed9d56f3ea642b9fcc91212/href</a></iframe><p>Գնորդի աղյուսակից վերցնում ենք անունը, ազգանունը, քաղաքը։ Ապրանքների աղյուսակից ընտրում ենք ապրանքատեսակի անունը։ Բայց Գնորդի աղյուսակը պետք է միավորենք ապրանքի և գործարքների աղյուսակների հետ։ Արդյունքը դասավորվում է այբենական կարգով։</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/439/1*8bKRytPkJjOiyk9GFIOi9Q.png" /></figure><p><strong>20. Triggers </strong>— որևէ իրադարձությունից՝ «Event»–ից հետո աշխատող «Stored Procedure» (8)։ «DML» Trigger–ները կոնկրետ «Event»–ներից՝ Insert–ից, Delete–ից և Update–ից հետո են աշխատում։ Նախապես կոմպիլյացվում են և աշխատել սկսում են ավտոմատ։</p><p>Հայտարարվում է տրիգեռ, սահմանվում է իրադարձությունը, գրվում է մարմինը։</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/cb544b7c2c4d1b2687172adc570ecbd1/href">https://medium.com/media/cb544b7c2c4d1b2687172adc570ecbd1/href</a></iframe><p>Պատվերների աղյուսակից ջնջվում են 16–ից մեծ ID ունեցող տողերը, բայց ջնջումն ակտիվացնում է 2 նոր պատվեր ավելացնող տրիգեռ։ ID սյունին նայելիս, համոզվում ենք, որ նախ ջնջվել են տողեր, հետո նորից ավելացել են։</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*kQAVX-C5d-1_jbwfZxe7uQ.png" /></figure><p>Տրիգեռի մարմնի մեջ կարող ենք JOIN ստեղծել։</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ff53ebcd6197f5d5901690e5a1ca413c/href">https://medium.com/media/ff53ebcd6197f5d5901690e5a1ca413c/href</a></iframe><p>Հենց փորձենք «INSERT» անել, ստանելու ենք «JOIN was done instead of INSERT» հայտարարությունը, և հայտարարված JOIN–ի աղյուսակը։</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/431/1*xT5RmYLS_jL_c1Y6a7-4Hw.png" /></figure><p><strong>21․ </strong><a href="https://www.ibm.com/cloud/learn/database-schema"><strong>Schema</strong></a><strong> </strong>— աղյուսակի կամ հարաբերության և դրա տարրերի՝ ատրիբուտների բազմության ամբողջությունը։ Այն սահմանվում է ծրագրավորման լեզվով գրված կոդով՝ DDL–ով (9), բայց այս հասկացությունն ավելի հաճախ նշանակում է գրաֆիկական պատկերումը։ Աղյուսակների աստղաձև սխեման հաճախ է կիրառվում դենորմալիզացիայի ժամանակ (10)։ Հանդիսանում է բազայում եղած աղյուսակների կամ այլ միավորների կապը, հիերարխիան և <a href="https://en.wikipedia.org/wiki/Database_schema">հատակագիծը</a>։ Պահվում և նկարագրվում է <a href="https://en.wikipedia.org/wiki/Data_dictionary">բառարանում</a>, որը մետատվյալի տեսք ունի է։</p><p>Տվյալների բազաների նախագծումը նախ և առաջ հիմնված է գիտական աշխատությունների և տեսական կոնցեպտների վրա։ Յուրաքանչյուր բիզնես կարող է առաջարկել այդ կոնցեպտների իրականացման և բազայի նախագծման իր ճարտարապետությունը՝ հաշվի առնելով շուկայի պահանջները։</p><p><strong>Օգտագործված ռեսուրսները՝</strong></p><p>1) Learn SQL Database Programming, Query and manipulate DBs from popular relational DB servers using SQL, Chapter 4</p><p>2) SQL Pocket Guide, A Guide to SQL Usage, 4th Ed., Chapter 5</p><p>3) T-SQL Querying, Developer Reference, Chapter 3</p><p>4) Beginning T-SQL with Microsoft SQL Server 2005 and 2008, Chapter 10</p><p>5) Exam Ref 70–761 Querying Data with Transact-SQL, Chapter 3.2</p><p>6) Microsoft SQL Server 2019, A Beginner’s Guide, 7th Ed. Chapter 8</p><p>7) Beginning T-SQL, A Step-by-Step Approach, 4th Ed. Chapter 5</p><p>8) Beginning T-SQL, A Step-by-Step Approach, 4th Ed. Chapter 5, Chapter 13</p><p>9) Learn SQL Database Programming, Query and manipulate DBs from popular relational DB servers using SQL, Chapter 1</p><p>10) Database Design and Relational Theory, Normal Forms and All That Jazz, 2nd Ed., Chapter 8</p><p>Data Lake vs Data Warehouse — <a href="https://www.talend.com/resources/data-lake-vs-data-warehouse/">https://www.talend.com/resources/data-lake-vs-data-warehouse/</a></p><p>Data lake և data warehouse — <a href="https://www.ibm.com/cloud/blog/cloud-data-lake-vs-data-warehouse-vs-data-mart">https://www.ibm.com/cloud/blog/cloud-data-lake-vs-data-warehouse-vs-data-mart</a></p><p>Որակական և Քանակական տվյալներ — <a href="https://www.g2.com/articles/qualitative-vs-quantitative-data">https://www.g2.com/articles/qualitative-vs-quantitative-data</a></p><p>Structured and Unstructured data — <a href="https://www.ibm.com/cloud/blog/structured-vs-unstructured-data">https://www.ibm.com/cloud/blog/structured-vs-unstructured-data</a></p><p>Տրանզակցիաների տեսակները — <a href="https://www.sqlshack.com/modes-of-transactions-in-sql-server/">https://www.sqlshack.com/modes-of-transactions-in-sql-server/</a></p><p>Հարցերի դեպքում գտեք ինձ <a href="https://linkedin.com/in/vchgnmir">LinkedIn</a>–ում, <a href="https://www.instagram.com/vachmir/">Instagram</a>–ում, <a href="https://www.tiktok.com/@vachmir">TikTok</a>–ում և <a href="https://www.facebook.com/VachMir/">Facebook</a>–ում։</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b1d3e9e1953a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Backend and Frontend Walking Skeleton]]></title>
            <link>https://vachmir.medium.com/backend-and-frontend-walking-skeleton-108451017a87?source=rss-b9e92984cbe5------2</link>
            <guid isPermaLink="false">https://medium.com/p/108451017a87</guid>
            <category><![CDATA[entity-framework-core]]></category>
            <category><![CDATA[csharp]]></category>
            <category><![CDATA[sql-server]]></category>
            <category><![CDATA[connection-string]]></category>
            <category><![CDATA[mvc]]></category>
            <dc:creator><![CDATA[Vachagan Mirzoian]]></dc:creator>
            <pubDate>Sat, 01 Jan 2022 10:46:41 GMT</pubDate>
            <atom:updated>2022-01-01T10:46:41.278Z</atom:updated>
            <content:encoded><![CDATA[<p>The most commonly used modern software architecture is Client-Server architecture. The server is responsible for the databases. If the developer can be satisfied with code queries, end-user requires a user-friendly interface. As a result, there are 2 fundamentally different layers. Depending on the complexness of the project, there may be many layers for database storage, data retrieval mechanisms, final data submission, and so on. We will have 2 projects, one for database, another for presentation.</p><p>At first let’s create a Mode-View-Controller project for the presentation like this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*dBtToMYH9F1wyFZ7H1TLTQ.png" /></figure><p>Name it like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/866/1*ksEbNAVhNdlxbkdwTtO_-A.png" /></figure><p>Keep default settings.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/822/1*E9w1PXJ-eK9LL0-TceNSzQ.png" /></figure><p>To work with the database, we need to add a Class Library named “Domain”, which will be responsible for the models.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/656/1*yfSYuz_MCiMz0mqle7i5QA.png" /></figure><p>The next step is to add project references. “MVCPresentation” will depend on “Domain”. In case of having more projects, there should be an “assembly” that does not depend on any other project, otherwise we will have a cycled chain. You can also add code to the MVCPresentation.csproj file.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4de0108c7f2eed3d448c6ee340c26270/href">https://medium.com/media/4de0108c7f2eed3d448c6ee340c26270/href</a></iframe><p>In case of launching the program for the first time, we will see such inquiries.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/514/1*LSuBOoAUaUmmJdpMJNQ6rg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/448/1*lH_QE61ox9hPgjxOAUgEvg.png" /></figure><p>The DbDomain project is responsible for the database. Models should be added to it, based on which the tables will be generated in the database. Create classes called Human and Car, which will contain properties. The line “public virtual ICollection&lt;Human&gt;? Humans { get; set; }” in Car class will create a foreign key in Human referring to Car. Then add a class called DataContext, which essentially matches the database property and contains the DbSet &lt;T&gt; type model classes as a property. It is inherited from the DbContext base class. To work with the database, the Entity Framework will be used, which is an <a href="https://en.wikipedia.org/wiki/Object%E2%80%93relational_mapping">object-relational mapper</a> that provides connection between databases and code written in programming language. DbDomain needs to contain Microsoft.EntityFrameworkCore.UseSqlServer and Microsoft.EntityFrameworkCore nuget packages.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*Ux3KGY5FfVfvlCUW7n8ndQ.png" /></figure><p>DataContext is something like this</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8fa908a2416cc015c5c8492e1df21438/href">https://medium.com/media/8fa908a2416cc015c5c8492e1df21438/href</a></iframe><p>In the Top-level statements of the MVCPresentation Programm class, we need to add DataContext to the services with the following code.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/296676440b17986675abf2566adf055a/href">https://medium.com/media/296676440b17986675abf2566adf055a/href</a></iframe><p>UseSqlServer is the database provider we use. “DefaultConnection” is the Connection String defined in appsettings.json. After establishing a physical connection with database, the Connection String can copid from Properties section of the server. The Connection String looks like this:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c8c43ec79f7be28d8da890d20bdea25d/href">https://medium.com/media/c8c43ec79f7be28d8da890d20bdea25d/href</a></iframe><p>“Data Source” is the name of the server, “Initial Catalog” is the name of the database. For simplicity, remaining settings can be skipped .</p><p>The Microsoft.EntityFrameworkCore.Design package must be added to the MVCPresentation project for migration. In the NuGet Package Manager Console you need to write “Add-Migration InitialCreate -Context DataContext”, which creates a class containing the “InitialCreate” root. In the future, tables will be created based on those classes. It is necessary to pay attention that the migration project is chosen correctly. The migration assembly is the DbDomain project, so you have to choose it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*fpUs8IBYr2AHy-r3wnDKNg.png" /></figure><p>To create a database, we can immediately write the “Update-Database” command. The “Update-Database -Migration 0” command can delete tables, and the “Remove-Migration” command can delete migration files.</p><p>We can use either SQL Server Object Explorer or Server Explorer to physically connect to the server. In the opened window you have to fill in the name of the server or put a dot. The server name is defined during SQL Server Management Studio and SQL Server installation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*Ve6WNByhdVa0U7sbKCq7BQ.png" /></figure><p>In the case of Server Explorer, we can also select the required database. This option makes sense in the case of the Database First approach, when the database is already pre-created.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/509/1*9BoRUV9SStxoOEcFfRpnrA.png" /></figure><p>If you enter the server name correctly, all the databases in the drop-down list will appear.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/583/1*H_vWi-wxI-P3AWVPsKWuoQ.png" /></figure><p>“AutoPark” database has been added to the server and contains 2 tables. In the case of SQL Server Object Explorer, there are other databases as well.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/925/1*KrwOAcL1j1AmG7r5M9BiyA.png" /></figure><p>The MVCPresentation project contains Controllers that process data based on the Model and transmit it to the View. The controller performs Get և Post queries. Get returns the data from the database, Post sends and stores it there. Add the controller like this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*PTjhBjrw7fwG_r6Z5Dl5Uw.png" /></figure><p>To connect to the database, write the following code:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ca7732c3511664006b381b535af6d572/href">https://medium.com/media/ca7732c3511664006b381b535af6d572/href</a></iframe><p>As Business logic and presentation of data must be separate, the models used during these two processes must also be separate. In MVCPresentation we use ViewModels, which are special cases of the model of database. In ViewModel, for example, the Id field may not be used because the user will neither import nor view it.</p><p>The Create method of the Controller must be edited to have LINQ commands.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b6cd1f0485ba30b3f2b4fa64bf248ecc/href">https://medium.com/media/b6cd1f0485ba30b3f2b4fa64bf248ecc/href</a></iframe><p>Using the Lambda expression, we take a value from an object of type HumanViewModel and assign it to the model fields, which are passed to the View. Since the contents of the “model” must be displayed in a Foreach loop in the View, that must be of Ienumerable type. All methods must have Views that can be generated automatically. In our case, the Index method is intended to show the final result, its template should be List, and the used model should be the HumanViewModel class. Do the same for the CarController class.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*H9CZo0NOTrcHCQLgeJe_KQ.png" /></figure><p>The generated code will show a table. Some changes can also be made. The final look is this:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/10ab43cbd2f0b6c25945aa7f2cc378b5/href">https://medium.com/media/10ab43cbd2f0b6c25945aa7f2cc378b5/href</a></iframe><p>The model item contains the Humans’ name, surname, address, place of residence and car. It should be noted that in the case of the “Car” it is “item.Car.Model”, not just “item.Car”.</p><p>But first the data has to be entered. To do this, use the Create method, which contains the following code:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4afc5603df6c12e2ba7d78b3d86b9d3e/href">https://medium.com/media/4afc5603df6c12e2ba7d78b3d86b9d3e/href</a></iframe><p>Collection is added to the Humans table of the DataContext database.</p><p>We generate code based on the method.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2e0add5c7f8392db6dc7255d14d3ef2c/href">https://medium.com/media/2e0add5c7f8392db6dc7255d14d3ef2c/href</a></iframe><p>As a result of the work we have the following pages for inputs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*1J067gxX-pWDKk9u9z0rfg.png" /></figure><p>The result can be seen in the browser</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*oMToTTZ7W-PPO9xhXYqNWA.png" /></figure><p>You can also see the availability of data in the database. T — SQL query code:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0d8e9cef08fb65f82d8ef55b783dca1f/href">https://medium.com/media/0d8e9cef08fb65f82d8ef55b783dca1f/href</a></iframe><p>The result is.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/956/1*AJfS9PW5QxNI8Tb9UykdSw.png" /></figure><p>For better performance database queries can be done Asynchronously.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6e6e4295587ea7caed642360a5e34b3d/href">https://medium.com/media/6e6e4295587ea7caed642360a5e34b3d/href</a></iframe><p>The “await” keyword makes query in a separate thread, and to use that keyword the method must have a Task &lt;T&gt; return type and contain the word “async”. The same is done for other methods. As an architectural best practice, such requests are considered to be in separate Service classes to keep the Controllers clean and easy to read.</p><p><strong>Sources used:</strong></p><p>1) Pro C# 9 with .NET 5, Foundational Principles and Practices in Programming, Andrew Troelsen</p><p>2) Complete guide to building an app with .Net Core and React — <a href="https://www.udemy.com/course/complete-guide-to-building-an-app-with-net-core-and-react/">https://www.udemy.com/course/complete-guide-to-building-an-app-with-net-core-and-react/</a></p><p><strong>Contact me</strong> on <a href="https://linkedin.com/in/vchgnmir">LinkedIn</a>, <a href="https://www.instagram.com/vachmir/">Instagram</a>, <a href="https://www.tiktok.com/@vachmir">TikTok</a> and <a href="https://www.facebook.com/VachMir/">Facebook</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=108451017a87" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Սերվերային և ինտերֆեյսային պրոյեկտների հիմնական կմախքը]]></title>
            <link>https://vachmir.medium.com/%D5%BD%D5%A5%D6%80%D5%BE%D5%A5%D6%80%D5%A1%D5%B5%D5%AB%D5%B6-%D6%87-%D5%AB%D5%B6%D5%BF%D5%A5%D6%80%D6%86%D5%A5%D5%B5%D5%BD%D5%A1%D5%B5%D5%AB%D5%B6-%D5%BA%D6%80%D5%B8%D5%B5%D5%A5%D5%AF%D5%BF%D5%B6%D5%A5%D6%80%D5%AB-%D5%B0%D5%AB%D5%B4%D5%B6%D5%A1%D5%AF%D5%A1%D5%B6-%D5%AF%D5%B4%D5%A1%D5%AD%D6%84%D5%A8-6806cf0edfe3?source=rss-b9e92984cbe5------2</link>
            <guid isPermaLink="false">https://medium.com/p/6806cf0edfe3</guid>
            <category><![CDATA[mvc]]></category>
            <category><![CDATA[ծրագրավորում]]></category>
            <category><![CDATA[sql-server]]></category>
            <category><![CDATA[entity-framework]]></category>
            <category><![CDATA[csharp]]></category>
            <dc:creator><![CDATA[Vachagan Mirzoian]]></dc:creator>
            <pubDate>Fri, 31 Dec 2021 16:22:26 GMT</pubDate>
            <atom:updated>2022-01-01T10:43:17.400Z</atom:updated>
            <content:encoded><![CDATA[<p>Ժամանակակից ծրագրային ապահովման ամենակիրառվող ճարտարապետությունը Client–Server մառուցվածքն է։ Սերվերն իր հեթին պատասխանատու է տվյալներ բազաների համար։ Թեև ծրագրավորողը կարող է բավարարվել տեքստային հարցումներով, վերջնական օգտատերերի համար պետք է ստեղծվի հարմար ինտերֆեյս։ Արդյունքում ունենում են սկզբունքորեն իրարից տարբերվող 2 կտոր։ Կախված ծրագրի լրջությունից, կարող են լինել բազում շերտեր՝ բազայի տվյալների պահման, տվյալների ստացման մեխանիզմների, տվյալների վերջնական ներկայանցման և այլնի համար։ Մենք կունենանք 2 պրոյեկտ՝ բազայի և ներկայացման համար։</p><p>Ներկայացման համար պետք է ստեղծել Mode-View-Controller պրոյեկտ։</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*dBtToMYH9F1wyFZ7H1TLTQ.png" /></figure><p>Անուն տալ այսպես՝</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/866/1*ksEbNAVhNdlxbkdwTtO_-A.png" /></figure><p>Ցանկալի է ոչինչ չփոխել։</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/822/1*E9w1PXJ-eK9LL0-TceNSzQ.png" /></figure><p>Բազայի հետ աշխատելու համար պետք է ավելացնել «Domain» անունով Class Library, որը պատասխանատու է լինելու մոդելների համար։</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/656/1*yfSYuz_MCiMz0mqle7i5QA.png" /></figure><p>Հաջորդ քայլով պետք է ավելացնել հղումներ։ «MVCPresentation»–ը կախված է լինելու «Domain»–ից։ Ավելի մեծաքանակ պրոյեկտներ ունենալու դեպքում պետք է լինի մի «assembly», որը ոչ մի ուրիշ պրոյեկտից կախված չէ, հակառակ դեպքում կունենանք փակ շղթա։ Կարելի է նաև MVCPresentation.csproj ֆայլում ավելացնել կոդ։</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4de0108c7f2eed3d448c6ee340c26270/href">https://medium.com/media/4de0108c7f2eed3d448c6ee340c26270/href</a></iframe><p>Ծրագիրն առաջին անգամ աշխատեցնելու դեպքում կտեսնենք նման հարցումներ։</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/514/1*LSuBOoAUaUmmJdpMJNQ6rg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/448/1*lH_QE61ox9hPgjxOAUgEvg.png" /></figure><p>DbDomain պրոյեկտը պատասխանատու է տվյալների բազայի համար։ Դրա մեջ պետք է մոդելներ ավելացնել, որոնց հիման վրա բազայում գեներացվելու են աղյուսակները։ Ստեղծենք Human և Car անունով կլասներ, որոնք իրենց մեջ պարունակելու են property–ներ։ Car կլասի «public virtual ICollection&lt;Human&gt;? Humans { get; set; }» տողով Human աղյուսակում ստեղծվելու է Car–ի վրա հղվող foreign key։ Հետո ավելացնենք DataContext անունով կլաս, որն իր էությամբ համընկնում է հենց բազայի հետ և որպես property պարունակում DbSet&lt;T&gt; տիպի մոդել–կլասները։ Այն ժառանգվում է DbContext հիմնային կլասից։ Տվյալների բազայի հետ աշխատելու համար օգտագործելու ենք Entity Framework, որը ծրագրավորման լեզվով գրված կոդի և բազաների միջև կապ ապահովող ինտերֆեյս է, այլ կերպ՝ <a href="https://en.wikipedia.org/wiki/Object%E2%80%93relational_mapping">object–relational mapper</a>։ DbDomain — ին պետք է nuget package–ներից ավելացնել Microsoft.EntityFrameworkCore.UseSqlServer և Microsoft.EntityFrameworkCore փաթեթները։</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*Ux3KGY5FfVfvlCUW7n8ndQ.png" /></figure><p>DataContext–ն ունենում է հետևյալ տեսքը՝</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8fa908a2416cc015c5c8492e1df21438/href">https://medium.com/media/8fa908a2416cc015c5c8492e1df21438/href</a></iframe><p>MVCPresentation–ի Programm կլասի Top–level statement–ներում DataContext–ը հետևյալ կոդով պիտի ավելացնենք սերվիսներին։</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/296676440b17986675abf2566adf055a/href">https://medium.com/media/296676440b17986675abf2566adf055a/href</a></iframe><p>UseSqlServer–ը մեր կողմից օգտագործվող տվյալների բազայի պրովայդերն է: DefaultConnection–ը Connection String–ն է, որը սահմանվում է appsettings.json–ում։ Սերվերի Properties հատվածում, նրա հետ ֆիզիկական կապ հաստատելուց հետո, կարելի պատճենել այն։ Connection String–ն ունի հետևյալ տեսքը՝</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c8c43ec79f7be28d8da890d20bdea25d/href">https://medium.com/media/c8c43ec79f7be28d8da890d20bdea25d/href</a></iframe><p>«Data Source»–ը սերվերի անվանումն է, «Initial Catalog»–ը՝ բազայի։ Պարզության համար կարելի է բաց թողնել մնաացած պարամետրերը։</p><p>Միգրացիաների համար MVCPresentation պրոյեկտում պիտի ավելացվի Microsoft.EntityFrameworkCore.Design փաթեթը։ NuGet Package Manager Console–ում պետք է գրել «Add-Migration InitialCreate -Context DataContext», որով ստեղծվում է InitialCreate բառարմատը պարունակող կլաս։ Հետագայում այդ կլասների հիման վրա ստեղծվելու են աղյուսակներ։ Պետք է ուշադրություն դարձնել, որ միգրացիոն պրոյեկտը ճիշտ ընտրված լինի։ Միգրացիոն ասեմբլին DbDomain պրոյեկտն է և պետք է ընտրել այն։</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*fpUs8IBYr2AHy-r3wnDKNg.png" /></figure><p>Բազան ստեղծելու համար միանգամից կարելի է գրել «Update-Database» հրամանը։ «Update-Database -Migration 0» հրամանով կարելի է ջնջել աղյուսակները, իսկ «Remove-Migration» ի – ով՝ միջրացիոն ֆայլերը։</p><p>Սերվերին ֆիզիկապես կապվելու համար կարելի է օգտվել կա՛մ SQL Server Object Explorer–ից, կա՛մ Server Explorer–ից։ Բացված պատուհանում պետք է լրացնել սերվերի անունը կամ դնել միջակետ։ Սերվերի անվանումը սահմանվում է SQL Server Management Studio–ի և SQL Server–ի տեղադռման ժամանակ։</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/805/1*29IeHTToW2BT8L2SpKjZTA.png" /></figure><p>Server Explorer — ի դեպքում կարող ենք ընտրել նաև անհրաժեշտ բազան։ Այս տարբերակն իմաստ ունի Database First մոտեցման դեպքում, երբ բազան արդեն նախապես ստեղծված է լինում։</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/509/1*9BoRUV9SStxoOEcFfRpnrA.png" /></figure><p>Սերվերի անունը ճիշտ լրացնելու դեպքում թափվող ցուցակում երևալու են բոլոր բազաները։</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/583/1*H_vWi-wxI-P3AWVPsKWuoQ.png" /></figure><p>Ինչպես երևում է սրեվերում ավելացել է «AutoPark» բազան, որում կա 2 աղյուսակ։ SQL Server Object Explorer–ի դեպքում երևում են այլ բազաներ ևս։</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/592/1*WqhDq8hQhPmdR79gd5W3gg.png" /></figure><p>MVCPresentation պրոյետկտը պարունակում է Controller–ներ, որոնք Model–ի հիման վրա մշակում են ինֆորմացիան և փոխանցում View–ին։ Controller–ն անում է Get և Post հարցումներ։ Get–ը բազայից վերադարձնում է տվյալները, Post–ը՝ ուղարկում և պահում այնտեղ։ Controller–ն ավելացնում ենք այսպես։</p><p>Բազայի հաետ կապվելու համար գրել հետևյալ կոդը։</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ca7732c3511664006b381b535af6d572/href">https://medium.com/media/ca7732c3511664006b381b535af6d572/href</a></iframe><p>Բիզնես տրամաբանությունը և ինֆորմացիայի ներկայացումը պիտի լինեն առանձին, հետևաբար այդ 2 գործընթացների ժամանակ օգտագործվող մոդելները նույնպես պիտի առանձին լինեն։ MVCPresentation–ում պիտի ունենանք և օգտագործենք ViewModel, որը բազայի մոդելի մասնավոր դեպք է։ ViewModel–ում, օրինակ՝ կարող է չկիրառվել Id դաշտ, որովհետև օգտատերն այն ո՛չ ներմուծելու է, ո՛չ էլ՝ տեսնելու։</p><p>Controller–ի Create մեթոդը պետք է խմբագրել և ավելացնել LINQ հրահանգներ։</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b6cd1f0485ba30b3f2b4fa64bf248ecc/href">https://medium.com/media/b6cd1f0485ba30b3f2b4fa64bf248ecc/href</a></iframe><p>Lambda expression–ով HumanViewModel տիպի օբյետկից վերցնում ենք արժեք և վերագրում model–ի դաշտերին, որն էլ փոխանցվում է View–ին։ Քանի որ View–ի մեջ պետք է ցիկլի միջոցով ցույց տալ «model»–ի պարունակությունը, այն պեք է լինի Ienumerable տիպի։ Բոլոր մեթոնդերը պիտի ունենան View–ներ, որոնք կարող են ավտոմատ գենարացվել։ Մեր դեպքում Index մեթոդը նախատեսված է վերջնարդյունքը ցույց տալու համար, նրա կաղապարը պիտի լինի List, իսկ օգտագործվող մոդելը՝ HumanViewModel կլասը։ Նույն գործողությունները պետք է անել CarController կլասի համար։</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*H9CZo0NOTrcHCQLgeJe_KQ.png" /></figure><p>Գենարացված կոդը ցույս է տալու աղյուսակ։ Կարող են արվել նաև որոշ փոփոխություններ։ Վերջնական տեսքը սա է՝</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/10ab43cbd2f0b6c25945aa7f2cc378b5/href">https://medium.com/media/10ab43cbd2f0b6c25945aa7f2cc378b5/href</a></iframe><p>Model–ի item–ում պարունակվում են մարդու անունը, ազգանունը հասցեն, բնակավայրը և մեքենան։ Պետք է ուշադրություն դարձնել, որ մեքենայի դեպքում գրված է «item.Car.Model», ոչ թե ուղղակի «item.Car»։</p><p>Բայց նախ պետք է տվյալները ներմուծել։ Դրա համար օգտվում ենք Create մեթոդից, որը պարունակում է հետևյալ կոդը՝</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4afc5603df6c12e2ba7d78b3d86b9d3e/href">https://medium.com/media/4afc5603df6c12e2ba7d78b3d86b9d3e/href</a></iframe><p>DataContext — ի կամ որ նույնն է բազայի բազայի Humans աղյուսակում ավելացվում է հավաքածու, որը պարունակում է ներմուծված դաշտերի ինֆորմացիան։</p><p>Մեթոդի հիման վրա գեներացնում ենք կոդ։</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2e0add5c7f8392db6dc7255d14d3ef2c/href">https://medium.com/media/2e0add5c7f8392db6dc7255d14d3ef2c/href</a></iframe><p>Աշխատանքի արդյունքում ունենում ենք ներմուման հետյալ էջերը։</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*1J067gxX-pWDKk9u9z0rfg.png" /></figure><p>Կարելի է արդյունքը տեսնել և՛ բրաուզերում</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*oMToTTZ7W-PPO9xhXYqNWA.png" /></figure><p>Անմիջապես բազայում նույնպես կարելի է տեսնել տվյալների առկայությունը։ T–SQL հարցման կոդը՝</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6067315771b9bad13c95ccb30ac0af65/href">https://medium.com/media/6067315771b9bad13c95ccb30ac0af65/href</a></iframe><p>և դրա արդյունքը։</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/956/1*AJfS9PW5QxNI8Tb9UykdSw.png" /></figure><p>Բազայի հետ կապված աշխատանքի արագագործությունը մեծացնելու համար պետք է օգտվել ասինխրոնությունից։</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6e6e4295587ea7caed642360a5e34b3d/href">https://medium.com/media/6e6e4295587ea7caed642360a5e34b3d/href</a></iframe><p>«await» բառի շնորհիվ ամբողջ հարցումը կատարվում է առանձին թրեդում, իսկ այդ բառն օգտագործելու համար մեթոդը պիտի ունենա Task&lt;T&gt; վերադարձի տիպ և պարունակի «async» բառը։ Նույնն արվում է մյուս մեթոդների համար։</p><p>Ճարտարապաետության տեսանկյունից ավելի գրագետ մոտեցում է համարվում նման հարցումը Controller — ի փոխարեն, այլ, հատուկ այդ նպատակի համար նախատեսված Service–ներում անելը։</p><p><strong>Օգտագործված սկզբնաղբյուրներ՝</strong></p><p>1) Pro C# 9 with .NET 5, Foundational Principles and Practices in Programming, Andrew Troelsen</p><p>2) Complete guide to building an app with .Net Core and React — <a href="https://www.udemy.com/course/complete-guide-to-building-an-app-with-net-core-and-react/">https://www.udemy.com/course/complete-guide-to-building-an-app-with-net-core-and-react/</a></p><p>Հարցերի դեպքում գտեք ինձ <a href="https://linkedin.com/in/vchgnmir">LinkedIn</a>–ում, <a href="https://www.instagram.com/vachmir/">Instagram</a>–ում, <a href="https://www.tiktok.com/@vachmir">TikTok</a>–ում և <a href="https://www.facebook.com/VachMir/">Facebook</a>–ում։</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6806cf0edfe3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Pandora’s Box for Sciences]]></title>
            <link>https://vachmir.medium.com/pandoras-box-for-sciences-5f7424671c7?source=rss-b9e92984cbe5------2</link>
            <guid isPermaLink="false">https://medium.com/p/5f7424671c7</guid>
            <category><![CDATA[free-resources]]></category>
            <category><![CDATA[sports]]></category>
            <category><![CDATA[science]]></category>
            <category><![CDATA[language]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Vachagan Mirzoian]]></dc:creator>
            <pubDate>Wed, 29 Dec 2021 15:02:42 GMT</pubDate>
            <atom:updated>2021-12-29T15:02:42.111Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Programming Resources</strong>: <a href="https://terabox.com/s/1TSRVLat1u5j6Sga45YzKqw">https://terabox.com/s/1TSRVLat1u5j6Sga45YzKqw</a></p><p><strong>Languages</strong>: <a href="https://terabox.com/s/13I1KSFjN79wXWdQ3x7qqzQ">https://terabox.com/s/13I1KSFjN79wXWdQ3x7qqzQ</a></p><p><strong>Sciences</strong>: <a href="https://terabox.com/s/1miewQuRznE9g3DPjR4I8BQ">https://terabox.com/s/1miewQuRznE9g3DPjR4I8BQ</a></p><p><strong>Software</strong>: <a href="https://terabox.com/s/17LkTg3gXyOm6UJEGfEMh1g">https://terabox.com/s/17LkTg3gXyOm6UJEGfEMh1g</a></p><p><strong>Programming Resources</strong></p><p>AI Link: <a href="https://terabox.com/s/1tA9oCD4h5qOn4fN2lo1BWw">https://terabox.com/s/1tA9oCD4h5qOn4fN2lo1BWw</a></p><p>Assembly Link: <a href="https://terabox.com/s/1zwIIwhbWWlbYbahXdQoWQA">https://terabox.com/s/1zwIIwhbWWlbYbahXdQoWQA</a></p><p>Books and files for Unity Link: <a href="https://terabox.com/s/1DhfSEgadLOcCW8NJUscvog">https://terabox.com/s/1DhfSEgadLOcCW8NJUscvog</a></p><p>C# Link: <a href="https://terabox.com/s/1WY02HmJjq1FPMww1eixDGg">https://terabox.com/s/1WY02HmJjq1FPMww1eixDGg</a></p><p>C++ Link: <a href="https://terabox.com/s/1EnFXclPmPvw3jxavbA8GPQ">https://terabox.com/s/1EnFXclPmPvw3jxavbA8GPQ</a></p><p>GitHub and Git Link: <a href="https://terabox.com/s/1qiNQQRvhNtlEFy3bYZeUXQ">https://terabox.com/s/1qiNQQRvhNtlEFy3bYZeUXQ</a></p><p>Hacking and Security Link: <a href="https://terabox.com/s/1vK5wpK6eVBhFS5lnF8dPGw">https://terabox.com/s/1vK5wpK6eVBhFS5lnF8dPGw</a></p><p>HTML, CSS Link: <a href="https://terabox.com/s/1aDEPSsMFbbJ9wc3j91k1Ew">https://terabox.com/s/1aDEPSsMFbbJ9wc3j91k1Ew</a></p><p>ITVDN Link: <a href="https://terabox.com/s/1ZFUzHlgDDBkIvz7M062pmw">https://terabox.com/s/1ZFUzHlgDDBkIvz7M062pmw</a></p><p>Java Link: <a href="https://terabox.com/s/15TP16md2ZxDxYhu3MIdEPw">https://terabox.com/s/15TP16md2ZxDxYhu3MIdEPw</a></p><p>JavaScript Link: <a href="https://terabox.com/s/1tBffzKOtAEfp5lf1SsoNxA">https://terabox.com/s/1tBffzKOtAEfp5lf1SsoNxA</a></p><p>PHP Link: <a href="https://terabox.com/s/1Z6wlXiCNMZFTZ4VXOY5dOg">https://terabox.com/s/1Z6wlXiCNMZFTZ4VXOY5dOg</a></p><p>Programming Guides Link: <a href="https://terabox.com/s/1A5XwmLJEo238G4yo4rbnTgProject">https://terabox.com/s/1A5XwmLJEo238G4yo4rbnTgProject</a></p><p>Project Management Link: <a href="https://terabox.com/s/1GT4bECBunQYIyHeqzjpsEQ">https://terabox.com/s/1GT4bECBunQYIyHeqzjpsEQ</a></p><p>Python Link: <a href="https://terabox.com/s/1G1oHgtXDJClAgCpsr9bsPA">https://terabox.com/s/1G1oHgtXDJClAgCpsr9bsPA</a></p><p>SQL and Databases Link: <a href="https://terabox.com/s/1Kbtn4n56c515d5Y1uiMtcQ">https://terabox.com/s/1Kbtn4n56c515d5Y1uiMtcQ</a></p><p>Testing Link: <a href="https://terabox.com/s/1A-LSadPVmC4chesYQdF9FA">https://terabox.com/s/1A-LSadPVmC4chesYQdF9FA</a></p><p><strong>Languages</strong></p><p>Arabic Link: <a href="https://terabox.com/s/18EN4X8qL4SA0VevGwnELXA">https://terabox.com/s/18EN4X8qL4SA0VevGwnELXA</a></p><p>Armenian Link: <a href="https://terabox.com/s/1tuMoAct_S3Jq5McUxh1VXA">https://terabox.com/s/1tuMoAct_S3Jq5McUxh1VXA</a></p><p>Azerbaijani Link: <a href="https://terabox.com/s/1AQRkysOggUtA09ODmzl0Gg">https://terabox.com/s/1AQRkysOggUtA09ODmzl0Gg</a></p><p>Chinese Link: <a href="https://terabox.com/s/10flCXyUkvgVxd1HCys0OdA">https://terabox.com/s/10flCXyUkvgVxd1HCys0OdA</a></p><p>Czech Link: <a href="https://terabox.com/s/1ByZT9tgobAZ8rrPatJWs3Q">https://terabox.com/s/1ByZT9tgobAZ8rrPatJWs3Q</a></p><p>Dictionaries Link: <a href="https://terabox.com/s/1CSgyNlWnaC6Amx4FjI1upQ">https://terabox.com/s/1CSgyNlWnaC6Amx4FjI1upQ</a></p><p>English Link: <a href="https://terabox.com/s/1eM6eqyjYU6BhMnSmeBiBUQ">https://terabox.com/s/1eM6eqyjYU6BhMnSmeBiBUQ</a></p><p>German Link: <a href="https://terabox.com/s/1iPx1Jyw9LxkWGxWWJnLs6g">https://terabox.com/s/1iPx1Jyw9LxkWGxWWJnLs6g</a></p><p>Korean Link: <a href="https://terabox.com/s/16Hh6b9M4ZXCeulCJMGdOww">https://terabox.com/s/16Hh6b9M4ZXCeulCJMGdOww</a></p><p>Mongolian Link: <a href="https://terabox.com/s/1MXWft6II0u5PBNRbBXMM9Q">https://terabox.com/s/1MXWft6II0u5PBNRbBXMM9Q</a></p><p>Portuguese Link: <a href="https://terabox.com/s/1RNaxtMDw78nUAXni2Nb0vw">https://terabox.com/s/1RNaxtMDw78nUAXni2Nb0vw</a></p><p>Russian Link: <a href="https://terabox.com/s/1Y0ExcHIMJcgVQnSwgtj5XQ">https://terabox.com/s/1Y0ExcHIMJcgVQnSwgtj5XQ</a></p><p>Spanish Link: <a href="https://terabox.com/s/1AxZb2GtSO8dSUm84zx5ncg">https://terabox.com/s/1AxZb2GtSO8dSUm84zx5ncg</a></p><p>Turkish Link: <a href="https://terabox.com/s/1lZVdVcWBjU2dK7DoimZm8w">https://terabox.com/s/1lZVdVcWBjU2dK7DoimZm8w</a></p><p><strong>Sciences</strong></p><p>Anthropology Link: <a href="https://terabox.com/s/1HEj32FW4v1plJR8zsYCiKQ">https://terabox.com/s/1HEj32FW4v1plJR8zsYCiKQ</a></p><p>Astronomy Link: <a href="https://terabox.com/s/14Q8sQ6Gq51aCStU99FZX3A">https://terabox.com/s/14Q8sQ6Gq51aCStU99FZX3A</a></p><p>Computational Linguistics Link: <a href="https://terabox.com/s/1kkMDPcSoqFQSXZRYO6zsPg">https://terabox.com/s/1kkMDPcSoqFQSXZRYO6zsPg</a></p><p>Economics Link: <a href="https://terabox.com/s/19CJ1C4goxt6rnw5lXUjF2g">https://terabox.com/s/19CJ1C4goxt6rnw5lXUjF2g</a></p><p>Electronics Link: <a href="https://terabox.com/s/1L2nTfWNEhVh8mHNNDBoQng">https://terabox.com/s/1L2nTfWNEhVh8mHNNDBoQng</a></p><p>History Link: <a href="https://terabox.com/s/10yxMNQwgCxdfLvTRwrLp8w">https://terabox.com/s/10yxMNQwgCxdfLvTRwrLp8w</a></p><p>Linguistics Link: <a href="https://terabox.com/s/1SW7aUB6vURPSlSGI1I0c0g">https://terabox.com/s/1SW7aUB6vURPSlSGI1I0c0g</a></p><p>Mathematics Link: <a href="https://terabox.com/s/1g1fbjqjWyGWriQlEGYN5sw">https://terabox.com/s/1g1fbjqjWyGWriQlEGYN5sw</a></p><p>Political Science Link: <a href="https://terabox.com/s/19oZOGfOhsEfXJ2BPHSyN4w">https://terabox.com/s/19oZOGfOhsEfXJ2BPHSyN4w</a></p><p>Psychology Link: <a href="https://terabox.com/s/1bJflTUJi231WpFfQlRcUlg">https://terabox.com/s/1bJflTUJi231WpFfQlRcUlg</a></p><p>Sociology Link: <a href="https://terabox.com/s/1p6mAfMhCIG1tHV6v9xEiEA">https://terabox.com/s/1p6mAfMhCIG1tHV6v9xEiEA</a></p><p>Sport and Health Link: <a href="https://terabox.com/s/1aXFKcBXSqel1cs6T2jbzRw">https://terabox.com/s/1aXFKcBXSqel1cs6T2jbzRw</a></p><p><strong>Films and Clips</strong></p><p>The Matrix, All series</p><p>Interstellar</p><p>The Martian</p><p>Prince of Persia</p><p>Shadowless Sword and etc.</p><p>Link: <a href="https://terabox.com/s/1iaWgZUytClnfv8F75jjJYg">https://terabox.com/s/1iaWgZUytClnfv8F75jjJYg</a></p><p>Find me on <a href="https://linkedin.com/in/vchgnmir">LinkedIn</a>, <a href="https://www.instagram.com/vachmir/">Instagram</a>, <a href="https://www.tiktok.com/@vachmir">Tiktok</a> and <a href="https://www.facebook.com/VachMir/">Facebook</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5f7424671c7" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>