Académique Documents
Professionnel Documents
Culture Documents
Suliman Mohamed
Lecture Content
oFirst Section : introduction Database Modeling
oSecond Section : Database Modeling Tools
(Sqldeveloper DataModelre)
oThird Section : Assignments
Data Model Definition
precise description of the data content in a system ,
using easy to understand graphic symbol
Data Model describe
data
data relationships
data semantics
data constraints
Data Model Types
3. Specify relationships
Data Entities
Entity
A "thing" about which you want to store data in an
application
Multiple examples (instances) of the entity must exist
Goal:
Store data about each entity in a separate table
Do not store duplicate data in multiple tables or records
Examples: CUSTOMER, PRODUCT
Data Model Naming Conventions
Entity names are short, descriptive, compound
word singular nouns
UWEC_STUDENT, CANDY_PRODUCT,
Entity names will ultimately correspond to
table names
Why singular?
Makes more sense when you start talking
about relationships
Data Entity Instances
Entity instance
A specific occurrence (data value) of an entity
An entity must have multiple entity instances
or it is not really an entity!
Examples: Davey Jones, Celestial Cashew
Crunch
ER Model Attributes
Attribute
A characteristic (data field) of an entity that you want to
store in the database
Examples: CUST_ID, PROD_DESC
Attribute value
The value of a particular attribute for a particular entity
instance
Examples: 42, "Nuts Not Nachos"
ER Model Notation
Represent entities as rectangles
List attributes within the rectangle
Entity
Primary key
Specific DBMS Naming Conventions
Oracle, MySQL: words separated by underscores
EMPLOYEE, EMPLOYEE_NAME, candy_product
Why? Oracle forces all object names to upper-case letters, MySQL forces all
names to lower-case on Windows
Student
Student_ID Student_Address_Line_1
Student_Name Student_Address_Line_2
Student_Address Student_City
Student_DOB Student_State
Student_Class Student_Country
Student_Postal_Code
Multi-Valued Attributes
Can have multiple values for the same entity
Student Employee
Student_ID (PK) Employee_ID (PK)
Student_First_Name Employee_First_Name
Student_Last_Name Employee_Last_Name
Student_Address Employee_Address
Student_DOB Employee_DOB
Student_Class Employee_Dependent1
Student_Phone1 Employee_Dependent2
Student_Phone2
Handling Multi-valued Attributes
If it has a definite maximum number, leave as a repeating
attribute
If the upper limit is variable, make a new entity
Rents
Video_ID Video_Title Video_Format
Video 1000 The Princess Bride DVD
Video_ID
Video_Title 1001 Sideways Bluray
Video_Format
1002 Just Visiting DVD
1003 Crash Bluray
Example 1:1 Relationship
Video
Video_ID
Video_Title
Rents
Customer
Customer_ID
Customer_Name
Customer_Address
Example ER Model
Section Two
Oracle SQL Developer Data Modeler
Modeling of Cubes,
Dimensions, Levels and
Hierarchies, Measures and
slices
Start from ROLAP, XMLA or
from scratch
Generate Oracle Analytical
Workspaces
Exporting and Code Generation
DDL file editor supports
Design Rules
Object selection
Drop objects
Table scripts
Standard database DDL
scripts
Oracle
IBM DB2 and UDB
Microsoft SQL Server
Multi-Dimensional Oracle AW,
Cube Views and XMLA
CSV export
Wednesday, September
Section Three
Assignments
Mission
Distribute in ten Groups
Each group have 7 students maximum
Each group will design, build and document a
database of its choice
Each group can chose the database wants to work on
from the provided lists
Database
E- eduation system database
National register Database
Voting system database for Sudan.
Health Management information system for Sudan Database.
E- newspaper Database