0% found this document useful (0 votes)
26 views48 pages

Dbms Samirgg

Hi iam samir

Uploaded by

kif22.sg
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views48 pages

Dbms Samirgg

Hi iam samir

Uploaded by

kif22.sg
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 48

Database Management System

INTERNATIONAL SCHOOL OF
MANAGEMENT AND TECHNOLOGY

FACULTY OF COMPUTING

ASSIGNMENT COVER SHEET


This form is to be completed by students submitting assignments of level 4 and level 5. Students
are required to complete all sections and attach to your assignment.

STUDENT DETAILS

STUDENT NAME Samir giri

STUDENT ID

UNIT AND ASSIGNMENT DETAILS

UNIT TITLE Unit 38: Database Management Systems

UNIT NUMBER Y/615/1682

ASSIGNMENT Record Keeping Services


TITLE

ISSUE DATE 20/09/2023 DUE DATE 20/11/2023

ASSESSOR Rajad Shakya


NAME

ESTIMATED 5000
WORD LENGTH

Shankar chhetri
Page | 1
Database Management System

SUBMISSION

HAND IN DATE 3/15/2024

Shankar chhetri
Page | 2
Database Management System

DECLERATION AND ACKNOWLEDGEMENT

When submitting assignments, each student must sign a declaration confirming that the work
is their own.

Plagiarism and Collusion


Plagiarism: to use or pass off as one’s own, the writings or ideas of another without
acknowledging or crediting the source from which the ideas are taken.

Collusion: submitting an assignment, project or report completed by another person


and passing it off as one’s.

In accordance with the Academic Integrity and Plagiarism Policy:

1. I declare that:
a) this assignment is entirely my own work, except where I have included fully-
documented references to the work of others,
b) the material contained in this assignment has not previously been submitted for any
other subject at the University or any other educational institution, except as
otherwise permitted,
c) no part of this assignment or product has been submitted by me in another (previous
or current) assessment, except where appropriately referenced, and with prior
permission from the Lecturer / Tutor / Unit Coordinator for this unit.

2. I acknowledge that:
a) if required to do so, I will provide an electronic copy of this assignment to the
assessor;
b) the assessor of this assignment may, for the purpose of assessing this assignment:
I. reproduce this assignment and provide a copy to another member of academic
staff;
II. communicate a copy of this assignment to a plagiarism checking service such
as Plagiarism Check (which may then retain a copy of this assignment on its
database for the purpose of future plagiarism checking).

Shankar chhetri
Page | 3
Database Management System

I am aware of and understand that any breaches to the Academic Code of Conduct will be
investigated and sanctioned in accordance with the College Policy.

SIGNATURE Samir DATE 3/15/2024

Shankar chhetri
Page | 4
Database Management System

Table of Contents
List of Figures..................................................................................................................................6
Part 1................................................................................................................................................8
Introduction:................................................................................................................................8
Database:......................................................................................................................................8
Data Model and Its Types:...........................................................................................................9
Hierarchical Data Model:...................................................................................................10
Network Data Model:..........................................................................................................12
Relational Data Model:.......................................................................................................14
Entity-Relationship Model (ER Model):...........................................................................14
Object-Oriented Data Model:.............................................................................................16
Relational Model:.................................................................................................................17
Database Management Systems (DBMS).................................................................................19
Advantages of Database Management Systems:...............................................................20
Relational Database Management Systems (RDBMS).............................................................21
Key Concepts in RDBMS:...................................................................................................21
Normalization............................................................................................................................22
1. First Normal Form (1NF):..............................................................................................22
2. Second Normal Form (2NF):..........................................................................................22
3. Third Normal Form (3NF):............................................................................................22
Conclusion.................................................................................................................................25
Part 2..............................................................................................................................................27
Introduction................................................................................................................................27
Relational Database Management System (RDBMS):..............................................................27
Relationships between Entities:.................................................................................................27
One-to-One Relationship:...................................................................................................27
One to many /many to one..................................................................................................27
Many to many......................................................................................................................28
Client Requirements:.................................................................................................................28
Property Listings Management:.........................................................................................28
Customer Relationship Management (CRM):..................................................................28

Shankar chhetri
Page | 5
Database Management System

Online Booking and Reservations:.....................................................................................29


