Database Assignment#01
Database Assignment#01
1. Efficient Data Organization: Utilizing a DBMS enables DreamHome to efficiently organize and
manage their data, facilitating easy retrieval and access.
2. Enhanced Data Integrity: By enforcing constraints and validations, the DBMS ensures data
integrity, mitigating the occurrence of errors or inconsistencies within the data.
3. Robust Data Security: The DBMS incorporates security features like user authentication and
access controls, providing protection for sensitive information.
5. Scalability for Growth: As DreamHome expands and accommodates more branches or staff,
the DBMS can seamlessly scale to manage increasing data volumes without compromising
performance.
(b) What do you think are the main objects that need to be represented in the database?
Branch Office
Manager
Staff
Property Listings
Clientele
(c) What relationships do you think exist between these main objects?
• Each branch office is overseen by a single manager, who may manage multiple branch
offices (one-to-many relationship).
• Several staff members are associated with each branch office, with each staff member
affiliated with only one branch office (one-to-many relationship).
• Each property listing is affiliated with a specific branch office, and a branch office may
have multiple property listings (one-to-many relationship).
• Multiple clients may express interest in each property listing, and each client may
express interest in multiple property listings (many-to-many relationship).
(d) For each of the objects, what details do you think need to be stored in the database?
1. Branch Office:
- Branch Number (Unique Identifier)
- Location (Address: Street, City, Postcode)
- Contact Details (Telephone Numbers)
- Manager ID (Linked to Manager Table)
2. Manager:
- Manager ID (Unique Identifier)
- Full Name
- Date of Appointment
- Monthly Performance Bonus
3. Staff:
- Staff ID (Unique Identifier)
- Full Name
- Job Title
- Associated Branch Number (Linked to Branch Office Table)
4. Property Listings:
- Property ID (Unique Identifier)
- Location (Address)
- Description
- Price
- Associated Branch Number (Linked to Branch Office Table)
5. Clientele:
- Client ID (Unique Identifier)
- Full Name
- Contact Information
(e) What queries do you think are required?
• Retrieve information on all branch offices along with their respective managers.
• Obtain a list of staff members employed at a particular branch office.
• List all properties overseen by a specific branch office.
• Obtain details of clients interested in a particular property.
• Calculate the total monthly bonus payment for a manager.
• Find properties falling within a specified price range.
• Identify staff members who were hired after a certain date.
• Retrieve client details based on specific criteria such as location or budget.
1.13 Discuss what you consider to be the three most important advantages for the use of a
DBMS for a company like Dream Home and provide a justification for your selection. Discuss
what you consider to be the three most important disadvantages for the use of a DBMS for a
company like dream Home and provide a justification for your selection.
Advantages of Using a DBMS for Dream Home:
2.15 Analyze the DBMS that you are currently using. Determine each system's
compliance with the functions that we would expect to be provided by a DBMS.
What type of language does each system provide? What type of architecture does
each DBMS use? Check the accessibility and extensibility of the system catalog. Is it
possible to export the system catalog to another system?
• The DBMS efficiently organizes and manages data concerning branch offices, managers,
staff, property listings, and clientele by employing tabular structures, ensuring
streamlined storage and retrieval processes.
• Data integrity is maintained through the implementation of constraints like primary keys,
foreign keys, and unique constraints, guaranteeing the consistency and accuracy of the
data and preventing issues such as duplicate records or orphaned references.
• Robust security measures such as user authentication, access control, and encryption
safeguard sensitive data from unauthorized access or alteration, with access privileges
tailored to user roles.
• Concurrency control is managed through locking mechanisms, enabling multiple users to
access and modify data concurrently without conflicts, while transaction management
ensures atomicity, consistency, isolation, and durability (ACID properties).
2.18 database approach uses different data models. Common database models include the
relational model, the network model and the hierarchical model. Which data model should
be chosen under which circumstances and why?
The choice of data model depends on various factors such as the nature of the data, the
requirements of the application, scalability needs, and ease of implementation and
maintenance. Here's a brief overview of each common database model and when it might be
chosen:
1. Relational Model:
Suitable Circumstances: The relational model is widely used and suitable for most
business applications. It's ideal when data relationships can be represented in a tabular
format with rows and columns.
Why: Relational databases provide a structured way to organize data, enforce data
integrity through constraints, and support complex queries using SQL. They are well-
suited for scenarios where data access patterns are diverse and ad-hoc queries are
common.
2. Network Model:
Suitable Circumstances: The network model is more complex and less commonly used
compared to the relational model. It's suitable when data relationships are complex
and hierarchical, and when entities have multiple parent-child relationships.
Why: The network model allows for more flexible relationships between entities,
allowing each record to have multiple parent records. This can be beneficial in scenarios
where the structure of the data is dynamic or evolving and when representing complex
business relationships.
3. Hierarchical Model:
Suitable Circumstances: The hierarchical model organizes data in a tree-like
structure with parent-child relationships. It's suitable for scenarios where data has a
natural hierarchical structure, such as file systems or organizational charts.
Why: The hierarchical model is efficient for representing one-to-many relationships,
where each parent record can have multiple child records but each child record has
only one parent. It's typically used in scenarios where the data access pattern is
predominantly hierarchical in nature.
In summary, the relational model is often the default choice for most applications due to its
simplicity, flexibility, and widespread adoption. However, the network and hierarchical models
may be chosen in specific circumstances where the data structure aligns better with their
inherent characteristics and requirements.
3.18 Examine the documentation sets of Microsoft SQL Server, Oracle, and IBM’s DB2 system
to identify their support for the following:
(a) client–server architecture
(b) Web services
(c) service-oriented architecture
Examining the documentation sets of Microsoft SQL Server, Oracle, and IBM's DB2 system can
provide insights into their support for client-server architecture, web services, and service-
oriented architecture (SOA):
Overall, while all three database systems Microsoft SQL Server, Oracle, and IBM DB2—provide
support for client-server architecture and offer some level of support for web services and
service-oriented architectures, the depth and extent of documentation and support may vary
between them.
3.19 Search the Web for a number of Web services other than the ones discussed in Section
3.2. What do these services have in common? Identify whether the services access a
database.
1. Online Banking Service:
- Common Traits: Secure access to financial accounts, funds transfer, bill payments,
transaction history, and account management.
- Database Access: Online banking services indeed interact with databases to access and
update customer account details, transaction logs, and other pertinent banking
information.
2. E-commerce Platform:
- Common Traits: Product listings, shopping cart features, order processing, payment
handling, customer profiles, and inventory control.
- Database Access: E-commerce platforms depend on databases for storing product
descriptions, customer data, order records, inventory statuses, and transaction
information.