With a simple example of designing a data model with ‘Employee related information’, most of the data structures can be easily understood. So we will try to design a data model using the sample data given below and will explain the data modeler’s involvement in the database environment.
First Name | Middle Name | Last Name | SSN | Gender | Birth Date | Salary | Dept. No | Dept. Desc |
Melinda | J | Schipper | 765-43-21 | Female | 20-APR-1973 | 5000 | ||
Kevin | A | Schulte | 123-45-67 | Male | 13-OCT-1969 | 5000 | 10 | IT |
Note: If you go through our topics provided under the Data Modelling Section, you will have a brief idea about how to design a data model.
For the sample data provided in the above table, as a Data Modeler you have to design logical data model, physical data model and generate DDL scripts. In order to do the above tasks, you need to create the following:
Entity Name | Table
Name |
Att
Name |
Col
Name |
Data
type |
Null Option | P Key | F Key |
Gender Lookup | GENDER_LKP | Gender Code | GNDR_CD | VARCHAR2(10) | NOT NULL | Yes | No |
Gender Lookup | GENDER_LKP | Gender Description | GNDR_DESC | VARCHAR2(50) | NOT NULL | No | No |
Gender Lookup | GENDER_LKP | DateTime Stamp | DTTM_STMP | DATE | NOT NULL | No | No |
Entity Name | Table
Name |
Att
Name |
Col
Name |
Data
type |
Null Optn | P Key | F Key |
Department Lookup | DEPART
MENT_LKP |
Depart
ment Number |
DPTMT_NUM | NUMBER(2) | NOT NULL | Yes | No |
Department Lookup | DEPART
MENT_LKP |
Depart
ment Description |
DPTMT_DESC | VARCHAR2(50) | NOT NULL | No | No |
Department Lookup | DEPART
MENT_LKP |
DateTime Stamp | DTTM_STMP | DATE | NOT NULL | No | No |
Entity Name | Table
Name |
Att
Name |
Col
Name |
Data
type |
Null Option | P Key | F Key |
Employee Detail | EMPLOYEE
_DTL |
Employee Detail Identifier | EMP_DTL_ID | NUMBER | NOT NULL | Yes | No |
Employee Detail | EMPLOYEE
_DTL |
Department Number | DPTMT_NUM | NUMBER(2) | NULL | No | Yes |
Employee Detail | EMPLOYEE
_DTL |
Gender Code | GNDR_CD | VARCHAR2(10) | NOT NULL | No | Yes |
Employee Detail | EMPLOYEE
_DTL |
First Name | FRST_NM | VARCHAR2(30) | NOT NULL | No | No |
Employee Detail | EMPLOYEE
_DTL |
Last Name | LST_NM | VARCHAR2(30) | NOT NULL | No | No |
Employee Detail | EMPLOYEE
_DTL |
Middle Name | MDLE_NM | VARCHAR2(30) | NULL | No | No |
Employee Detail | EMPLOYEE
_DTL |
SSN | SSN | VARCHAR2(11) | NOT NULL | No | No |
Employee Detail | EMPLOYEE
_DTL |
Birth Date | BRTH_DT | DATE | NOT NULL | No | No |
Employee Detail | EMPLOYEE
_DTL |
Salary Amount | SLRY_AMT | NUMBER(7,2) | NOT NULL | No | No |
Employee Detail | EMPLOYEE
_DTL |
DateTime Stamp | DTTM_STMP | DATE | NOT NULL | No | No |
Learn data modeling design Skills on OLTP and OLAP from a US University Professor with…
These SQL commands are related with Oracle's data dictionary and can be used to get…
important DDL Statements from Oracle like Commit, Rollback, Grant, Revoke etc..
In this section, we will try to explain about important database DROP commands that are…
In this section, we will try to explain about important database DML commands that are…
In this section, we will try to explain about important database ALTER commands that are…