Data Security and Backup:.................................................................................................29
Development of Fully Functional Database Management System............................................31
Tools and Technologies Used:...................................................................................................31
 Visual Studio Code (VS Code):....................................................................................31
 Front-end Development:...............................................................................................31
 Back-end Development:................................................................................................31
Relational Database Management System (RDBMS) - PostgreSQL:.......................................31
Creating the Database:...............................................................................................................32
Creating Tables....................................................................................................................33
Inserting Values:..................................................................................................................34
Program interface.......................................................................................................................36
Query Language Implementation:.............................................................................................37
User interface design.................................................................................................................38
Test case.....................................................................................................................................46
Conclusion.................................................................................................................................47
References......................................................................................................................................48

List of Figures
Figure 1 Hierarchical model example............................................................................................11
Figure 2 Network model example.................................................................................................13
Figure 3 Entity-Relationship model example................................................................................15
Figure 4 Object-Oriented model example.....................................................................................17
Figure 5 Property Management System ER diagram....................................................................30
Figure 6 Creating Database...........................................................................................................32
Figure 7 creating table for database...............................................................................................33
Figure 8 Creating table for database..............................................................................................34
Figure 9 inserting data in table......................................................................................................35
Figure 10 Values inserted in table.................................................................................................36
Figure 11 Complex queries uses....................................................................................................38
Figure 12 Costumer Login Page....................................................................................................38
Figure 13 Registration Page...........................................................................................................39
Shankar chhetri
Page | 6
Database Management System

Figure 14 Home page.....................................................................................................................40


Figure 15 Property listing and search page....................................................................................41
Figure 16 property detail page.......................................................................................................42
Figure 17 inquiry page...................................................................................................................43
Figure 18 Admin page...................................................................................................................44
Figure 19 Admin Home Page........................................................................................................44
Figure 20 property list page...........................................................................................................44
Figure 21 Booking List page.........................................................................................................45
Figure 22 Customer list page.........................................................................................................45

Shankar chhetri
Page | 7
Database Management System

Part 1
Introduction:
In a dynamic real estate industry, Mega Build Estate's operational efficiency is based on a robust
database infrastructure carefully designed to manage a wide range of real estate information,
customer communications and reservations. Data models form the backbone of a system, from
conceptual frameworks to hierarchical structures, network architectures, relational databases, and
uni-relational models. These models, reinforced by object-oriented paradigms, ensure careful
storage and retrieval of data, characterized by their flexibility and adaptability. Integrated in this
framework is the concept of normalization, which combines data consistency with formats such
as 1NF, 2NF, and 3NF. At the heart of this complex network is a database management system
(DBMS), which is the cornerstone that facilitates seamless communication and usage. Using a
relational database management system (RDBMS), data is securely organized using
relationships, attributes, and keys. This advanced network gives Mega Build Estate a strategic
advantage in the highly competitive real estate environment, promoting operational efficiency
and data integrity.

Database:
The database acts as a huge archive similar to a carefully organized vault containing important
information about the Mega Build Estate. It serves as a special place where countless data about
properties, customer commitments and reservations are carefully stored and managed. Thanks to
a complex organizational system, the database ensures easy access to information and reduces
the risk of confusion or disorganization. In relation to Mega Build Estate, this database plays a
central role and is the foundation of the real estate website. It provides a structured and
systematic approach to data storage, retrieval and management, catalyzes operational efficiency
and reduces manual workload. In addition, it protects the sanctity and confidentiality of data
entrusted to Mega Build Estate and strengthens its reputation as a trusted custodian of sensitive
data.

Data Model and Its Types:


A data model stands as a conceptual blueprint delineating the architecture and arrangement of
data within a system or application. It delineates the manner in which data is stored, accessed,
and managed, furnishing a roadmap for the design and implementation of a database

Shankar chhetri
Page | 8
Database Management System

infrastructure. Serving as an intermediary between business requisites and technical


specifications, the data model encapsulates entities, representing tangible or abstract entities, and
their interrelationships. Attributes associated with these entities elucidate the characteristics or
properties of the data, enriching the model with contextual relevance.

