• MySQL connection query


    11.5 connection query (column connection) Question: there are ten pieces of data in the student table and ten pieces of data in the grade table. How many pieces of data are there after connection (Cartesian product): 10 * 10 = 100   Continuous query will produce Cartesian product; Suppose set a = {a, B}, set […]

  • 3D mathematics — coordinates and vectors


    Cartesian coordinate system definitionTwo number axes intersecting at the origin form a plane affine coordinate system. If the units of measurement on the two number axes are equal, the affine coordinate system is called Cartesian coordinate system. The Cartesian coordinate system in which two number axes are perpendicular to each other is called Cartesian rectangular […]

  • MySQL joint table quick query


    Suppose there are the following two tables: A: id age 1 11 2 12 3 13 4 14 B: id name 2 aaa 3 bbb 4 ccc 5 ddd Inner join There is only one application scenario, inner join or join, which is equivalent to inner join select a.*,b.* from a inner join(join) b on a.id […]

  • Table connection method


    There are four ways to join Oracle tables Sort merge join Nested loops join Hash join Cartesian product Sort merge join Sort merge join is to sort two connected tables with join columns, merge the sorted result set, and then get matching records. If there is an index on the join column to avoid sorting, […]

  • JavaScript graphic example: Archimedes spiral


    1. Archimedes spiral Archimedes spiral is also known as “constant velocity spiral”. When a point P moves along the moving ray OP at the same speed, the ray rotates around the point o at the same angular speed. The trajectory of point P is called “Archimedean spiral”. The Cartesian coordinate equation of Archimedes spiral is […]

  • Algorithm related problems


    1. Permutation problem You need to use Python’s itertools module import itertools a=[1,2,3] #Take, arrange (mathematical formula: A32) for i in itertools.permutations (a, 2): # 2 is taken twice. A can be a string or a list print(i) ”’ (1, 2) (1, 3) (2, 1) (2, 3) (3, 1) (3, 2) ”’ #Combination (mathematical formula: […]

  • Micro course lesson 7 table of different splitting rules


    https://v.youku.com/v_show/id… In the last issue, we introduced the complex query function. In this issue, we will continue to explain the tables with different splitting rules. Now I have four nodes, four nodes are divided by modulus, TB_ There are five pieces of data on mod. There is a bracket for 67, which means that if […]

  • Notes on database system and principle


    Three level model structure Mode, external mode (sub mode), internal mode Two level mapping External schema / schema mapping → guarantee logical independence of data Internal mode / mode influence → guarantee the physical independence of data Introduction to relational database E.f.codd of IBM is the most systematic and strict method to put forward relational […]

  • Micro course lesson 16 advanced function explain


    https://v.youku.com/v_show/id… Hello, everyone. In the past, we introduced the use of explain. In this issue, we will introduce the explain function in detail. Explain can be used to analyze the distributed query plan and see the results of the distributed SQL. In addition to this function, we can also do some SQL tuning. Let’s take […]

  • Common tools for analysts SQL (common syntax and common window functions)


    1 – execution sequencefrom-on-join-where-group by-having-select-distinct-order by-limit From (the Cartesian product is calculated for the tables on the left and right sides of from to get the virtual table V1)On (filter V1 table to get V2)Join (carry out left join, right join and other processing on V2 table to get V3)Where (where filter V3 to get […]

  • Multiple tables associated query of MySQL


    1. internal connection Rule: return common records of two tables Syntax: — grammar 1 Select * from table 1 inner table 2 on table 1. Public field = Table 2. Public field — grammar two Select * from table 1, table 2 where table 1. Public field = Table 2. Public field       […]

  • Oracle Database Seventh Multi-table Query


    7. Multi-table query For queries, we have learned simple queries, limited queries and query ranking before, which belong to the standard statements of SQL. The main function of the single-line function in the previous chapter is to make up for the deficiencies of queries. From the beginning of multi-table query, it has formally entered the […]