/
😊
Welcome to Scholarly
Clone
Register
😊
Welcome to Scholarly
Untitled Flashcards
Study
ER Diagram Notations
ER diagrams have different notations including the one discussed, Chen's notation, Crow's Feet notation, and 12 Crows Feet Notation.
One-to-One Relationship in ER Diagrams
In the Crows Feet Notation, a one-to-one relationship is obligatory on both sides.
One-to-Many Relationship in ER Diagrams
In the Crows Feet Notation, a one-to-many relationship is obligatory on the many side.
Many-to-Many Relationship in ER Diagrams
The Crows Feet Notation handles many-to-many relationships by indicating if one or both sides of the relationship are obligatory with '1' or '0' respectively.
Drawing ER Diagrams
Using tools like https://app.diagrams.net/ can simplify the process, but drawing diagrams by hand is also acceptable.
Resolving Many-to-Many Relationships
To resolve a many-to-many relationship, decompose it into one-to-many and many-to-one relationships for better representation.
Logical Design Goals
The goals of logical design include minimizing separate tables and avoiding the use of null values to represent irrelevant data.
Derive Skeleton Tables
In logical design, each entity from the ER diagram becomes a table.
Representing Relationships in Tables
One approach is to create a relation for each relationship with two domains containing the identifiers of the entities related.
One-to-One Relationships in Tables
In tables, a one-to-one relationship can be represented by combining the entities into a single table with the related attributes.
Combine into one table
Every car in the pool is assigned to an employee. Each employee is provided with a car. EMPLOYEE NO, NAME, CAR NO, REG, MAKE. 0035, BILL, E123, VWB, FORD. 0103, JIM, D998, NLM, GM. 0124, FRED, E213, WMO, ROVER.
Non-obligatory one-to-one
Every car in the pool is assigned to a specific employee. Most employees are not provided with cars. CAR, REG, MAKE. E123, VWB, FORD. D998, NLM, GM. EMPLOYEE NO, NAME. 0035, BILL. 0124, FRED. 0103, JIM. 0125, TOM. 0106, MIKE.
Combination yields many nulls
Every car in the pool is assigned to a specific employee. Most employees are not provided with cars. EMP, CAR, NO, NAME, REG, MAKE. 0035, BILL, E123, VWB, FORD. 0103, JIM, D998, NLM, GM. 0124, FRED, Null, Null. 0125, TOM, Null, Null. 0106, MIKE, Null, Null.
A better solution
Post the identifier of the non-obligatory entity to the obligatory entity and maintain two tables. CAR, REG, MAKE, NO. E123, VWB, FORD, 0035. D998, NLM, GM, 0103. EMPLOYEE NO, NAME. 0035, BILL. 0124, FRED. 0103, JIM. 0125, TOM. 0106, MIKE.
How to deal with relationships
11, 1N, NM. Obligatory on neither. New table to represent relationship. Post identifiers as a candidate key. Obligatory on one. Post identifier of non-obligatory to obligatory table. New table to represent relationship. Post identifiers as a candidate key. Obligatory on many. Post identifier of one table to many table. New table to represent relationship. Post identifiers as a candidate key. Obligatory on both. Post all attributes into one table. Post identifier of one table to many table. New table to represent relationship. Post identifiers as a candidate key.
Obligatory on one Post identifier of non-obligatory to obligatory table
This represents a 1:N relationship where the Post identifier is obligatory and non-obligatory in the two tables.
New table to represent relationship Post identifiers as candidate key
This represents the creation of a new table to represent the relationship between Post identifiers as the candidate key.
Obligatory on many Post identifier of one table to many table
This represents a N:M relationship where the Post identifier is obligatory on many and one table to many table.
New table to represent relationship Post identifiers as candidate key
This represents the creation of a new table to represent the relationship between Post identifiers as the candidate key.
Obligatory on both Post all attributes into one table
This represents a table with all attributes from both tables where the Post identifier is obligatory on both tables.
How to deal with relationships 11 1N NM Obligatory on neither
This indicates the handling of relationships including 1:N, N:M, and obligatory on neither.
New table to represent relationship Post identifiers as candidate key
This represents the creation of a new table to represent the relationship between Post identifiers as the candidate key.
New table to represent relationship Post identifiers as candidate key
This represents the creation of a new table to represent the relationship between Post identifiers as the candidate key.
Obligatory on one Post identifier of non-obligatory to obligatory table
This represents a 1:N relationship where the Post identifier is obligatory and non-obligatory in the two tables.
New table to represent relationship Post identifiers as candidate key
This represents the creation of a new table to represent the relationship between Post identifiers as the candidate key.
Obligatory on many Post identifier of one table to many table
This represents a N:M relationship where the Post identifier is obligatory on many and one table to many table.
New table to represent relationship Post identifiers as candidate key
This represents the creation of a new table to represent the relationship between Post identifiers as the candidate key.
Obligatory on both Post all attributes into one table
This represents a table with all attributes from both tables where the Post identifier is obligatory on both tables.
How to deal with relationships 11 1N NM Obligatory on neither
This indicates the handling of relationships including 1:N, N:M, and obligatory on neither.
New table to represent relationship Post identifiers as candidate key
This represents the creation of a new table to represent the relationship between Post identifiers as the candidate key.
â—¦
â—¦
â—¦
â—¦
â—¦
â—¦
â—¦
â—¦
Untitled Flashcards
Study
What is the purpose of the RENAME operator in relational algebra?
The RENAME operator in relational algebra is used to rename the attributes of a relation.
What is the relational model based on?
The relational model has a logical foundation in first-order predicate logic.
How can query answering be seen in the relational model?
Query answering can be seen as evaluating a formula of first-order logic.
What does a table in the relational model correspond to in first-order logic?
A table in the relational model corresponds to a binary relation or binary predicate in first-order logic.
What does the predicate 'Employee(x, y)' represent in the relational model?
The predicate 'Employee(x, y)' represents a binary relation that records names and salaries of employees in a table.
In the context of logical queries, what does 'Employee(x, y)' evaluate to if it returns all pairs (a, b) that satisfy the predicate?
In the context of logical queries, 'Employee(x, y)' evaluates to showing all the information in the table.
How is existential quantification related to projection in logical queries in the relational model?
Existential quantification is equivalent to projection. For example, 'What will y: Employee(x, y)' returns all the names of employees.
What is a relation from A to B?
A relation from A to B is a subset of A x B, where A x B represents the Cartesian product or cross product of A and B.
What's a function from A to B?
A function from A to B is a relation from A to B that contains, for each a \u2208 A, a unique pair (a, b).
Explanation: Cartesian Product (binary case)
The Cartesian product, denoted A \u00d7 B for two sets A and B, represents the cross product. For example, if Suits = {Hearts, Diamonds, Clubs, Spades} and Ranks = {A, K, Q, J, 10, 9, 8, 7, 6, 5, 4, 3, 2}, the Cartesian product represents a standard deck of cards.
Example continued: ternary Cartesian product
For example, if we are dealing with 5 decks of cards and consider the set Deck = {1, 2, 3, 4, 5}, the set of all cards is equal to the Cartesian Product Suits x Ranks x Deck. A card is now represented as an element of Suits x Ranks x Deck, e.g., the Ace of spades in deck 3 is represented by the tuple (A, 3).
What is an n-ary relation between sets A1, A2, ..., An?
An n-ary relation between sets A1, A2, ..., An is a subset of A1 x A2 x ... x An.
Consider a table in a database:
AccNo | Firstname | Lastname | Amount 45627123 | John | Smith | 400 46489238 | Barbara | MacDonald | 300 56473920 | Iain | Stewart | 234 This is just a relation between String String String Number.
Tuples
An element a1, a2, ..., an of an n-ary relation is called an n-tuple. A 2-tuple is usually called a pair. If we think of a relation as a table, then a tuple corresponds to a row in the table.
Relations are useful for:
Relations formalize database tables, mathematical foundations of databases, queries, and operations on database tables.
2-tuple
A 2-tuple is usually called a pair. If we think of a relation as a table, then a tuple corresponds to a row in the table.
Relations
Relations are useful as they formalize database tables, the mathematical foundations of databases, queries, and operations on database tables. Operations on relations are well-studied.
Relational Algebra : Set Union
Given relations R and S, define R \\cup S = { t | t \in R or t \in S }. Requirement: R and S must conform to the same schema (same attributes in the same order) and be union-compatible.
Relational Algebra : Set Difference
Given relations R and S, define their set difference as R - S = { t | t \in R and t \notin S }. Requirement: Relations need to be union-compatible.
Cartesian Product (Cross Product)
Given Relations R and S, define their cartesian product as R \times S = { a_1, a_2, ..., a_m, b_1, b_2, ..., b_n | a_1, a_2, ..., a_m \in R and b_1, b_2, ..., b_n \in S }. Convention: If necessary, attributes of R and S are renamed to ensure uniqueness of attributes.
Attribute Renaming in Cartesian Product
Example of attribute renaming: If R has attributes A, B, C and S has attributes C, D, E, the occurrences of attribute C in R and S are renamed into R_C and S_C respectively.
Why are attributes renamed in relational algebra?
Attributes are renamed to ensure the uniqueness of attributes.
What are the three basic operators in relational algebra for combining relations?
The three basic operators are SELECT, PROJECT, and JOIN.
How is the operation R S denoted in relational algebra?
R S is also denoted as R JOIN S.
What is the purpose of the SELECT operator in relational algebra?
The SELECT operator is used for querying relations based on specified conditions.
What is the purpose of the PROJECT operator in relational algebra?
The PROJECT operator is used to select specific attributes from a relation.
What is the purpose of the JOIN operator in relational algebra?
The JOIN operator is used to combine two relations based on a common attribute.
Untitled Flashcards
Study
What is the purpose of the RENAME operator in relational algebra?
The RENAME operator in relational algebra is used to rename the attributes of a relation.
What is the relational model based on?
The relational model has a logical foundation in first-order predicate logic.
How can query answering be seen in the relational model?
Query answering can be seen as evaluating a formula of first-order logic.
What does a table in the relational model correspond to in first-order logic?
A table in the relational model corresponds to a binary relation or binary predicate in first-order logic.
What does the predicate 'Employee(x, y)' represent in the relational model?
The predicate 'Employee(x, y)' represents a binary relation that records names and salaries of employees in a table.
In the context of logical queries, what does 'Employee(x, y)' evaluate to if it returns all pairs (a, b) that satisfy the predicate?
In the context of logical queries, 'Employee(x, y)' evaluates to showing all the information in the table.
How is existential quantification related to projection in logical queries in the relational model?
Existential quantification is equivalent to projection. For example, 'What will y: Employee(x, y)' returns all the names of employees.
What is a relation from A to B?
A relation from A to B is a subset of A x B, where A x B represents the Cartesian product or cross product of A and B.
What's a function from A to B?
A function from A to B is a relation from A to B that contains, for each a \u2208 A, a unique pair (a, b).
Explanation: Cartesian Product (binary case)
The Cartesian product, denoted A \u00d7 B for two sets A and B, represents the cross product. For example, if Suits = {Hearts, Diamonds, Clubs, Spades} and Ranks = {A, K, Q, J, 10, 9, 8, 7, 6, 5, 4, 3, 2}, the Cartesian product represents a standard deck of cards.
Example continued: ternary Cartesian product
For example, if we are dealing with 5 decks of cards and consider the set Deck = {1, 2, 3, 4, 5}, the set of all cards is equal to the Cartesian Product Suits x Ranks x Deck. A card is now represented as an element of Suits x Ranks x Deck, e.g., the Ace of spades in deck 3 is represented by the tuple (A, 3).
What is an n-ary relation between sets A1, A2, ..., An?
An n-ary relation between sets A1, A2, ..., An is a subset of A1 x A2 x ... x An.
Consider a table in a database:
AccNo | Firstname | Lastname | Amount 45627123 | John | Smith | 400 46489238 | Barbara | MacDonald | 300 56473920 | Iain | Stewart | 234 This is just a relation between String String String Number.
Tuples
An element a1, a2, ..., an of an n-ary relation is called an n-tuple. A 2-tuple is usually called a pair. If we think of a relation as a table, then a tuple corresponds to a row in the table.
Relations are useful for:
Relations formalize database tables, mathematical foundations of databases, queries, and operations on database tables.
2-tuple
A 2-tuple is usually called a pair. If we think of a relation as a table, then a tuple corresponds to a row in the table.
Relations
Relations are useful as they formalize database tables, the mathematical foundations of databases, queries, and operations on database tables. Operations on relations are well-studied.
Relational Algebra : Set Union
Given relations R and S, define R \\cup S = { t | t \in R or t \in S }. Requirement: R and S must conform to the same schema (same attributes in the same order) and be union-compatible.
Relational Algebra : Set Difference
Given relations R and S, define their set difference as R - S = { t | t \in R and t \notin S }. Requirement: Relations need to be union-compatible.
Cartesian Product (Cross Product)
Given Relations R and S, define their cartesian product as R \times S = { a_1, a_2, ..., a_m, b_1, b_2, ..., b_n | a_1, a_2, ..., a_m \in R and b_1, b_2, ..., b_n \in S }. Convention: If necessary, attributes of R and S are renamed to ensure uniqueness of attributes.
Attribute Renaming in Cartesian Product
Example of attribute renaming: If R has attributes A, B, C and S has attributes C, D, E, the occurrences of attribute C in R and S are renamed into R_C and S_C respectively.
Why are attributes renamed in relational algebra?
Attributes are renamed to ensure the uniqueness of attributes.
What are the three basic operators in relational algebra for combining relations?
The three basic operators are SELECT, PROJECT, and JOIN.
How is the operation R S denoted in relational algebra?
R S is also denoted as R JOIN S.
What is the purpose of the SELECT operator in relational algebra?
The SELECT operator is used for querying relations based on specified conditions.
What is the purpose of the PROJECT operator in relational algebra?
The PROJECT operator is used to select specific attributes from a relation.
What is the purpose of the JOIN operator in relational algebra?
The JOIN operator is used to combine two relations based on a common attribute.
Untitled Flashcards
Study
What is the purpose of the RENAME operator in relational algebra?
The RENAME operator in relational algebra is used to rename the attributes of a relation.
What is the relational model based on?
The relational model has a logical foundation in first-order predicate logic.
How can query answering be seen in the relational model?
Query answering can be seen as evaluating a formula of first-order logic.
What does a table in the relational model correspond to in first-order logic?
A table in the relational model corresponds to a binary relation or binary predicate in first-order logic.
What does the predicate 'Employee(x, y)' represent in the relational model?
The predicate 'Employee(x, y)' represents a binary relation that records names and salaries of employees in a table.
In the context of logical queries, what does 'Employee(x, y)' evaluate to if it returns all pairs (a, b) that satisfy the predicate?
In the context of logical queries, 'Employee(x, y)' evaluates to showing all the information in the table.
How is existential quantification related to projection in logical queries in the relational model?
Existential quantification is equivalent to projection. For example, 'What will y: Employee(x, y)' returns all the names of employees.
What is a relation from A to B?
A relation from A to B is a subset of A x B, where A x B represents the Cartesian product or cross product of A and B.
What's a function from A to B?
A function from A to B is a relation from A to B that contains, for each a \u2208 A, a unique pair (a, b).
Explanation: Cartesian Product (binary case)
The Cartesian product, denoted A \u00d7 B for two sets A and B, represents the cross product. For example, if Suits = {Hearts, Diamonds, Clubs, Spades} and Ranks = {A, K, Q, J, 10, 9, 8, 7, 6, 5, 4, 3, 2}, the Cartesian product represents a standard deck of cards.
Example continued: ternary Cartesian product
For example, if we are dealing with 5 decks of cards and consider the set Deck = {1, 2, 3, 4, 5}, the set of all cards is equal to the Cartesian Product Suits x Ranks x Deck. A card is now represented as an element of Suits x Ranks x Deck, e.g., the Ace of spades in deck 3 is represented by the tuple (A, 3).
What is an n-ary relation between sets A1, A2, ..., An?
An n-ary relation between sets A1, A2, ..., An is a subset of A1 x A2 x ... x An.
Consider a table in a database:
AccNo | Firstname | Lastname | Amount 45627123 | John | Smith | 400 46489238 | Barbara | MacDonald | 300 56473920 | Iain | Stewart | 234 This is just a relation between String String String Number.
Tuples
An element a1, a2, ..., an of an n-ary relation is called an n-tuple. A 2-tuple is usually called a pair. If we think of a relation as a table, then a tuple corresponds to a row in the table.
Relations are useful for:
Relations formalize database tables, mathematical foundations of databases, queries, and operations on database tables.
2-tuple
A 2-tuple is usually called a pair. If we think of a relation as a table, then a tuple corresponds to a row in the table.
Relations
Relations are useful as they formalize database tables, the mathematical foundations of databases, queries, and operations on database tables. Operations on relations are well-studied.
Relational Algebra : Set Union
Given relations R and S, define R \\cup S = { t | t \in R or t \in S }. Requirement: R and S must conform to the same schema (same attributes in the same order) and be union-compatible.
Relational Algebra : Set Difference
Given relations R and S, define their set difference as R - S = { t | t \in R and t \notin S }. Requirement: Relations need to be union-compatible.
Cartesian Product (Cross Product)
Given Relations R and S, define their cartesian product as R \times S = { a_1, a_2, ..., a_m, b_1, b_2, ..., b_n | a_1, a_2, ..., a_m \in R and b_1, b_2, ..., b_n \in S }. Convention: If necessary, attributes of R and S are renamed to ensure uniqueness of attributes.
Attribute Renaming in Cartesian Product
Example of attribute renaming: If R has attributes A, B, C and S has attributes C, D, E, the occurrences of attribute C in R and S are renamed into R_C and S_C respectively.
Why are attributes renamed in relational algebra?
Attributes are renamed to ensure the uniqueness of attributes.
What are the three basic operators in relational algebra for combining relations?
The three basic operators are SELECT, PROJECT, and JOIN.
How is the operation R S denoted in relational algebra?
R S is also denoted as R JOIN S.
What is the purpose of the SELECT operator in relational algebra?
The SELECT operator is used for querying relations based on specified conditions.
What is the purpose of the PROJECT operator in relational algebra?
The PROJECT operator is used to select specific attributes from a relation.
What is the purpose of the JOIN operator in relational algebra?
The JOIN operator is used to combine two relations based on a common attribute.
Untitled Flashcards
Study
What is the purpose of the RENAME operator in relational algebra?
The RENAME operator in relational algebra is used to rename the attributes of a relation.
What is the relational model based on?
The relational model has a logical foundation in first-order predicate logic.
How can query answering be seen in the relational model?
Query answering can be seen as evaluating a formula of first-order logic.
What does a table in the relational model correspond to in first-order logic?
A table in the relational model corresponds to a binary relation or binary predicate in first-order logic.
What does the predicate 'Employee(x, y)' represent in the relational model?
The predicate 'Employee(x, y)' represents a binary relation that records names and salaries of employees in a table.
In the context of logical queries, what does 'Employee(x, y)' evaluate to if it returns all pairs (a, b) that satisfy the predicate?
In the context of logical queries, 'Employee(x, y)' evaluates to showing all the information in the table.
How is existential quantification related to projection in logical queries in the relational model?
Existential quantification is equivalent to projection. For example, 'What will y: Employee(x, y)' returns all the names of employees.
What is a relation from A to B?
A relation from A to B is a subset of A x B, where A x B represents the Cartesian product or cross product of A and B.
What's a function from A to B?
A function from A to B is a relation from A to B that contains, for each a \u2208 A, a unique pair (a, b).
Explanation: Cartesian Product (binary case)
The Cartesian product, denoted A \u00d7 B for two sets A and B, represents the cross product. For example, if Suits = {Hearts, Diamonds, Clubs, Spades} and Ranks = {A, K, Q, J, 10, 9, 8, 7, 6, 5, 4, 3, 2}, the Cartesian product represents a standard deck of cards.
Example continued: ternary Cartesian product
For example, if we are dealing with 5 decks of cards and consider the set Deck = {1, 2, 3, 4, 5}, the set of all cards is equal to the Cartesian Product Suits x Ranks x Deck. A card is now represented as an element of Suits x Ranks x Deck, e.g., the Ace of spades in deck 3 is represented by the tuple (A, 3).
What is an n-ary relation between sets A1, A2, ..., An?
An n-ary relation between sets A1, A2, ..., An is a subset of A1 x A2 x ... x An.
Consider a table in a database:
AccNo | Firstname | Lastname | Amount 45627123 | John | Smith | 400 46489238 | Barbara | MacDonald | 300 56473920 | Iain | Stewart | 234 This is just a relation between String String String Number.
Tuples
An element a1, a2, ..., an of an n-ary relation is called an n-tuple. A 2-tuple is usually called a pair. If we think of a relation as a table, then a tuple corresponds to a row in the table.
Relations are useful for:
Relations formalize database tables, mathematical foundations of databases, queries, and operations on database tables.
2-tuple
A 2-tuple is usually called a pair. If we think of a relation as a table, then a tuple corresponds to a row in the table.
Relations
Relations are useful as they formalize database tables, the mathematical foundations of databases, queries, and operations on database tables. Operations on relations are well-studied.
Relational Algebra : Set Union
Given relations R and S, define R \\cup S = { t | t \in R or t \in S }. Requirement: R and S must conform to the same schema (same attributes in the same order) and be union-compatible.
Relational Algebra : Set Difference
Given relations R and S, define their set difference as R - S = { t | t \in R and t \notin S }. Requirement: Relations need to be union-compatible.
Cartesian Product (Cross Product)
Given Relations R and S, define their cartesian product as R \times S = { a_1, a_2, ..., a_m, b_1, b_2, ..., b_n | a_1, a_2, ..., a_m \in R and b_1, b_2, ..., b_n \in S }. Convention: If necessary, attributes of R and S are renamed to ensure uniqueness of attributes.
Attribute Renaming in Cartesian Product
Example of attribute renaming: If R has attributes A, B, C and S has attributes C, D, E, the occurrences of attribute C in R and S are renamed into R_C and S_C respectively.
Why are attributes renamed in relational algebra?
Attributes are renamed to ensure the uniqueness of attributes.
What are the three basic operators in relational algebra for combining relations?
The three basic operators are SELECT, PROJECT, and JOIN.
How is the operation R S denoted in relational algebra?
R S is also denoted as R JOIN S.
What is the purpose of the SELECT operator in relational algebra?
The SELECT operator is used for querying relations based on specified conditions.
What is the purpose of the PROJECT operator in relational algebra?
The PROJECT operator is used to select specific attributes from a relation.
What is the purpose of the JOIN operator in relational algebra?
The JOIN operator is used to combine two relations based on a common attribute.
Untitled Flashcards
Study
Integrity Constraints
Rules that restrict data input to ensure the quality and accuracy of the data within a database.
Primary Key Constraints
A primary key must not contain null values and is used to uniquely identify each record in a table.
Why Primary Key Must Not Contain Null Values
If the primary key is null, it means the tuple cannot be identified, which violates the purpose of the primary key as a unique identifier for the record.
Foreign Key Constraints
A foreign key in one table uniquely identifies a tuple in another table, establishing a relationship between the two tables.
1:N Relationship
A relationship where one instance of a table is related to many instances of another table.
1:N Relationship Example
In the context of a film database, each director can be related to multiple films, creating a 1:N relationship between the Director and Film tables.
One-to-Many Relationship
A relationship where one entity (the 'one' side) can be associated with multiple instances of another entity (the 'many' side).
Referential Constraints
Rules that govern the actions taken in response to an attempt to put the database in an illegal state, such as DELETE actions on foreign key references.
Integrity Constraint Violations
How to deal with violations of integrity constraints, such as foreign key rules, which may prevent or cascade actions like DELETE.
Relational Model Relationships
The rule of thumb is to represent a 1:N relationship by adding a reference to the 'one' side into the table representing the 'many' side.
Many-to-Many Relationship Resolution
The resolution of a many-to-many relationship will be discussed in the near future as part of database design principles.
Database Example
A database example with tables like NURSE, WARD, and their attributes/relationships, used to illustrate relational concepts.
Candidate Keys
An attribute or set of attributes that uniquely identifies a tuple or record within a relation or table.
Superkeys
A set of attributes within a table that uniquely identifies a tuple; it may contain more attributes than necessary to uniquely identify a tuple.
Primary Keys
A candidate key chosen as the main method of uniquely identifying a tuple within a table.
Foreign Keys
Attributes in a table that refer to the primary key in another table, establishing a link between the two tables.
Primary Keys
A primary key is a unique identifier for a record in a database table. It must contain unique values and cannot contain NULL values.
Foreign Keys
A foreign key is a field in a relational table that matches the primary key column of another table. It establishes a link between the data in two tables.
Candidate Keys
Candidate keys are the minimal set of attributes that can uniquely identify a tuple in a relation. Each candidate key is a potential candidate for being a primary key.
Superkeys
A superkey is a set of one or more attributes that, taken collectively, can be used to uniquely identify a record in a table.
Cardinality
Cardinality refers to the number of tuples (rows) in a relation (table). It indicates the uniqueness of the values in a column or set of columns.
Tuples
In database management, a tuple is a row in a relational database table. It consists of a set of attributes (columns) that uniquely identify a record.
Relational Algebra
Relational algebra is a procedural query language used to query the database to generate new relations. It includes various operations such as selection, projection, join, union, and intersection.
Data Definition Language (DDL)
DDL is a language used to define and modify the structure of the database. It includes commands for creating, altering, and dropping database objects like tables, indexes, and views.
Data Manipulation Language (DML)
DML is a language used to manipulate the data stored in the database. It includes commands for inserting, updating, deleting, and retrieving data from the database.
SQL (Structured Query Language)
SQL is a domain-specific language used in programming and designed for managing data held in a relational database management system (RDBMS). It includes commands for querying, inserting, updating, and deleting data.
Select-From-Where Statements
A SQL query that selects desired attributes from one or more tables based on a specified condition using the WHERE clause. It is used to retrieve specific data from the database.
Database Management System (DBMS)
A DBMS is software that provides an interface for managing databases and includes tools for defining, creating, querying, updating, and administrating databases. Examples include MySQL, PostgreSQL, and Oracle Database.
Query Optimization
Query optimization is the process of choosing the most efficient means of executing a SQL query. It involves selecting the best execution plan to improve query performance.
Relation
In the context of relational databases, a relation refers to a table that holds data in rows and columns. Each row represents a record, and each column represents an attribute of the data.
Untitled Flashcards
Study
Untitled Flashcards
Study