Diverse typologies of data models, including the relational model, hierarchical model, and
object-oriented model, proffer distinct paradigms for representing and manipulating data. The
intrinsic value of a well-crafted data model transcends mere conceptualization, encapsulating
critical elements of data integrity, consistency, and performance.

In essence, a robust data model underpins effective data management, furnishing the scaffolding
upon which scalable and maintainable database systems are erected. Across myriad domains,
spanning from commercial enterprises to scientific research endeavors, the foundational role of a
meticulously devised data model remains indelible, empowering organizations to navigate the
complexities of information management with finesse and efficacy.

In the realm of database management, various data models offer unique approaches to organizing
and structuring data. Let's delve into two distinctive models: the Hierarchical Data Model and the
Network Data Model.

Hierarchical Data Model:


The Hierarchical Data Model arranges data in a tree-like structure, emphasizing parent-child
relationships. Each record has a single parent but may possess multiple child records. This
model, commonly utilized in mainframe and early database management systems, boasts
simplicity and efficiency. Example, Consider a shopping website's inventory of shoes. The
hierarchical model would represent the relationship among different types of shoes, like men's
and women's footwear, in a hierarchical tree format.

Shankar chhetri
Page | 9
Database Management System

Figure 1 Hierarchical model example

Features of Hierarchical Model:

1. One-to-Many Relationship: Data is organized in a one-to-many relationship, ensuring clear


hierarchical structuring.

2. Parent-Child Relationship: Parent nodes can have multiple child nodes, but each child node
has only one parent.

3. Deletion Problem: If a parent node is deleted, its child nodes are automatically removed.

4. Pointers: Pointers establish connections between parent and child nodes, facilitating
navigation within the data structure.

Advantages of Hierarchical Model:

Shankar chhetri
Page | 10
Database Management System

 Ease of Navigation: Traversing through a hierarchical tree structure is quick and


straightforward.
 Data Integrity: Changes made to parent nodes are automatically reflected in child nodes,
ensuring data consistency.

Disadvantages of Hierarchical Model:

 Limited Support for Complex Relationships: Complex relationships are challenging to


represent within this model.
 Deletion Consequences: Automatic deletion of child nodes when a parent node is
removed can lead to data loss.

Network Data Model:


Unlike the Hierarchical Model, the Network Data Model allows for more intricate relationships,
accommodating multiple parent and child records. While it was prevalent in early database
systems, it's less commonly used today due to its complexity.

Example: In a network model, a student record may have two parents, such as the CSE
Department and the Library, allowing for more flexibility and interconnectedness.

Shankar chhetri
Page | 11
Database Management System

Figure 2 Network model example

Features of Network Model:


1. Ability to Merge Relationships: The network model handles complex relationships,
fostering a highly interconnected data structure.
2. Many Paths: Multiple pathways exist to access the same record, enhancing data
accessibility.
3. Circular Linked List: Circular linked lists facilitate operations within the network
model, ensuring efficient data management.

Advantages of Network Model:


 Enhanced Data Retrieval: The network model offers quicker data retrieval
compared to hierarchical models due to its interconnected nature.
 Data Integrity: Similar to hierarchical models, the network model maintains data
integrity through parent-child relationships.

Shankar chhetri
Page | 12
Database Management System

Disadvantages of Network Model:


 Complexity: Managing numerous relationships can lead to system complexity,
requiring users to possess in-depth knowledge.
 Complex Operations: Operations like updating, deleting, and inserting data can be
intricate within the network model due to its interconnected structure.

In conclusion, while both the Hierarchical and Network Data Models offer distinct
advantages and challenges, their selection depends on the specific requirements and
complexities of the data management task at hand. Understanding these models
empowers database professionals to make informed decisions in designing efficient and
effective data storage systems.

Relational Data Model:


At the core of modern database systems lies the Relational Data Model, a paradigm that
organizes data into tables, fostering a structured approach to data management. In this
model, each table comprises rows, representing individual records, and columns,
delineating attributes or properties of these records. Relationships between tables are
established through keys, with primary keys uniquely identifying each record and foreign
keys facilitating connections between tables.

