| dbpprop:abstract
|
- An inner join is the most common join operation used in applications, and represents the default join-type. Inner join creates a new result table by combining column values of two tables (A and B) based upon the join-predicate. The query compares each row of A with each row of B to find all pairs of rows which satisfy the join-predicate. When the join-predicate is satisfied, column values for each matched pair of rows of A and B are combined into a result row. The result of the join can be defined as the outcome of first taking the Cartesian product (or cross-join) of all records in the tables (combining every record in table A with every record in table B) - then return all records which satisfy the join predicate. Actual SQL implementations normally use other approaches where possible, since computing the Cartesian product is very inefficient. SQL specifies two different syntactical ways to express joins. The first, called "explicit join notation", uses the keyword JOIN, whereas the second uses the "implicit join notation". The implicit join notation lists the tables for joining in the FROM clause of a SELECT statement, using commas to separate them. Thus, it specifies a cross-join, and the WHERE clause may apply additional filter-predicates. Those filter-predicates function comparably to join-predicates in the explicit notation. One can further classify inner joins as equi-joins, as natural joins, or as cross-joins (see below). Programmers should take special care when joining tables on columns that can contain NULL values, since NULL will never match any other value (or even NULL itself), unless the join condition explicitly uses the IS NULL or IS NOT NULL predicates. As an example, the following query joins the Employee and Department tables using the DepartmentID column of both tables. Where the DepartmentID of these tables match (i.e. the join-predicate is satisfied), the query will combine the LastName, DepartmentID and DepartmentName columns from the two tables into a result row. Where the DepartmentID does not match, no result row is generated. Example of an explicit inner join: SELECT FROM employee INNER JOIN department ON employee. DepartmentID = department. DepartmentID is equivalent to: SELECT FROM employee, department WHERE employee. DepartmentID = department. DepartmentID Explicit Inner join result: Notice that the employee "Jasper" and the department "Marketing" do not appear. Neither of these has any matching records in the respective other table: "Jasper" has no associated department and no employee has the department ID 35. Thus, no information on Jasper or on Marketing appears in the joined table. Depending on the desired results, this behavior may be a subtle bug. Outer joins may be used to avoid it.
- JOIN je syntaktická konstrukce jazyka SQL. Slouží ke spojování výsledku dotazu SELECT ze dvou vstupních množin.
- La sentencia JOIN en SQL permite combinar registros de dos o más tablas en una base de datos relacional. En el Lenguaje de Consultas Estructurado, hay tres tipo de JOIN: interno, externo, y cruzado. En casos especiales una tabla puede unirse a sí misma, produciendo una auto-combinación, SELF-JOIN. Matemáticamente, JOIN es composición relacional, la operación fundamental en el álgebra relacional,y generalizando es una función de composición.
- En gestion de base de données relationnelle, une jointure est une combinaison des enregistrements de deux tables disposant de valeurs correspondantes dans une colonne donnée de chaque table (souvent ayant le même nom dans les deux). La table résultante est construite temporairement en fonction des prédicats spécifiés dans la requête. En SQL, une jointure peut être définie en indiquant plusieurs tables derrière une clause FROM, séparées par des virgules (jointure implicite) ou bien en utilisant le mot-clé JOIN (jointure explicite). En algèbre relationnelle, une jointure est une composition de relations, tout comme on peut composer des fonctions (par exemple g f). En effet, les tables définissent des relations entre les différents champs qui les composent.
- Nota l'impiegato "Grassi" e il dipartimento "Promozione" non sono presenti in quanto l'impiegato Grassi ha un Template:Null result mentre Promozione non compare in nessun impiegato. A volte come risultato finale si desidera avere anche i campi che non hanno corrispondenza: in tal caso è possibile usare la query di tipo Outer join.
- JOIN er en SQL-spesifikasjon som benyttes sammen med for å returnere et resultatsett av opptegnelser fra flere tabell (database)tabeller. Den brukes når man sammen med rader fra hovedtabellen skal kombinere rader fra andre.
- Алгоритм соединения (СУБД) Целью алгоритма соединения является реализация в конкретной СУБД операции соединения реляционной алгебры. Исходными данными для алгоритма являются два отношения (таблицы) и описание условия соединения. Результатом операции является отношение (таблица), получаемая как декартово произведение исходных отношений ограниченная условием соединения. Пример: Имеется 2 таблицы: Служащий и Отдел. Задано условие соединения: «Служащий. [ИД отдела]=Отдел. [ИД отдела]» | valign="top" | Результатом операции соединения будет: В практических реализациях соединение обычно не выполняется как ограничение декартова произведения. Имеются более эффективные алгоритмы, гарантирующие получение такого же результата: Алгоритм соединения вложенными циклами. Алгоритм соединения хэшированием. Алгоритм соединения слиянием сортированных списков. Понимание особенностей алгоритмов соединения важно при анализе и оптимизации планов выполнения запросов СУБД Алгоритмы соединения имеют ценность не только в контексте СУБД, но и практически в любых ситуациях, когда необходимо комбинировать данные содержащиеся в нескольких коллекциях\списках.
- Об'єднання (SQL) - операція об'єднання, що в SQL позначається як JOIN об'єднує дві таблиці в реляційній базі даних утворюючи нову тимчасову таблицю, яку інколи називають "об'єднаною таблицею". В SQL існують такі типи об'єднання: внутрішнє - INNER, зовнішнє - OUTER. Зовнішнє об'єднання поділяють на ліве зовнішнє - LEFT OUTER та праве зовнішнє - RIGHT OUTER. В деяких випадках таблиці можна об'єднувати з собою, таке об'єднання зветься самооб'єднанням. З математичної точки зору операція об'єднання є фундаментальною операцією реляційної алгебри.
- 内连接(inner join)是应用程序中用的普遍的"连接"操作, 它一般都是默认的连接类型. 内连接基于连接谓词将两张表(如 A 和 B)的列组合在一起, 产生新的结果表. 查询会将 A 表的每一行和 B 表的每一行进行比较, 并找出满足连接谓词的组合. 当连接谓词被满足, A 和 B 中匹配的行会按列组合(并排组合)成结果集中的一行. 连接产生的结果集, 可以定义为首先对两张表做笛卡尔积(交叉连接) -- 将 A 中的每一行和 B 中的每一行组合, 然后返回满足连接谓词的记录. 实际上 SQL 产品会尽可能用其他方式去实现连接, 笛卡尔积运算是非常没效率的. SQL 定义了两种不同语法方式去表示"连接". 首先是"显示连接符号", 它显示地使用关键字 JOIN, 其次是"隐式连接符号", 它使用所谓的"隐式连接符号". 隐式连接符号把需要连接的表放到 SELECT 语句的 FROM 部分, 并用逗号隔开. 这样就构成了一个"交叉连接", WHERE 语句可能放置一些过滤谓词(过滤条件). 那些过滤谓词在功能上等价于显式连接符号. 内连接"可以进一步被分为: 相等连接, 自然连接, 和交叉连接(见下). 程序要应该特别注意连接依据的列可能包含 NULL 值, NULL 值不与任何值匹配(甚至和它本身) -- 除非连接条件中显式地使用 IS NULL 或 IS NOT NULL 等谓词. 例如, 下面的查询通过 Employee 表和 Department 表共有的属性 DepartmentID 连接两表. 在两表 DepartmentID 匹配之处(如连接谓词被满足), 查询将组合两表的 LastName, DepartmentID 和DepartmentName 等列, 把它们放到结果表的一行(一条记录)里. 当 DepartmentID 不匹配, 就不会往结果表中生成任何数据. 显式的内连接实例: SELECT FROM employee INNER JOIN department ON employee. DepartmentID = department. DepartmentID 等价于: SELECT FROM employee, department WHERE employee. DepartmentID = department. DepartmentID 显式的内连接的输出结果: 注 雇员 "Jasper" 和部门 "Marketing" 都未出现. 它们在预期得到的表中没有任何匹配的记录: "Jasper" 没有关联的部门, 而号码为35的部门中没有任何雇员. 这样, 在"连接"后的表中, 就没有关于 Jasper 或 Marketing 的信息了. 相对于预期的结果, 这个行为可能是一个微妙的臭虫(bug). 外连接可能可以避免这种情况.
|
| rdfs:comment
|
- An inner join is the most common join operation used in applications, and represents the default join-type. Inner join creates a new result table by combining column values of two tables (A and B) based upon the join-predicate. The query compares each row of A with each row of B to find all pairs of rows which satisfy the join-predicate. When the join-predicate is satisfied, column values for each matched pair of rows of A and B are combined into a result row.
- JOIN je syntaktická konstrukce jazyka SQL. Slouží ke spojování výsledku dotazu SELECT ze dvou vstupních množin.
- La sentencia JOIN en SQL permite combinar registros de dos o más tablas en una base de datos relacional. En el Lenguaje de Consultas Estructurado, hay tres tipo de JOIN: interno, externo, y cruzado. En casos especiales una tabla puede unirse a sí misma, produciendo una auto-combinación, SELF-JOIN. Matemáticamente, JOIN es composición relacional, la operación fundamental en el álgebra relacional,y generalizando es una función de composición.
- En gestion de base de données relationnelle, une jointure est une combinaison des enregistrements de deux tables disposant de valeurs correspondantes dans une colonne donnée de chaque table (souvent ayant le même nom dans les deux). La table résultante est construite temporairement en fonction des prédicats spécifiés dans la requête.
- Nota l'impiegato "Grassi" e il dipartimento "Promozione" non sono presenti in quanto l'impiegato Grassi ha un Template:Null result mentre Promozione non compare in nessun impiegato. A volte come risultato finale si desidera avere anche i campi che non hanno corrispondenza: in tal caso è possibile usare la query di tipo Outer join.
- JOIN er en SQL-spesifikasjon som benyttes sammen med for å returnere et resultatsett av opptegnelser fra flere tabell (database)tabeller. Den brukes når man sammen med rader fra hovedtabellen skal kombinere rader fra andre.
- Алгоритм соединения (СУБД) Целью алгоритма соединения является реализация в конкретной СУБД операции соединения реляционной алгебры. Исходными данными для алгоритма являются два отношения (таблицы) и описание условия соединения.
- Об'єднання (SQL) - операція об'єднання, що в SQL позначається як JOIN об'єднує дві таблиці в реляційній базі даних утворюючи нову тимчасову таблицю, яку інколи називають "об'єднаною таблицею". В SQL існують такі типи об'єднання: внутрішнє - INNER, зовнішнє - OUTER.
- 内连接(inner join)是应用程序中用的普遍的"连接"操作, 它一般都是默认的连接类型. 内连接基于连接谓词将两张表(如 A 和 B)的列组合在一起, 产生新的结果表. 查询会将 A 表的每一行和 B 表的每一行进行比较, 并找出满足连接谓词的组合. 当连接谓词被满足, A 和 B 中匹配的行会按列组合(并排组合)成结果集中的一行.
|