RDBMS for Real Estate Project Management
RDBMS for Real Estate Project Management
Class of 2023
Real Estate
Development Project
Management
Team member
1. Dawit Kassa
2. Eshetu Gezahegn
3. Helen Desta
4. Dilet Sisay
Contents
1. Introduction ........................................................................................................................................ 2
1.1. Background ................................................................................................................................. 2
1.2. Statement of the problem........................................................................................................... 3
1.3. Scope of the project .................................................................................................................... 4
1.4. Objective of the project .............................................................................................................. 5
1.4.1. General objective ................................................................................................................ 5
1.4.2. Specific objectives ............................................................................................................... 6
1.5. Database Development Methodology ........................................................................................ 7
1.5.1. Data Sources and Collection Methods ................................................................................ 7
1.5.2. Analysis and Design Methods .............................................................................................. 9
1.5.3. Development Tools ........................................................................................................... 11
2. Database Design ............................................................................................................................... 13
2.1. Conceptual database design of the new system ....................................................................... 13
2.1.1. Entities with their description ........................................................................................... 13
2.1.2. Attributes with their description ....................................................................................... 14
2.1.3. Relationships between the entities ................................................................................... 17
2.2. Logical Database Design ............................................................................................................ 22
2.2.1. ER-Relation Mapping ......................................................................................................... 22
2.2.2. Validating model with Normalization ................................................................................ 24
2.2.3. Relational Schema with referential Integrity after normalization ..................................... 32
2.3. Physical database design ........................................................................................................... 35
2.3.1. Physical design strategy .................................................................................................... 39
2.3.2. Database Deployment details ........................................................................................... 40
3. Implementation and testing ............................................................................................................. 42
3.1. SQL script for creating the database ......................................................................................... 42
3.2. SQL Scripts for creating the tables, view, and indexes .............................................................. 43
3.3. Testing....................................................................................................................................... 52
4. Reference .......................................................................................................................................... 59
1
1. Introduction
1.1. Background
Real estate development projects are inherently complex, involving multiple stakeholders,
extensive planning and coordination, and the management of a vast amount of data and
documentation. Effective project management is crucial for the successful delivery of these
projects, as it helps to ensure that all the necessary components are aligned and integrated
seamlessly.
At the core of real estate development project management are several key entities that must be
meticulously tracked and managed. These include the project itself, the property being
developed, the contractors and subcontractors involved, the various construction phases, the
procurement and management of materials, the stock of materials on-site, and the actual usage of
those materials during the construction process.
Traditionally, real estate development project managers have relied on a patchwork of disparate
systems, spreadsheets, and documents to manage this wealth of information. However, this
approach often leads to data silos, lack of integration, and inefficient information management,
hindering the project manager's ability to make informed decisions, coordinate stakeholders, and
optimize project performance.
To address these challenges, there is a pressing need for a robust and comprehensive Relational
Database Management System (RDBMS) that can serve as a centralized platform for managing
all the critical data and information related to real estate development projects. Such an RDBMS
would not only streamline the management of project-related data but also enable enhanced
collaboration, improved operational efficiency, and more effective decision-making.
Concluding Remark:
The inherent complexity of real estate development projects, combined with the current
limitations of fragmented data management practices, underscores the critical importance of
designing and developing a robust RDBMS that can serve as a unified and integrated solution for
real estate development project management. By addressing this need, the RDBMS project can
2
significantly enhance the overall performance, cost-effectiveness, and successful delivery of real
estate development initiatives.
The real estate development industry faces significant challenges in managing the vast amount of
data and information associated with complex projects. The current practices of relying on
disparate spreadsheets, documents, and legacy systems often result in data silos, lack of
integration, and inefficient information management. This lack of a centralized and
comprehensive data management system hinders the ability of project managers to effectively
coordinate various stakeholders, track project progress, control materials and costs, and make
data-driven decisions.
To address these challenges, there is a need to design and develop a robust Relational Database
Management System (RDBMS) that can serve as a unified platform for managing all the critical
data and information related to real estate development projects. The RDBMS should be capable
of integrating the key entities identified, including project, property, contractor, construction
phase, materials purchase, materials stock, and materials usage, to provide a seamless and
efficient data management solution.
1. Centralized Data Management: Establish a centralized and structured repository for all
project-related data, eliminating the need for disparate and disconnected data sources.
2. Integrated Data Model: Design a comprehensive relational data model that captures the
relationships and interdependencies between the key entities involved in real estate
development projects.
3. Stakeholder Collaboration: Facilitate effective collaboration and communication
among various stakeholders, including project managers, contractors, suppliers, and the
owner, by providing a shared platform for data access and updates.
4. Improved Operational Efficiency: Streamline the management of project-related
processes, such as procurement, materials tracking, and cost control, through automated
workflows and data-driven insights.
3
5. Enhanced Reporting and Analytics: Provide robust reporting and analytical capabilities
to support data-driven decision-making, project monitoring, and performance
optimization.
6. Regulatory Compliance and Risk Management: Ensure the RDBMS supports the
management of project-related documentation, permits, and compliance requirements to
mitigate risks and ensure adherence to industry regulations.
By addressing these objectives, the RDBMS project aims to empower real estate development
project managers with a comprehensive, integrated, and efficient data management solution that
enhances overall project performance, reduces operational costs, and ultimately contributes to
the successful delivery of real estate development projects.
The scope of the RDBMS project for real estate development project management defined as
follows:
The scope of this RDBMS project does not include the development of any user-facing
applications, integration with external systems, or the implementation of advanced analytical
capabilities. The focus is solely on creating and testing the underlying database infrastructure to
serve as a reliable and scalable foundation for real estate development project management.
The general and specific objectives of the RDBMS project for real estate development project
management can be defined as follows:
General Objective:
The general objective of this RDBMS project is to establish a robust and efficient database
system that serves as the central repository for managing data related to real estate development
projects. The RDBMS will provide a reliable and scalable foundation to support the varied data
management and reporting requirements of real estate development project stakeholders.
5
1.4.2. Specific objectives
Specific Objectives:
6
o To design the views to integrate data from multiple tables, presenting a holistic view
of the project's status, progress, and performance metrics.
o To ensure the views are optimized for common reporting and decision-support
queries, enhancing the overall usability and responsiveness of the RDBMS.
4. Index Creation:
o To create appropriate indexes to optimize the performance of the RDBMS.
o To ensure the indexes are designed to support the most common and critical queries
that will be executed against the database, enabling rapid data retrieval and efficient
data processing.
o To regularly monitor and maintain the indexes to ensure they continue to provide
optimal performance as the data volume and usage patterns evolve over time.
5. Testing and Validation:
o To implement a comprehensive testing plan to validate the integrity, reliability, and
performance of the RDBMS.
By achieving these specific objectives, the RDBMS project will establish a solid foundation for
real estate development project management, enabling stakeholders to effectively store, manage,
and retrieve the critical data required to drive the successful delivery of these complex initiatives.
An overview of the data sources and collection methods that can be considered for the RDBMS
project:
Data Sources:
7
o Contractor/Vendor management system: Information on contractors,
subcontractors, suppliers, and their performance on the projects.
o Inventory management system: Data on materials stock levels, inventory
movements, and materials consumption.
2. External Data Sources:
o Regulatory agencies: Information on zoning, permits, and other regulatory
requirements for the development projects.
o Market research and analysis: Data on real estate market trends, property values,
and other external factors that may impact the project planning and execution.
o Weather/Climate data: Historical and forecasted weather data that can influence
construction timelines and materials usage.
8
o Establish a scheduled process to periodically upload static data sets, such as
contractor and supplier information, that may not require real-time integration.
o Ensure these data uploads are well-coordinated and aligned with the overall data
management strategy for the RDBMS.
By leveraging a combination of these data sources and collection methods, the RDBMS project
can establish a comprehensive and reliable data ecosystem to support the diverse information
needs of real estate development project management.
some key analysis and design methods that can be applied in the RDBMS project for real estate
development project management:
By applying these analysis and design methods, the RDBMS project can deliver a robust,
scalable, and user-friendly database solution that effectively supports the real estate development
project management requirements.
some of the key development tools that can be considered for the RDBMS project in real estate
development project management:
a. Database Management: SSMS allows you to create, configure, and manage SQL
Server databases, including tasks such as database creation, backup and restore, and
performance tuning.
b. Query Execution: SSMS provides a query editor with IntelliSense, syntax
highlighting, and other features to help you write and execute SQL statements, stored
procedures, and other database objects.
c. Object Explorer: The Object Explorer in SSMS provides a hierarchical view of all the
objects within your SQL Server instance, making it easy to navigate and manage
databases, tables, views, stored procedures, and other database objects.
d. Scripting and Automation: SSMS supports scripting and automating various database
management tasks, allowing you to create and execute scripts for repetitive or
complex operations.
11
e. Reporting and Analysis: SSMS integrates with SQL Server Reporting Services,
enabling you to create, manage, and view reports within the SSMS environment.
a. Services Management:
o Start, stop, pause, and resume the SQL Server services (SQL Server, SQL Server
Agent, SQL Server Analysis Services, etc.).
o Configure the startup type and account settings for the SQL Server services.
b. SQL Server Network Configuration:
o Enable or disable the different network protocols (TCP/IP, Named Pipes, etc.) used
by the SQL Server instance.
o Configure the properties of the network protocols, such as port numbers, IP
addresses, and more.
c. SQL Server Client Configuration:
o Configure the client network protocols and settings, which determine how client
applications connect to the SQL Server instance.
o Manage aliases for SQL Server instances, which simplify the connection process for
client applications.
d. SQL Server Native Client Configuration:
o Manage the settings for the SQL Server Native Client, which is the data provider used
by many client applications to connect to SQL Server.
e. SQL Server Browser Service:
o Configure the SQL Server Browser service, which helps clients locate SQL Server
instances on the network.
12
2. Database Design
14
2. Property
Attributes:
• PropertyID (Primary Key): Unique identifier for the property
• PropertyAddress: The full address of the property
• PropertySize: The size (area) of the property
• PropertySite: The site or location of the property
• PropertyCurrentUse: The current use of the property
• PropertyOwner: The name of the property owner
• ProjectID (Foreign Key): The project this property is associated with
• ContractorID (Foreign Key): The contractor(s) working on this property
• MaterialsStockID (Foreign Key): The materials stock associated with this property
• MaterialsPurchaseID (Foreign Key): The materials purchases made for this property
3. Contractor
Attributes:
• ContractorID (Primary Key): Unique identifier for the contractor
• ContractorName: The name of the contractor company
• ContractorAddress: The address of the contractor
• ContractorPhone: The phone number of the contractor
• ContractorSpecialty: The specialty or type of work the contractor focuses on
• ContractorRating: The overall rating or quality score for the contractor
• ContractorReviews: Any reviews or feedback about the contractor's work
• ProjectID (Foreign Key): The project(s) this contractor is associated with
• PropertyID (Foreign Key): The property(ies) this contractor is working on
• ConstructionPhaseID (Foreign Key): The construction phase(s) this contractor is
involved in
• MaterialsUsageID (Foreign Key): The materials usage associated with this contractor's
work
4. ConstructionPhase
Attributes:
• ConstructionPhaseID (Primary Key): Unique identifier for the construction phase
• PhaseName: The name or title of the construction phase
• PhaseStartDate: The start date of the construction phase
15
• PhaseEndDate: The expected end date of the construction phase
• PhaseStatus: The current status of the construction phase (planned, in progress,
completed)
• PhaseProgress: The percentage completion of the construction phase
• ProjectID (Foreign Key): The project this construction phase is associated with
• ContractorID (Foreign Key): The contractor(s) working on this construction phase
• MaterialsUsageID (Foreign Key): The materials usage associated with this construction
phase
5. MaterialsPurchase
Attributes:
• MaterialsPurchaseID (Primary Key): Unique identifier for the materials purchase
• MaterialType: The type or category of material purchased
• MaterialQuantity: The amount or quantity of the material purchased
• MaterialUnitOfMeasure: The unit of measure for the material (e.g., cubic feet, square
meters, etc.)
• MaterialPricePerUnit: The price per unit of the material
• MaterialCost: The total cost of the material purchase
• MaterialSupplier: The name of the supplier the materials were purchased from
• PurchaseDate: The date the materials were purchased
• ProjectID (Foreign Key): The project these materials were purchased for
• PropertyID (Foreign Key): The property these materials were purchased for
• ContractorID (Foreign Key): The contractor(s) these materials were purchased for
6. MaterialsStock
Attributes:
• MaterialsStockID (Primary Key): Unique identifier for the materials stock
• MaterialType: The type or category of material in stock
• MaterialQuantity: The current quantity of the material in stock
• MaterialUnitOfMeasure: The unit of measure for the material (e.g., cubic feet, square
meters, etc.)
• MaterialCostPerUnit: The cost per unit of the material
• MaterialTotalCost: The total cost of the materials in stock
16
• MaterialLocation: The physical location where the materials are stored
• InventoryDate: The date the inventory was recorded
• ProjectID (Foreign Key): The project these materials are associated with
• PropertyID (Foreign Key): The property these materials are associated with
• ContractorID (Foreign Key): The contractor(s) these materials are associated with
7. MaterialsUsage
Attributes:
• MaterialsUsageID (Primary Key): Unique identifier for the materials usage
• MaterialType: The type or category of material used
• MaterialQuantity: The amount or quantity of the material used
• MaterialUnitOfMeasure: The unit of measure for the material (e.g., cubic feet, square
meters, etc.)
• MaterialCostPerUnit: The cost per unit of the material
• MaterialTotalCost: The total cost of the materials used
• UsageDate: The date the materials were used
• ConstructionPhaseID (Foreign Key): The construction phase during which the materials
were used
• ContractorID (Foreign Key): The contractor(s) who used these materials
• ProjectID (Foreign Key): The project these materials were used for
1. Project entity:
• One-to-many relationship with the Property entity: A project can be associated
with multiple properties, but each property is associated with only one project.
• One-to-many relationship with the Contractor entity: A project can have multiple
contractors working on it, but each contractor is associated with one or more
projects.
• One-to-many relationship with the MaterialsStock entity: A project can have
multiple materials stock records, but each record is associated with a single
project.
17
• One-to-many relationship with the MaterialsPurchase entities: A project can
have multiple materials purchase records, but each record is associated with a
single project.
2. Property entity:
• One-to-many relationship with the Project entity: A property can be associated
with multiple projects, but each project is associated with only one property.
• One-to-many relationship with the Contractor entity: A property can have
multiple contractors working on it, but each contractor is associated with one or
more properties.
• One-to-many relationship with the MaterialsStock: A property can have multiple
materials stock records, but each record is associated with a single property.
• One-to-many relationship with MaterialsPurchase entity: A property can have
multiple materials purchase records, but each record is associated with a single
property.
3. Contractor entity:
• Many-to-many relationship with the Project entity: A contractor can work on
multiple projects, and a project can have multiple contractors.
• Many-to-many relationship with the Property entity: A contractor can work on
multiple properties, and a property can have multiple contractors.
• Many-to-many relationship with the ConstructionPhase entity: A contractor can
be involved in multiple construction phases, and a construction phase can have
multiple contractors.
• One-to-many relationship with the MaterialsUsage entity: A contractor can be
associated with multiple materials usage records, but each materials usage record
is associated with a single contractor.
4. ConstructionPhase entity:
• Many-to-many relationship with the Contractor entity: A construction phase can
involve multiple contractors, and a contractor can be involved in multiple
construction phases.
• One-to-many relationship with the MaterialsUsage entity: A construction phase
can have multiple materials usage records, but each materials usage record is
associated with a single construction phase.
5. MaterialsPurchase entity:
18
• Many-to-one relationship with the Project entity: Multiple materials purchase
records can be associated with a single project, but each record is associated with
only one project.
• Many-to-one relationship with the Property entity: Multiple materials purchase
records can be associated with a single property, but each record is associated
with only one property.
• Many-to-one relationship with the Contractor entity: Multiple materials purchase
records can be associated with a single contractor, but each record is associated
with only one contractor.
6. MaterialsStock entity:
• Many-to-one relationship with the Project entity: Multiple materials stock
records can be associated with a single project, but each record is associated with
only one project.
• Many-to-one relationship with the Property entity: Multiple materials stock
records can be associated with a single property, but each record is associated
with only one property.
• Many-to-one relationship with the Contractor entity: Multiple materials stock
records can be associated with a single contractor, but each record is associated
with only one contractor.
7. MaterialsUsage entity:
• Many-to-one relationship with the ConstructionPhase entity: Multiple materials
usage records can be associated with a single construction phase, but each record
is associated with only one construction phase.
• Many-to-one relationship with the Contractor entity: Multiple materials usage
records can be associated with a single contractor, but each record is associated
with only one contractor.
• Many-to-one relationship with the Project entity: Multiple materials usage
records can be associated with a single project, but each record is associated with
only one project.
19
2.1.4. E-R diagram
Project Property
PK ProjectID PK PropertyID
ProjectName PropertyAddress
ProjectLocation ProjectSize
ProjectEndDate ProjectCurrentUse
ProjectManager ProjectOwner
ProjectBudgetStatus
ProjectPhases
ProjectProgress ConstructionPhase
ProjectMilestones PK ConstructionPhaseID
(1, *) PhaseName
(1, *) (1, *)
PhaseStartDate
(1, *)
PhaseEndDate
PhaseStatus
PhaseProgress
Contractor
ContractorAddress
ContractorGrade MaterialUnitOfMeasure
ContractorReviews MaterialPricePerUnit
MaterialSupplier
(1, *)
PurchaseDate
ProjectID (FK)
(1, *)
MaterialsStock
PropertyID (FK)
PK MaterialsStockID
ContractorID (FK)
MaterialType
MaterialQuantity
(1, *)
MaterialCostPerUnit MaterialsUsage
MaterialLocation MaterialType
InventoryDate MaterialQuantity
UsageDate
ConstructionPhaseID (FK)
ContractorID (FK)
20
erDiagram
PROJECT ||--o{ PROPERTY : "associated with"
PROJECT ||--o{ CONTRACTOR : "has"
PROJECT ||--o{ MATERIALSSTOCK : "has"
PROJECT ||--o{ MATERIALSPURCHASE : "has"
21
2.2. Logical Database Design
1. Project:
• Attributes: Project ID, Project Name, Project Description, Project Start
Date, Project End Date
• Relationships:
• One-to-Many relationship with Property: A project can be
associated with multiple properties.
• One-to-Many relationship with Contractor: A project can have
multiple contractors working on it.
• One-to-Many relationship with MaterialsStock: A project can
have multiple materials stocks associated with it.
• One-to-Many relationship with MaterialsPurchase: A project can
have multiple material purchases associated with it.
• One-to-Many relationship with MaterialsUsage: A project can
have multiple material usages associated with it.
2. Property:
• Attributes: Property ID, Property Name, Property Address, Property Size
• Relationships:
• Many-to-One relationship with Project: A property can be
associated with multiple projects.
• One-to-Many relationship with Contractor: A property can have
multiple contractors working on it.
• One-to-Many relationship with MaterialsStock: A property can
have multiple materials stocks associated with it.
• One-to-Many relationship with MaterialsPurchase: A property can
have multiple material purchases associated with it.
3. Contractor:
22
• Attributes: Contractor ID, Contractor Name, Contractor Contact,
Contractor Specialization
• Relationships:
• Many-to-One relationship with Project: A contractor can work on
multiple projects.
• Many-to-One relationship with Property: A contractor can work
on multiple properties.
• Many-to-One relationship with ConstructionPhase: A contractor
can be involved in multiple construction phases.
• One-to-Many relationship with MaterialsUsage: A contractor can
have multiple material usages associated with them.
4. ConstructionPhase:
• Attributes: Phase ID, Phase Name, Phase Start Date, Phase End Date
• Relationships:
• Many-to-One relationship with Contractor: A construction phase
can involve multiple contractors.
• One-to-Many relationship with MaterialsUsage: A construction
phase can have multiple material usages associated with it.
5. MaterialsStock:
• Attributes: Stock ID, Material Name, Material Quantity, Material Unit
• Relationships:
• Many-to-One relationship with Project: A materials stock can be
associated with multiple projects.
• Many-to-One relationship with Property: A materials stock can be
associated with multiple properties.
• Many-to-One relationship with Contractor: A materials stock can
be associated with multiple contractors.
6. MaterialsPurchase:
23
• Attributes: Purchase ID, Material Name, Purchase Quantity, Purchase
Date, Purchase Price
• Relationships:
• Many-to-One relationship with Project: A materials purchase can
be associated with multiple projects.
• Many-to-One relationship with Property: A materials purchase
can be associated with multiple properties.
• Many-to-One relationship with Contractor: A materials purchase
can be associated with multiple contractors.
7. MaterialsUsage:
• Attributes: Usage ID, Material Name, Usage Quantity, Usage Date
• Relationships:
• Many-to-One relationship with Project: A materials usage can be
associated with multiple projects.
• Many-to-One relationship with Contractor: A materials usage can
be associated with multiple contractors.
• Many-to-One relationship with ConstructionPhase: A materials
usage can be associated with multiple construction phases.
To validate the E-R model against the First Normal Form (1NF) requirements, the
following criteria were used:
1. Atomic Attributes:
• Each attribute in the tables should be atomic, meaning it should contain a
single value and not be further divisible.
• Composite or multi-valued attributes are not allowed in 1NF.
2. Primary Key:
24
• Each table should have a primary key that uniquely identifies each
record in the table.
• The primary key should be composed of one or more attributes that,
together, uniquely identify a record.
The E-R model was evaluated based on these two main criteria:
1. Atomic Attributes:
• For each table, the attributes were checked to ensure that they were all
atomic and did not contain any composite or multi-valued attributes.
2. Primary Key:
• For each table, the presence of a primary key that uniquely identifies
each record was verified.
• The attributes that make up the primary key were checked to ensure they
collectively provide a unique identifier for each record.
By applying these criteria, the E-R model was validated to ensure that it satisfies the
First Normal Form (1NF) requirements. All the tables in the model have atomic
attributes, and each table has a primary key that uniquely identifies each record,
meeting the 1NF standards.
validate the E-R model against the First Normal Form (1NF) requirements.
1. Project:
• The attributes are all atomic, and the ProjectID serves as the primary
key, satisfying 1NF.
2. Property:
• The attributes are all atomic, and the PropertyID serves as the primary
key, satisfying 1NF.
3. Contractor:
• The attributes are all atomic, and the ContractorID serves as the primary
key, satisfying 1NF.
25
4. ConstructionPhase:
• The attributes are all atomic, and the ConstructionPhaseID serves as the
primary key, satisfying 1NF.
5. MaterialsPurchase:
• The attributes are all atomic, and the MaterialsPurchaseID serves as the
primary key, satisfying 1NF.
6. MaterialsStock:
• The attributes are all atomic, and the MaterialsStockID serves as the
primary key, satisfying 1NF.
7. MaterialsUsage:
• The attributes are all atomic, and the MaterialsUsageID serves as the
primary key, satisfying 1NF.
To validate an E-R model against the Second Normal Form (2NF) requirements, the
following criteria should be applied:
1. Full Functional Dependency:
• Ensure that all non-key attributes are fully functionally dependent on the
entire primary key.
• This means that each non-key attribute should depend on the whole
primary key, not just a subset of the primary key.
• If there are any non-key attributes that depend on only a part of the
primary key, the table violates 2NF.
2. Partial Dependency Elimination:
• If any non-key attributes are partially dependent on the primary key, they
should be moved to a separate table, creating a new relation.
• This ensures that each non-key attribute is fully dependent on the entire
primary key.
3. Transitive Dependency Elimination:
26
• Identify any transitive dependencies, where a non-key attribute depends
on another non-key attribute.
• If such transitive dependencies are found, the related non-key attributes
should be moved to a separate table, creating a new relation.
• This ensures that each non-key attribute depends only on the primary
key, not on other non-key attributes.
To validate the E-R model against these 2NF criteria, the following steps can be
followed:
1. Full Functional Dependency:
• Examine each table and its non-key attributes.
• Ensure that each non-key attribute is fully dependent on the entire
primary key, not just a subset of the primary key.
2. Partial Dependency Elimination:
• If any non-key attributes are found to be partially dependent on the
primary key, create a new table for those attributes, and ensure that the
new table has a primary key that is a subset of the original table's
primary key.
3. Transitive Dependency Elimination:
• Identify any non-key attributes that are transitively dependent on other
non-key attributes.
• Create a new table for the related non-key attributes, ensuring that the
new table's primary key is the original table's primary key.
By applying these criteria, the E-R model is thoroughly validated against the Second
Normal Form (2NF) requirements and ensured that the model is structured in a way
that promotes data integrity and normalization.
To validate the E-R model against the Second Normal Form (2NF) requirements, I
will go through each table and check for the following:
27
1. Full Functional Dependency:
• Project: The ProjectID is the primary key, and all other attributes
(ProjectName, ClientName, StartDate, EndDate) are fully dependent on
the ProjectID, satisfying 2NF.
• Property: The PropertyID is the primary key, and all other attributes
(PropertyAddress, PropertyType, PropertySize) are fully dependent on
the PropertyID, satisfying 2NF.
• Contractor: The ContractorID is the primary key, and all other
attributes (ContractorName, ContractorPhone, ContractorEmail) are
fully dependent on the ContractorID, satisfying 2NF.
• ConstructionPhase: The ConstructionPhaseID is the primary key, and
all other attributes (PhaseName, StartDate, EndDate) are fully dependent
on the ConstructionPhaseID, satisfying 2NF.
• MaterialsPurchase: The MaterialsPurchaseID is the primary key, and
all other attributes (MaterialID, Quantity, UnitPrice, PurchaseDate) are
fully dependent on the MaterialsPurchaseID, satisfying 2NF.
• MaterialsStock: The MaterialsStockID is the primary key, and all other
attributes (MaterialID, Quantity, LastUpdated) are fully dependent on
the MaterialsStockID, satisfying 2NF.
• MaterialsUsage: The MaterialsUsageID is the primary key, and all other
attributes (MaterialID, Quantity, UsageDate, ConstructionPhaseID) are
fully dependent on the MaterialsUsageID, satisfying 2NF.
2. Partial Dependency Elimination:
• No partial dependencies were found in the E-R model. All non-key
attributes are fully dependent on the respective primary keys.
3. Transitive Dependency Elimination:
• No transitive dependencies were found in the E-R model. Each non-key
attribute depends only on the primary key, not on other non-key
attributes.
28
Based on the analysis, the E-R model satisfies the Second Normal Form (2NF)
requirements. All tables have a primary key, and all non-key attributes are fully
functionally dependent on the primary key. There are no partial or transitive
dependencies present in the model.
29
• If such transitive dependencies are found, create a new table for the
related non-key attributes, ensuring that the new table's primary key is
the original table's primary key.
2. Determinant Identification:
• For each table, identify the determinants, which are the attributes or sets
of attributes that uniquely identify each row.
• The primary key is always a determinant, but there may be other
determinants as well.
3. Dependency on the Determinant:
• Verify that each non-key attribute in a table is dependent only on the
determinant(s) and not on any other non-key attribute.
• If any non-key attribute is found to be dependent on another non-key
attribute, create a new table for the related non-key attributes, ensuring
that the new table's primary key is the original table's primary key.
By applying these criteria, you can thoroughly validate the E-R model against the
Third Normal Form (3NF) requirements and ensure that the model is structured in a
way that promotes data integrity and normalization.
To validate the E-R model against the Third Normal Form (3NF) requirements, each
table is checked with the following criteria:
1. Elimination of Transitive Dependencies:
• Project: The ProjectID is the primary key, and all other attributes
(ProjectName, ClientName, StartDate, EndDate) depend directly on the
ProjectID, with no transitive dependencies.
• Property: The PropertyID is the primary key, and all other attributes
(PropertyAddress, PropertyType, PropertySize) depend directly on the
PropertyID, with no transitive dependencies.
30
• Contractor: The ContractorID is the primary key, and all other
attributes (ContractorName, ContractorPhone, ContractorEmail) depend
directly on the ContractorID, with no transitive dependencies.
• ConstructionPhase: The ConstructionPhaseID is the primary key, and
all other attributes (PhaseName, StartDate, EndDate) depend directly on
the ConstructionPhaseID, with no transitive dependencies.
• MaterialsPurchase: The MaterialsPurchaseID is the primary key, and
all other attributes (MaterialID, Quantity, UnitPrice, PurchaseDate)
depend directly on the MaterialsPurchaseID, with no transitive
dependencies.
• MaterialsStock: The MaterialsStockID is the primary key, and all other
attributes (MaterialID, Quantity, LastUpdated) depend directly on the
MaterialsStockID, with no transitive dependencies.
• MaterialsUsage: The MaterialsUsageID is the primary key, and all other
attributes (MaterialID, Quantity, UsageDate, ConstructionPhaseID)
depend directly on the MaterialsUsageID, with no transitive
dependencies.
2. Determinant Identification:
• For each table, the primary key is the determinant that uniquely
identifies each row.
3. Dependency on the Determinant:
• In all tables, each non-key attribute is dependent only on the primary key
(the determinant) and not on any other non-key attribute.
Based on the analysis, the E-R model satisfies the Third Normal Form (3NF)
requirements. All tables have a primary key that is the determinant, and all non-key
attributes are dependent only on the primary key, with no transitive dependencies
present in the model.
31
2.2.3. Relational Schema with referential Integrity after normalization
Based on the E-R model you provided, here is the relational schema with referential
integrity after normalization:
1. Project Table
• ProjectID (PK)
• ProjectName
• ProjectLocation
• ProjectStartDate
• ProjectEndDate
• ProjectManager
• ProjectBudget
• ProjectBudgetStatus
• ProjectPhases
• ProjectProgress
• ProjectMilestones
• PropertyID (FK, references [Link])
• ContractorID (FK, references [Link])
• MaterialsStockID (FK, references [Link])
• MaterialsPurchaseID (FK, references
[Link])
2. Property Table
• PropertyID (PK)
• PropertyAddress
• PropertySize
• PropertySite
• PropertyCurrentUse
• PropertyOwner
• ProjectID (FK, references [Link])
32
• ContractorID (FK, references [Link])
• MaterialsStockID (FK, references [Link])
• MaterialsPurchaseID (FK, references
[Link])
3. Contractor Table
• ContractorID (PK)
• ContractorName
• ContractorAddress
• ContractorPhone
• ContractorSpecialty
• ContractorRating
• ContractorReviews
• ProjectID (FK, references [Link])
• PropertyID (FK, references [Link])
• ConstructionPhaseID (FK, references
[Link])
• MaterialsUsageID (FK, references [Link])
4. ConstructionPhase Table
• ConstructionPhaseID (PK)
• PhaseName
• PhaseStartDate
• PhaseEndDate
• PhaseStatus
• PhaseProgress
• ProjectID (FK, references [Link])
• ContractorID (FK, references [Link])
• MaterialsUsageID (FK, references [Link])
5. MaterialsPurchase Table
• MaterialsPurchaseID (PK)
33
• MaterialType
• MaterialQuantity
• MaterialUnitOfMeasure
• MaterialPricePerUnit
• MaterialCost
• MaterialSupplier
• PurchaseDate
• ProjectID (FK, references [Link])
• PropertyID (FK, references [Link])
• ContractorID (FK, references [Link])
6. MaterialsStock Table
• MaterialsStockID (PK)
• MaterialType
• MaterialQuantity
• MaterialUnitOfMeasure
• MaterialCostPerUnit
• MaterialTotalCost
• MaterialLocation
• InventoryDate
• ProjectID (FK, references [Link])
• PropertyID (FK, references [Link])
• ContractorID (FK, references [Link])
7. MaterialsUsage Table
• MaterialsUsageID (PK)
• MaterialType
• MaterialQuantity
• MaterialUnitOfMeasure
• MaterialCostPerUnit
34
• MaterialTotalCost
• UsageDate
• ConstructionPhaseID (FK, references [Link])
• ContractorID (FK, references [Link])
• ProjectID (FK, references [Link])
The referential integrity is ensured through the use of foreign key constraints, where
each foreign key column in a table references the primary key column of another
table. This helps maintain data consistency and integrity within the relational database
schema.
35
MaterialsPurchaseID INT FOREIGN KEY REFERENCES
MaterialsPurchase(MaterialsPurchaseID)
);
2. Property Table
36
MaterialsUsageID INT FOREIGN KEY REFERENCES
MaterialsUsage(MaterialsUsageID)
);
4. ConstructionPhase Table
38
2.3.1. Physical design strategy
The physical database design strategy for the real estate development project
management appears to be a relational database design that emphasizes the following
key aspects:
1. Entity-Relationship Modeling: The database schema consists of several
interconnected entities, such as Project, Property, Contractor,
ConstructionPhase, MaterialsPurchase, MaterialsStock, and MaterialsUsage.
These entities capture the various components and relationships involved in the
real estate development project management process.
2. Primary and Foreign Keys: Each entity has a unique primary key identifier,
such as ProjectID, PropertyID, ContractorID, ConstructionPhaseID,
MaterialsPurchaseID, MaterialsStockID, and MaterialsUsageID. These primary
keys are used to establish relationships between the entities through foreign
keys.
3. Normalization: The database design appears to be normalized to reduce data
redundancy and improve data integrity. For example, the project entity stores
project-specific information, and the unique ProjectID as the primary key,
ensures that each project record is uniquely identified, and property, contractor,
materialsPurchase and materialsStock entities reference the project through this
foreign key. Similarly, other entities stores entity-specific information, and
their unique entity ID as the primary key ensures that each entity record is
uniquely identified and other entities reference the specific entity through the
foreign key identified for each entity.
By normalizing the database design in this manner, the system can avoid data
redundancy, improve data integrity, and establish clear relationships between
the various entities involved in the real estate development project management
process.
39
4. Data Modeling: The database design covers a wide range of information
related to real estate development projects, including project details, property
details, contractor information, construction phases, materials purchase and
stock, and materials usage.
5. Data Integrity Constraints: The design includes various data integrity
constraints, such as referential integrity constraints (foreign key relationships)
to ensure the consistency and validity of the data across the entities.
6. Scalability and Performance: The design allows for the addition of new
projects, properties, contractors, construction phases, and materials-related
data, making the RDBMS scalable to handle the growing needs of the real
estate development project management system.
7. Reporting and Analysis: The detailed data captured in the entities can support
various reporting and analytical requirements for project management,
budgeting, material tracking, and overall performance monitoring.
Overall, the physical database design strategy appears to be a well-structured
relational database that addresses the key requirements of a real estate development
project management system, focusing on data organization, relationships, integrity,
and scalability.
41
options for horizontal scaling (adding more database instances) and high
availability (e.g., database clustering, replication, or failover mechanisms).
8. Database Monitoring and Maintenance: Regular monitoring of database
performance metrics and maintenance activities, such as index maintenance,
database cleanup, and schema updates, should be implemented to ensure the
long-term health and efficiency of the database.
The specific implementation details may vary depending on the organization's IT
infrastructure, cloud platform, and overall requirements for the real estate
development project management system.
42
This script will create the [RealEstate Dev Project Management] database with the
specified file locations, sizes, and growth settings.
3.2. SQL Scripts for creating the tables, view, and indexes
43
ContractorAddress VARCHAR(200),
ContractorPhone VARCHAR(20),
ContractorSpecialty VARCHAR(100),
ContractorGrade INT(3),
ContractorReviews TEXT,
ProjectID INT FOREIGN KEY REFERENCES Project(ProjectID)
);
45
3. Contractor Table: Stores information about the contractors involved in the
projects, including their name, address, phone, specialty, grade/rating, and
reviews. It also has a foreign key relationship with the Project table.
4. ConstructionPhase Table: Stores details about the various phases of the
construction project, such as the phase name, start/end dates, status, progress,
as well as the associated project and contractor.
5. MaterialsPurchase Table: Stores information about the materials purchased
for the projects, including the type, quantity, unit of measure, price, cost,
supplier, and purchase date. It has foreign key relationships with the Project,
Property, and Contractor tables.
6. MaterialsStock Table: Stores details about the materials in stock, including
the type, quantity, unit of measure, cost per unit, total cost, location, and
inventory date. It also has foreign key relationships with the Project, Property,
and Contractor tables.
7. MaterialsUsage Table: Stores information about the materials used during the
construction phases, including the type, quantity, unit of measure, cost per unit,
total cost, and usage date. It has foreign key relationships with the
ConstructionPhase, Contractor, and Project tables.
Once, tables are created. In order connect with the database, for example,
USE [RealEstate Dev Project Management]
GO
-- Project View
CREATE VIEW ProjectView AS
SELECT
[Link],
[Link],
46
[Link],
[Link],
[Link],
[Link],
[Link],
[Link],
[Link],
[Link],
[Link]
FROM Project p;
-- Property View
CREATE VIEW PropertyView AS
SELECT
[Link],
[Link],
[Link],
[Link],
[Link],
[Link],
[Link]
FROM Property pr
JOIN Project p ON [Link] = [Link];
-- Contractor View
CREATE VIEW ContractorView AS
SELECT
[Link],
[Link],
[Link],
[Link],
[Link],
[Link],
[Link],
[Link]
FROM Contractor c
JOIN Project p ON [Link] = [Link];
-- ConstructionPhase View
CREATE VIEW ConstructionPhaseView AS
SELECT
[Link],
47
[Link],
[Link],
[Link],
[Link],
[Link],
[Link],
[Link]
FROM ConstructionPhase cp
JOIN Project p ON [Link] = [Link]
JOIN Contractor c ON [Link] = [Link];
-- MaterialsPurchase View
CREATE VIEW MaterialsPurchaseView AS
SELECT
[Link],
[Link],
[Link],
[Link],
[Link],
[Link],
[Link],
[Link],
[Link],
[Link],
[Link]
FROM MaterialsPurchase mp
JOIN Project p ON [Link] = [Link]
JOIN Property pr ON [Link] = [Link]
JOIN Contractor c ON [Link] = [Link];
-- MaterialsStock View
CREATE VIEW MaterialsStockView AS
SELECT
[Link],
[Link],
[Link],
[Link],
[Link],
[Link],
[Link],
[Link],
[Link],
48
[Link],
[Link]
FROM MaterialsStock ms
JOIN Project p ON [Link] = [Link]
JOIN Property pr ON [Link] = [Link]
JOIN Contractor c ON [Link] = [Link];
-- MaterialsUsage View
CREATE VIEW MaterialsUsageView AS
SELECT
[Link],
[Link],
[Link],
[Link],
[Link],
[Link],
[Link],
[Link],
[Link],
[Link]
FROM MaterialsUsage mu
JOIN ConstructionPhase cp ON [Link] = [Link]
JOIN Contractor c ON [Link] = [Link]
JOIN Project p ON [Link] = [Link];
49
CREATE INDEX idx_project_projectenddate
ON Project (ProjectEndDate);
50
-- Create index on MaterialsPurchase table
CREATE INDEX idx_materialspurchase_materialtype
ON MaterialsPurchase (MaterialType);
These index scripts will create indexes on the most commonly queried columns in the
database tables, improving query performance. The indexes cover the following areas:
• Project table: indexes on project name, manager, start date, and end date
• Property table: indexes on property address, owner, and project ID
• Contractor table: indexes on contractor name, specialty, and project ID
• ConstructionPhase table: indexes on phase name, project ID, and contractor ID
• MaterialsPurchase table: indexes on material type, supplier, project ID, property ID, and
contractor ID
• MaterialsStock table: indexes on material type, location, project ID, property ID, and
contractor ID
• MaterialsUsage table: indexes on material type, construction phase ID, contractor ID, and
project ID
3.3. Testing
52
SIZE = 10MB,
MAXSIZE = 1000MB,
FILEGROWTH = 5MB
)
LOG ON (
NAME = 'RealEstate Dev Project Management_Log',
FILENAME = 'C:\Users\Public\Documents\RealEstate Dev Project Management_Log.ldf',
SIZE = 5MB,
MAXSIZE = 500MB,
FILEGROWTH = 2MB
);
PRINT 'Database "RealEstate Dev Project Management" created successfully.'
END
ELSE
PRINT 'Database "RealEstate Dev Project Management" already exists.'
GO
test whether the "RealEstate Dev Project Management" database was created
successfully in SQL Server Management Studio:
-- Test retrieving data from a table (assuming a table named "Project" exists)
SELECT *
FROM [RealEstate Dev Project Management].[dbo].[Project]
WHERE ProjectID = 1
BEGIN TRY
53
USE [RealEstate Dev Project Management]
OPEN entity_cursor
FETCH NEXT FROM entity_cursor INTO @EntityName, @EntityType
WHILE @@FETCH_STATUS = 0
BEGIN
-- Check if the table exists
SET @TableExists = CASE WHEN OBJECT_ID(QUOTENAME(@EntityName), 'U') IS NOT
NULL THEN 1 ELSE 0 END
IF @TableExists = 1
PRINT 'Table "' + @EntityName + '" created successfully.'
ELSE
PRINT 'Error creating table "' + @EntityName + '".'
CLOSE entity_cursor
DEALLOCATE entity_cursor
55
Check for View Existence
1. Project View:
SELECT VIEW_DEFINITION
FROM INFORMATION_SCHEMA.VIEWS
WHERE TABLE_NAME = 'ProjectView';
2. Property View:
SELECT VIEW_DEFINITION
FROM INFORMATION_SCHEMA.VIEWS
WHERE TABLE_NAME = 'PropertyView';
3. Contractor View:
SELECT VIEW_DEFINITION
FROM INFORMATION_SCHEMA.VIEWS
WHERE TABLE_NAME = 'ContractorView';
4. Construction Phase View:
SELECT VIEW_DEFINITION
FROM INFORMATION_SCHEMA.VIEWS
WHERE TABLE_NAME = 'ConstructionPhaseView';
5. Materials Purchase View:
SELECT VIEW_DEFINITION
FROM INFORMATION_SCHEMA.VIEWS
WHERE TABLE_NAME = 'MaterialsPurchaseView';
6. Materials Stock View:
SELECT VIEW_DEFINITION
FROM INFORMATION_SCHEMA.VIEWS
WHERE TABLE_NAME = 'MaterialsStockView';
7. Materials Usage View:
SELECT VIEW_DEFINITION
FROM INFORMATION_SCHEMA.VIEWS
WHERE TABLE_NAME = 'MaterialsUsageView';
56
TABLE_NAME
FROM INFORMATION_SCHEMA.VIEWS;
57
SELECT * FROM [Link] WHERE name IN ('idx_project_projectname',
'idx_project_projectmanager', 'idx_project_projectstartdate', 'idx_project_projectenddate') AND
object_id = OBJECT_ID('Project');
58
SELECT * FROM [Link] WHERE name IN ('idx_materialsusage_materialtype',
'idx_materialsusage_constructionphaseid', 'idx_materialsusage_contractorid',
'idx_materialsusage_projectid') AND object_id = OBJECT_ID('MaterialsUsage');
4. Reference
• Attachement: Implemented database files (*.mdf and *.ldf)
[Link]
Data E:\final\MYSQL\MSSQL16.MSSQLSERVER01\MSSQL\Binn\[Link]
[Link]
Log E:\final\MYSQL\MSSQL16.MSSQLSERVER01\MSSQL\Binn\[Link]
59