The Relational Data Model boasts widespread adoption owing to its simplicity,
flexibility, and adherence to standardized querying languages such as SQL (Structured
Query Language). Notable implementations of this model include Oracle Database,
PostgreSQL, MySQL, and SQL Server. By encapsulating data in tabular form and
facilitating seamless interactions through relational operations, this model lays the
foundation for efficient data organization and retrieval.
Entity-Relationship Model (ER Model):
The Entity-Relationship (ER) Model stands as a graphical representation pivotal in structuring
and visualizing relationships among real-world entities within a database system. This model
employs entities to embody tangible or abstract objects, with relationships delineating
connections between these entities. Represented graphically, entities are depicted as rectangles,
Shankar chhetri
Page | 13
Database Management System

while relationships are illustrated through lines connecting entities. Attributes, intrinsic
characteristics of entities, further enrich the model by detailing specific properties.

Understanding ER Model Components:

1. Entities: Entities serve as the building blocks of the ER Model, embodying real-world entities
such as persons, places, or concepts. For instance, in a School Management System, entities may
include Teachers, Students, Courses, Buildings, and Departments.

2. Attributes: Within each entity lies a set of attributes, representing real-world properties
associated with the entity. For example, attributes of a Teacher entity may encompass
Teacher_ID, Salary, Age, and Mobile_Number.

3. Relationships: Relationships elucidate how entities are interrelated within the database
system. For instance, the relationship "Teacher works for a department" establishes a connection
between the Teacher and Department entities, signifying employment associations. Relationships
are vital in capturing the dependencies and interactions between entities, providing a holistic
view of the data model.

Figure 3 Entity-Relationship model example

Illustrative Example of ER Model:


Shankar chhetri
Page | 14
Database Management System

Consider an ER diagram depicting relationships between Teacher and Department


entities. The Teacher entity comprises attributes like Teacher_Name, Teacher_ID, Age,
Salary, and Mobile_Number, while the Department entity encompasses attributes such as
Dept_ID and Dept_Name. Through the relationship "Teacher works for a department,"
the two entities are connected, reflecting the employment associations between teachers
and respective departments.

Object-Oriented Data Model:


In contrast to traditional data models, the Object-Oriented Data Model (OODM) embraces a
paradigm shift by representing data as encapsulated objects, embodying both data and behavior.
Objects in the OODM inherit properties and behaviors from other objects, fostering code reuse
and modularity within database systems. This model finds extensive usage in object-oriented
programming and database systems, where data complexities necessitate a more natural
representation.

Illustrative Example of OODM:

Consider an example illustrating the OODM, comprising objects like Employee and Department.
Each object encapsulates both data and behavior within a single unit. For instance, attributes
such as Name and Job_Title of an Employee object store relevant data, while methods associated
with the object dictate permissible operations. The relationship between Employee and
Department objects is established through a common attribute, such as Department_ID,
facilitating seamless communication and interaction between the two entities.

Shankar chhetri
Page | 15
Database Management System

Figure 4 Object-Oriented model example

Relational Model:
The Relational Model stands as the cornerstone of modern database management, revered for its
simplicity, scalability, and structural independence. Let's delve into the intricacies of this widely
adopted model, dissecting its features, advantages, and potential drawbacks.

At its core, the Relational Model organizes data within a two-dimensional structure which
resemble tables, where information is stored in rows and columns. Each table, also referred to as
a relation, represents a distinct entity or concept within the database. For instance, consider an
Employee table, where each row encapsulates details about a specific employee, such as name,
salary, and contact information.

Shankar chhetri
Page | 16
Database Management System

Features of the Relational Model:


1. Tuples: Within each table, rows are termed tuples, with each tuple containing
comprehensive information about a specific instance of the object. For example, in the
Employee table, each row corresponds to an individual employee and encompasses all
pertinent details.
2. Attributes or Fields: Attributes define the properties or characteristics of the table, with
each column representing a distinct attribute. These attributes dictate the type of data
stored within the table and ensure data consistency. In the Employee table, attributes may
include Salary, Mobile Number, and Department.

Advantages of the Relational Model:


Simplicity: The Relational Model offers a straightforward and intuitive approach to data
organization, making it accessible to users with varying levels of expertise. Its tabular
structure simplifies data management and querying processes.
Scalability: One of the model's most notable advantages is its scalability. Database
administrators can easily scale the database by adding or removing rows and columns,
accommodating evolving data requirements without significant disruption.
Structural Independence: The Relational Model facilitates structural independence,
allowing for modifications to the database schema without affecting data access methods.
This inherent flexibility streamlines database maintenance and enhances system agility.

