0% found this document useful (0 votes)
17 views7 pages

DB - Principles - Tutorial 3

tutorial

Uploaded by

kelim1009
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)
17 views7 pages

DB - Principles - Tutorial 3

tutorial

Uploaded by

kelim1009
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

1.

Describe merits and demerits of database types


{Centralized Database, Distributed Database, NoSQL
databases, Cloud Database, Relational databases,
Network databases, Object-oriented databases and
Hierarchical databases}

2. With examples explain SaaS, PaaS and IaaS

3. Build an ER Diagram for the following


information:
 Students- Have an ID, Name, Login, Age, GPA
 Courses - Have an ID, Name, Credit Hours
 Students enroll in courses- Enrolment_no, date,
type

4. In the below ER Diagram, ‘Payment’ is the weak


entity. ‘Loan Payment’ is the identifying relationship
and ‘Payment Number’ is the partial key. Primary Key
of the Loan along with the partial key would be used
to identify the records.
Solutions:
Here’s a detailed response to your questions:

### 1. Merits and Demerits of Database Types

#### Centralized Database


- **Merits:**
- Easier to manage and maintain.
- Simplified backup and recovery processes.
- Consistency of data is ensured.
- **Demerits:**
- Vulnerable to a single point of failure.
- Limited accessibility; users must access from a central location.
- Performance may degrade with a high number of concurrent users.

#### Distributed Database


- **Merits:**
- Improved performance as data can be processed locally.
- Greater reliability; if one node fails, others can still function.
- Scalable by adding more nodes.

- **Demerits:**
- Complexity in management and administration.
- Data consistency can be challenging to maintain.
- Network issues can affect access and performance.

#### NoSQL Databases


- **Merits:**
- Flexible schema design; handles unstructured data well.
- High scalability and performance for large datasets.
- Suitable for real-time data processing.

- **Demerits:**
- Limited transaction support compared to relational databases.
- Less mature than relational databases; fewer tools and resources.
- Data integrity may be harder to enforce.

#### Cloud Database


- **Merits:**
- High availability and redundancy.
- Cost-effective; pay for what you use.
- Easy scalability and automatic updates.

- **Demerits:**
- Security concerns regarding data privacy and compliance.
- Dependence on internet connectivity.
- Potential for vendor lock-in.

#### Relational Databases


- **Merits:**
- Strong data integrity and ACID compliance.
- Well-defined schema for structured data.
- Powerful querying capabilities (SQL).

- **Demerits:**
- Limited scalability for very large datasets.
- Rigid schema can be a drawback for evolving data requirements.
- Performance can lag with complex queries.

#### Network Databases


- **Merits:**
- More complex relationships can be represented.
- Allows for more flexible data modeling than hierarchical databases.
- Efficient for certain types of applications.

- **Demerits:**
- Complexity in database design and management.
- Less popular, leading to a smaller community and fewer resources.
- Difficulties in understanding and navigating the database structure.

#### Object-oriented Databases


- **Merits:**
- Seamlessly integrates with object-oriented programming languages.
- Supports complex data types and structures.
- Better representation of real-world entities.

- **Demerits:**
- Less mature than relational databases, with a smaller user base.
- Steeper learning curve for users unfamiliar with OOP concepts.
- Limited support for standard querying languages like SQL.
#### Hierarchical Databases
- **Merits:**
- Simple, easy-to-understand structure.
- Fast data retrieval for certain types of queries.
- Efficient for one-to-many relationships.

- **Demerits:**
- Rigid structure can make changes difficult.
- Poor handling of many-to-many relationships.
- Limited querying capabilities beyond simple hierarchies.

### 2. Examples of SaaS, PaaS, and IaaS

- **Software as a Service (SaaS):**


- **Example:** Google Workspace (Docs, Sheets, Drive)
- **Description:** Applications are hosted in the cloud and accessed via a web
browser without installation.

- **Platform as a Service (PaaS):**


- **Example:** Heroku
- **Description:** Provides a platform allowing developers to build, run, and
manage applications without dealing with the infrastructure.

- **Infrastructure as a Service (IaaS):**


- **Example:** Amazon Web Services (AWS) EC2
- **Description:** Provides virtualized computing resources over the internet,
allowing users to rent servers and storage.

### 3. ER Diagram for Students and Courses

Here’s a textual representation of the ER Diagram:

```
[Students]
- ID (Primary Key)
- Name
- Login
- Age
- GPA

[Courses]
- ID (Primary Key)
- Name
- Credit Hours

[Enrollment]
- Enrolment_no (Primary Key)
- Date
- Type
- Student_ID (Foreign Key referencing Students.ID)
- Course_ID (Foreign Key referencing Courses.ID)
```

### 4. Explanation of Weak Entity and ER Diagram Concept

In the given scenario:


- **Weak Entity:** Payment
- **Identifying Relationship:** Loan Payment
- **Partial Key:** Payment Number

To identify records uniquely, both the primary key of the Loan (e.g., Loan ID) and
the partial key (Payment Number) are used together.

This concept illustrates how weak entities depend on strong entities for their
identification. The ER diagram would visually represent these relationships,
showing how the weak entity connects to the identifying relationship and the
strong entity.

If you need a visual representation of the ER diagram or any other assistance, let
me know!

You might also like