2. Relational database design
• Relational database design (RDD) models information
and data into a set of tables with rows and columns.
Each row of a relation/table represents a record, and
each column represents an attribute of data.
• The Structured Query Language (SQL) is used to
manipulate relational databases. The design of a
relational database is composed of four stages
• Define relations/attributes
• Define primary keys
• Define relationships
• Normalization
3. Introduction to Relational Mappings
• A relational mapping transforms any object data
member type to a corresponding relational
database (SQL) data source representation in any
supported relational database. Relational
mappings let you map an object model into a
relational data model.
• Relational mappings transform object data
members to relational database fields. Use them
to map simple data types including primitives
(such as int), JDK classes (such as String), and
large object (LOB) values.
4. Mapping Process
• Create table for a relationship.
• Add the primary keys of all participating
Entities as fields of table with their respective
data types.
• If relationship has any attribute, add each
attribute as field of table.
• Declare a primary key composing all the
primary keys of participating entities.
• Declare all foreign key constraints.