Disadvantages of the Relational Model:


Hardware Overheads: Despite its simplicity, the Relational Model may impose
hardware overheads, particularly as databases grow in size and complexity. Managing
intricate relational structures may necessitate more powerful hardware resources,
increasing operational costs.
Potential for Bad Design: The ease of design and use associated with the Relational
Model may inadvertently lead to poor database design. Without proper planning and
Shankar chhetri
Page | 17
Database Management System

organization, databases may suffer from inefficiencies and performance bottlenecks as


they expand over time.

However, it's important to note that these disadvantages are relatively minor compared to
the manifold advantages offered by the Relational Model. With meticulous
implementation and adherence to best practices, organizations can mitigate these
challenges and leverage the model's strengths to build robust and efficient database
systems tailored to their specific needs. The Relational Model remains a cornerstone of
database management, offering a reliable framework for organizing and manipulating
data. Its simplicity, scalability, and structural independence make it an indispensable tool
in the realm of modern data management, empowering organizations to efficiently
manage their data assets and drive business success.

Database Management Systems (DBMS)


A Database Management System (DBMS) is a comprehensive amalgamation of software
and data infrastructure, comprising several key components:

Physical Database: This component comprises a collection of files housing the actual
data.

Database Engine: The database engine is the software responsible for facilitating access
to and modification of the database contents.

Database Schema: The schema serves as a blueprint, specifying the logical structure of
the data stored within the database.

DBMS software serves as a pivotal interface for communication with databases,


managing storage, retrieval, and utilization of data. It acts as an intermediary between
users and the database, ensuring that data is formatted, organized, and accessible. DBMS

Shankar chhetri
Page | 18
Database Management System

software empowers users to create, update, and manage databases with enhanced
efficiency.

Advantages of Database Management Systems:


Data Integrity and Security: DBMS provides a centralized approach to data
management, ensuring data integrity and security. Constraints and rules can be defined
within the system to maintain data consistency and accuracy.

Reduced Data Redundancy: By structuring data in a systematic manner, DBMS


eliminates redundancy, allowing for the efficient sharing of data across different
applications and users, thereby minimizing data duplication.

Improved Data Consistency: DBMS enforces data validation rules and constraints,
ensuring data consistency across various applications and users, thereby enhancing
overall data quality.

Improved Data Access and Availability: DBMS offers efficient data access and
retrieval mechanisms, enabling quick and easy data retrieval. It supports simultaneous
access by multiple users, ensuring data availability.

Improved Data Sharing: DBMS provides a platform for seamless data sharing across
different applications and users, fostering collaboration and decision-making within
organizations.

Improved Data Backup and Recovery: DBMS incorporates robust backup and
recovery mechanisms, safeguarding data against system failures. It enables the restoration
of data to a specific point in time, ensuring data consistency.

Shankar chhetri
Page | 19
Database Management System

Among the popular examples of DBMS is MySQL, an open-source relational database


management system widely utilized across various applications. MySQL supports SQL
(Structured Query Language) for database management and querying, known for its
flexibility and efficiency. Other examples include Oracle Database, Microsoft SQL
Server, PostgreSQL, and MongoDB (a NoSQL database).

Relational Database Management Systems (RDBMS)


A Relational Database Management System (RDBMS) is a software program designed
for creating, managing, and accessing relational databases. These databases organize data
in a structured manner, facilitating storage, retrieval, and analysis of information.

Key Concepts in RDBMS:


Relation: In the context of a relational database, a relation refers to a table that stores
data for specific transactions, such as Property Listings, Customers, or Interactions.

Attributes: Attributes represent the characteristics or properties of objects stored in a


table, corresponding to columns. For instance, attributes in a PropertyListings table could
include "Location," "Type," and "Price."

Tuple: A tuple denotes a row or record in a table, representing a single instance or set of
data. Each row in the PropertyListings table, containing information about a particular
property, constitutes a tuple.

Key: A key is a field or group of fields that uniquely identifies a record in a table,
facilitating the establishment of relationships between tables.

