Professional Documents
Culture Documents
Logical DB
Logical DB
Starting Point --> Local Conceptual Models Database design methodology: conceptual, logical and physical database design. Logical database Design:
The process of constructing a model of information used in an enterprise based on a specific data model, but independent of a particular DBMS or other physical considerations.
Step2: Build and validate local logical data model for each user view. Step3: Build and validate global logical data model
Step2: Build and Validate Local Logical Data model for each user view.
Step2.1: Map local conceptual data model to local logical data model. Step2.2: Derive relations from logical data model. Step2.3: Validate model using Normalization. Step2.4: Validate model against user transactions Step2.5: Draw E-R Diagram. Step2.6: Define integrity constraints Step2.7: Review local logical data model with user.
Weak entity types include a foreign key - - - of the owner entity the primary key of a weak entity is partially or fully derived from the owner entity. Next-of-Kin (Staff_No,Name, Address, Tel_No, Relationship) Primary Key: Staff_No, Name Foreign Key: Staff_No, references Staff(Staff_No)
First Normal Form (1NF), removes repeating relationship Second Normal Form (2NF), removes partial dependencies on the
primary key
To ensure that the local logical data model supports the transactions that are required by the user views. ER diagram, data dictionary, primary key/ foreign key links shown in the relations Likely that we have omitted an entity, a relationship or an attribute.
Staff_No
Property_No
Staff
Manages
Property
Required data
Not allowed to hold nulls
e.g.: every member of staff must have an associated position
Entity Integrity
Primary key of entity cannot hold nulls
Referential Integrity
The foreign key contains a value that matches with an existing occurrence in the parent table.
NO CHECK: When a parent occurrence is deleted do nothing to ensure referential integrity exists.
Enterprise Constraints
Called business rules.
Eg: No member of staff can manage more than 10 properties at a time
Relationship between the logical data model and data flow diagram
Each datastore should represent a whole number of entity types Attributes on data flows should belong to entity types
To merge the individual local logical data models into a single global logical data model of the enterprise.
Typical tasks
Review the names of entities and their primary keys Review the names of relationships Merge entities form local views Include (without merging) entities unique to each user view. Merge relationships from the local views Include (without merging) entities unique to each local view. Check for missing entities or relationships Check foreign keys Check integrity constraints Draw the global logical data model Update the documentation
Merging
Staff (Staff_No, Name, Position, Sex, Salary, Branch_No) Primary Key: Staff_No
View1
View2
Global View
Step3.2: Validate Global Logical Data Model Step3.3: Check for future growth Step3.4: Draw final ER diagram Step3.5: Review global logical data model with users.