International relation
Classified in Computers
Written at on English with a size of 8.88 KB.
Database - organized collection of data, grouped into tables
Relational Database - tables are connected using relations and constraints. (Chief components: Entities and Relationships)
Relational data model - describing entities and their relationships
Selection -> filtering rows (tuples or records)
Projection -> filtering columns (attributes)
SQL is a standard language for querying and manipulating data
The number of tuples is the cardinality of the relation
The number of attributes is the arity of the relation
SQL Query :SELECT <attributes> FROM <one or more relations> WHERE <conditions>
DISTINCT: Eliminating Duplicates - SELECT DISTINCT Category
Several equivalent ways to write a basic join in SQL:
SELECT PName, Price FROM Product, Company WHERE Manufacturer = CName AND Country=‘Japan’ AND Price <= 200 | SELECT PName, Price FROM Product JOIN Company ON Manufacturer = Cname AND Country=‘Japan’ WHERE Price <= 200 |