Primary Key: The primary key serves as a unique identifier for each record in a table,
ensuring that each tuple can be uniquely identified. For example, the "PropertyID" in the
PropertyListings table acts as the primary key.

Shankar chhetri
Page | 20
Database Management System

Foreign Key: A foreign key is a field in one table that references the primary key in
another table, establishing a relationship between the two tables. For instance, the
"CustomerID" in the Interactions table could serve as a foreign key referencing the
"CustomerID" in the Customers table.

Normalization
Normalization, in the realm of database design, denotes the process of structuring data in a
manner that minimizes redundancy and enhances data integrity. It involves reorganizing tables
and columns to mitigate inconsistencies and ensure accurate and efficient data storage.

Exploring the Forms of Normalization:

Normalization is categorized into different forms, each identified by a specific normal form
(NF):

1. First Normal Form (1NF): This form addresses the elimination of repeating groups within a
table by breaking it down into smaller, more manageable units. It ensures that each cell within
the table contains a single atomic value, thereby reducing redundancy.

2. Second Normal Form (2NF): Building upon the principles of 1NF, 2NF focuses on
eliminating partial dependencies. It ensures that all non-key attributes within the table are
functionally dependent on the entire primary key, rather than just a portion of it. This step
enhances data integrity and reduces anomalies in the database.

3. Third Normal Form (3NF): 3NF extends the normalization process by addressing transitive
dependencies. It ensures that no non-key attribute within the table is dependent on another non-
key attribute, thereby further enhancing data consistency and integrity.

Illustrating the Normalization Process:

Shankar chhetri
Page | 21
Database Management System

Initially, we begin with an unorganized table containing data that may exhibit redundancy and
dependency issues. Through the normalization process, we systematically transform this table
into a series of normalized forms:

First Normal Form (1NF): This form ensures that each cell within the table contains a single
atomic value, effectively eliminating repeating groups and enhancing data organization.

Shankar chhetri
Page | 22
Database Management System

Second Normal Form (2NF): By eliminating partial dependencies, 2NF ensures that all non-
key attributes are fully functionally dependent on the primary key. This step enhances data
integrity and reduces the risk of anomalies.

Third Normal Form (3NF): Finally, 3NF addresses transitive dependencies, ensuring that no
non-key attribute is dependent on another non-key attribute within the table. This further
enhances data consistency and integrity, completing the normalization process.

Shankar chhetri
Page | 23
Database Management System

In essence, normalization plays a pivotal role in database design by streamlining data


organization, minimizing redundancy, and bolstering data integrity, ultimately facilitating
efficient data management and retrieval.

Conclusion
In conclusion, the operational success of "Mega Build Estate" hinges on the implementation of a
streamlined and efficient database system. This system must adeptly manage property data, client
interactions, and booking processes. Understanding various data models, including hierarchical,
Shankar chhetri
Page | 24
Database Management System

network, and relational, is crucial for crafting effective databases. Among these, the relational
model stands out for its simplicity and scalability, making it a widely preferred choice.

In addition, the entity-relational model and the object-oriented data model offer valuable
advantages such as visual representation and code reuse. Central to relational database
management is a Relational Database Management System (RDBMS), such as MySQL, which
ensures data integrity, reduces redundancy and improves consistency.

In addition, the normalization process plays a key role in improving data integrity by removing
duplicate groups and dependencies. Basically, the strong database system of "Mega Build Estate"
acts as a cornerstone in the real estate market. It not only facilitates smooth operations but also
flexibly adapts to changing business requirements and ensures continued efficiency and success..

Shankar chhetri
Page | 25
Database Management System

Part 2
Introduction
In this project, the objective is to design a relational database management system (RDBMS)
tailored to meet the specific requirements of the client.

Relational Database Management System (RDBMS):


A relational database management system (RDBMS) is a type of database management system
that organizes data into tables and relationships are formed based on common fields. E. F.
Introduced by Codd in 1970, RDBMS structures data consistently and defines relationships
between blocks of data. Key features and concepts are tables as basic data structures, rows
representing individual records, columns storing specific data, primary keys providing unique
row identification, foreign keys establishing relationships between tables, relationships defining
relationships between tables, normalization to reduce redundancy and dependencies, ACID
features to ensure transaction reliability, SQL for database interaction, and integrity constraints
to maintain data consistency.

