Important
Database = set of named relations (or tables)
Una base de datos esta contituido por un conjunto de relaciones (relations) referidos como “tablas” (tables), los cuales tienen un nombre
Por ejemplo la tabla Student (en singular):
Student
+------+-------+--------+--------+
| | | | |
+======+=======+========+========+
| | | | |
+------+-------+--------+--------+
| | | | |
+------+-------+--------+--------+
...
+------+-------+--------+--------+
| | | | |
+------+-------+--------+--------+
Important
Each relation has a set of named attributes (or columns)
Ejemplo en la tabla Student, agregamos los atributos: ID, name, GPA, Photo:
Student
+------+-------+--------+--------+
| ID | name | GPA | Photo |
+======+=======+========+========+
| | | | |
+------+-------+--------+--------+
| | | | |
+------+-------+--------+--------+
...
+------+-------+--------+--------+
| | | | |
+------+-------+--------+--------+
Important
Each tuple (or row) has a value for each attribute.
Por ejemplo en nuestra tabla Students:
Student
+------+-------+--------+--------+
| ID | name | GPA | Photo |
+======+=======+========+========+
| 123 | Amy | 3.9 | (^_^) |
+------+-------+--------+--------+
| 234 | Bob | 3.4 | (T_T) |
+------+-------+--------+--------+
...
+------+-------+--------+--------+
| | | | |
+------+-------+--------+--------+
Important
Each attribute has a type (domain)
Por ejemplo en nuestra table Student:
ID --> integer
name --> string
GPA --> float
photo --> jpeg file