The document discusses key concepts in relational database modeling including:
1) Entities, attributes, and entity sets which are the basic building blocks of data modeling.
2) Tables which organize entities and attributes into rows and columns for storage and querying. Primary keys uniquely identify each row.
3) Functional dependencies define relationships between attributes where one attribute determines the values of other attributes.
4) Foreign keys link tables by matching primary keys and allow controlled redundancy between tables.
Injustice - Developers Among Us (SciFiDevCon 2024)
Relational Database Keys
1. Karina Joyce E. Limbo
Jedan Tipura
BLIS-III
RELATIONAL DATABASE MODEL:
LOGICAL VIEW OF DATA
AND
KEYS
2. Logical View of Data
Logical simplicity yields simpler and more
effective database design methodologies.
3. • The model was first proposed by E.F.Codd in
1970.
4. Entity
An entity is simply a person, place, event, or
thing for which we intend to collect data.
Examples:
❖ University -- Students, Faculty
Members, Courses
❖ Airlines -- Pilots, Aircraft, Routes, Supplier
5. Attributes
Each entity has certain characteristics known as
attributes.
Examples:
❖ Student -- Student
Number, Name, GPA, Date of
Enrollment, Data of Birth, Home
Address, Phone Number, Major
❖ Aircraft -- Aircraft Number, Data of Last
Maintenance, Total Hours Flown, Hours
Flown since Last Maintenance
6. Entities and Attributes
A grouping of related entities becomes
an entity set.
Examples:
❖ The STUDENT entity set contains all student
entities.
❖ The FACULTY entity set contains all faculty
entities.
❖ The AIRCRAFT entity set contains all aircraft
entities
7. Tables and Their
Characteristics
A table is perceived as a two-dimensional
structure composed of rows and columns.
Each table row (tuple) represents a single
entity within the entity set.
Each column represents an attribute and
each column has a distinct name.
Each row/column intersection represents a
single data value
8. All values in a column must conform to the
same data format.
Each column has a specific range of values
known as the attribute domain.
The order of the rows and columns is
immaterial to the DBMS
Each table must have an attribute or a
combination of attributes that uniquely
identifies each row.
9. Table Name: STUDENT
E STU_FNAME STU_INIT STU_DOB STU_HRS STU_CLASS STU_GPA STU_TRAN DEPT
SFER CODE
William C 12-Feb- 42 So 2.84 No BIOL
1975
n Anne K 15-Nov- 81 Jr 3.27 Yes CIS
1981
Juliette F 23-Aug- 36 So 2.26 Yes ACCT
1969
11. Keys
It is an attribute that determines the values of
other attributes within the entity.
12. The key’s role is based on a concept known as
determination.
The shorthand notation for “A determines B”
is A B. If A determines B, C and D, you
write A B, C, D.
14. Functional Dependence
Can be generalized to cover the case in which
the determining attribute values occur more
than once in a table.
15. Attribute A determines Attribute B (that is, B
is functionally dependent on A) if all of the
rows in the table that agree in value for
attribute A also agree in value for attribute B.
17. STU_HRS STU_CLASS
But specific number of hours is not
dependent on the classification. In other
words, the classification (STU_CLASS) does
not determine one and only one value for
completed hours (STU_HRS).
18. Key Attribute
Any attribute that is part of a key.
Examples:
STU_LNAME,STU_FNAME,STU_INIT,
STU_PHONE STU_HRS,STU_CLASS
23. Controlled Redundancy
-makes the relational database work.
-tables within the database share common
attributes that enable the tables to be linked
together.
27. Secondary Key
- An attribute used strictly for data retrieval
purposes.
28. Example:
A customer date are stored in a
CUSTOMER table. The customer number is
the primary key; the secondary key is the
combination of the customer’s last name and
phone number.
29. Foreign Key
- An attribute in one table whose values
must either match the primary key in another
table or be null.