Relationships between Entities:


One-to-One Relationship: Each row in one table is related to only one row in another table.

Example

Registration_id name
Program_id
1 Hari
1
2 Ram
2

One to many /many to one


Each row in one table can be related to one or more rows in another table, but each row in the
second table is related to only one row in the first table.

Shankar chhetri
Page | 26
Database Management System

Registration_id name
Program_id
1 Hari
1
2 Ram
2

Many to many
Each row in one table can be related to multiple rows in another table, and vice versa.

Program_id Registration_id name


1 1 Hari
2 2 Ram

Client Requirements:
Property Listings Management:
 User-friendly interface for adding, editing, and removing property listings.
 Detailed property information including location, type, price, size, amenities, and
availability status.
 Advanced search and filtering options for potential buyers and tenants.

Customer Relationship Management (CRM):


 CRM module to manage customer interactions, leads, inquiries, appointments, follow-
ups, and property reviews.
 Centralized customer database.

Shankar chhetri
Page | 27
Database Management System

Online Booking and Reservations:


 User-friendly interface for potential buyers or tenants to reserve or book properties.
 Availability calendars and pricing details.

Data Security and Backup:


 Implementation of industry-standard security measures.
 Regular data backups and a disaster recovery plan.

This comprehensive RDBMS design will cater to the specific needs of the client, ensuring
efficient management of property listings, customer relationships, online bookings, and data
security.

Shankar chhetri
Page | 28
Database Management System

Figure 5 Property Management System ER diagram

Shankar chhetri
Page | 29
Database Management System

Development of Fully Functional Database Management System


To fulfill the client's requirements for a real estate website, a fully functional Database
Management System (DBMS) was developed utilizing various tools and technologies.

Tools and Technologies Used:


 Visual Studio Code (VS Code):
VS Code, a lightweight and feature-rich source code editor by Microsoft, was utilized for its
versatility, speed, and extensive language support. Its user-friendly design and robust extensions
environment made it an ideal choice for developing the website.

 Front-end Development:
HTML, CSS, and JavaScript formed the fundamental building blocks of the website's front-end.
HTML defined the structure of web pages, CSS enhanced visual presentation and layout, while
JavaScript added interactivity and dynamic content, making the website engaging and
responsive.

 Back-end Development:
Python, renowned for its readability and simplicity, was chosen for backend development. With
frameworks like Django and Flask, Python streamlined backend logic, making development
efficient and scalable. Its clean syntax facilitated rapid development and maintenance of dynamic
web services.

Relational Database Management System (RDBMS) - PostgreSQL:


PostgreSQL, a powerful open-source relational database management tool, was used in
conjunction with pgAdmin, an administration and management tool specifically designed for

Shankar chhetri
Page | 30
Database Management System

PostgreSQL. pgAdmin simplified database management tasks, allowing developers to execute


SQL queries, manage schemas, and monitor server activities efficiently.

Creating the Database:


A PostgreSQL database named "Mega_Build_Estate" was created using pgAdmin 4 to store all
website data.

Figure 6 Creating Database

Shankar chhetri
Page | 31
Database Management System

Shankar chhetri
Page | 32
Database Management System

Creating Tables
Tables were created within the "Mega_Build_Estate" database to store different types of data
required for the website.

Figure 7 creating table for database

As shown above, I created several tables in a database as required.

Shankar chhetri
Page | 33
Database Management System

Figure 8 Creating table for database

Inserting Values:
After creating the tables, values were inserted into them to populate the database with relevant
data.

Shankar chhetri
Page | 34
Database Management System

Figure 9 inserting data in table

Shankar chhetri
Page | 35
Database Management System

Figure 10 Values inserted in table

Program interface
A Python-based program interface was developed using the Flask framework and psycopg2
library to establish communication with the PostgreSQL database. Screenshots of the interface
interacting with the database and user interface were provided.

Shankar chhetri
Page | 36
Database Management System

Query Language Implementation:

SQL (Structured Query Language) was implemented to perform various database operations
such as data retrieval, modification, and deletion. Complex queries were optimized for better
performance.

Shankar chhetri
Page | 37
Database Management System

Figure 11 Complex queries uses

User interface design


The user interface for the web application was designed using HTML, CSS, and JavaScript. It
featured login and registration functionalities, enabling users to access property listings and
make bookings securely. In summary, the development process involved a seamless integration
of front-end and back-end technologies, coupled with efficient database management using
PostgreSQL, to create a robust and user-friendly real estate website.

Figure 12 Costumer Login Page

Shankar chhetri
Page | 38
Database Management System

Figure 13 Registration Page

Shankar chhetri
Page | 39
Database Management System

Figure 14 Home page

Shankar chhetri
Page | 40
Database Management System

Figure 15 Property listing and search page

Shankar chhetri
Page | 41
Database Management System

Figure 16 property detail page

Shankar chhetri
Page | 42
Database Management System

Figure 17 inquiry page

Shankar chhetri
Page | 43
Database Management System

Figure 18 Admin page

Figure 19 Admin Home Page

Figure 20 property list page

Shankar chhetri
Page | 44
Database Management System

Figure 21 Booking List page

Figure 22 Customer list page

Shankar chhetri
Page | 45
Database Management System

Test case
To assess the functionalities and performance of the development system, we conducted a series
of tests, the details of which are outlined below:

Shankar chhetri
Page | 46
Database Management System

Conclusion
In the real estate industry, building a robust relational database management system (RDBMS) is
a key undertaking. This requires the use of various tools and technologies such as Visual Studio
Code, HTML, CSS, JavaScript, Python with the Flask framework and PostgreSQL. Combining
these resources creates an advanced infrastructure that provides Mega Build Estate with a
versatile platform to streamline various aspects of its operations. At the core of this system's
functionality is its ability to provide a user-friendly interface that facilitates operations from
legacy inventory management to customer relationship management (CRM), online backup
functionality and efficient storage allocation. The inclusion of Create, Read, Update, Delete
(CRUD) functionality allows users to seamlessly add, modify and delete lists of database objects,
improving agility and responsiveness.

In addition, the design of the user interface is characterized by its adaptability and flexibility,
which ensures an intuitive and frictionless user experience for customers and internal
stakeholders. By prioritizing usability and accessibility, Mega Build Estate aims to
simultaneously improve customer satisfaction and operational efficiency. Implementation of
such a large-scale database system is not without challenges, as rigorous testing protocols are
required to verify its functionality and performance. Through thorough testing procedures,
potential problems or inefficiencies can be identified and proactively addressed. This ensures
that the final product perfectly meets the goals of the organization and meets the diverse needs of
its customer base. Developing and implementing an inherently robust RDBMS is a major
investment for Mega Build Estate, a cornerstone of its digital infrastructure. Using the latest
technology and best practices in database management, the organization is positioning itself for
sustainable growth and success in the competitive real estate industry.

References

Shankar chhetri
Page | 47
Database Management System

Anon., n.d. Afteracademy. [Online]


Available at: https://afteracademy.com/blog/what-is-data-model-in-dbms-and-what-are-its-types/
[Accessed 23 01 2024].
Anon., n.d. freecodecamp. [Online]
Available at: https://www.freecodecamp.org/news/database-normalization-1nf-2nf-3nf-table-
examples/
[Accessed 25 01 2024].
Anon., n.d. geeksforgeeks. [Online]
Available at: https://www.geeksforgeeks.org/introduction-of-dbms-database-management-
system-set-1/
[Accessed 22 01 2024].
Anon., n.d. Simplilearn. [Online]
Available at: https://www.simplilearn.com/tutorials/sql-tutorial/what-is-normalization-in-sql
[Accessed 25 01 2024].
Anon., n.d. techtarget. [Online]
Available at: https://www.techtarget.com/searchdatamanagement/definition/database
[Accessed 20 01 2024].
Anon., n.d. tutorialspoint. [Online]
Available at: https://www.tutorialspoint.com/Advantages-of-Database-Management-System
[Accessed 26 01 2024].
Anon., n.d. w3schools. [Online]
Available at: https://www.w3schools.com/mysql/mysql_rdbms.asp#:~:text=RDBMS%20stands
%20for%20Relational%20Database,%2C%20Oracle%2C%20and%20Microsoft%20Access.
[Accessed 25 01 2024].

Shankar chhetri
Page | 48

You might also like