Semester 3, Computer Science and Engineering
The portfolio is a result of academic work and real-world experience that has been backed with a good grasp of database management systems. It points out competencies in database system areas including database schema design, relational algebra, SQL programming, and normalization, as well as practical work such as course assignments.
Wonderfully clear and easy to understand, the site provides detailed information about the creator’s processes and showcases innovative approaches to building complex and large databases. It is informative, with opportunities for interaction and personalization, thus creating a collaboration space.
I am a database enthusiast with a strong passion for designing efficient and scalable database systems.
Fun Fact: I love solving puzzles and designing efficient workflows!
To design the ER diagram, I utilized the online Canva tool. It provided an intuitive platform to identify entities and their attributes after analyzing the given pharmacy database. For converting the ER model into a relational schema, Dbdiagram.io proved to be a highly effective tool. It simplified the process by generating tables and attributes with minimal effort. Finally, I executed the queries using Oracle SQL Developer, ensuring practical implementation and testing.
This is an Entity-Relationship (ER) diagram used for database modeling. Its purpose is to represent the structure and relationships between various entities in a business context, such as employees, departments, projects, and dependents. The goal of the diagram is to serve as a blueprint for designing a relational database that organizes and manages data efficiently.
Challenge: Designing Many-to-Many Relationships
Problem: Representing relationships like WORKS_ON (between EMPLOYEE and PROJECT) while maintaining data consistency and allowing for attributes such as Hours.
Solution: Introduced a relationship entity with attributes and appropriate primary and foreign keys during the relational schema design phase to capture the details and eliminate redundancy.
Challenge: Handling Recursive Relationships
Problem: Modeling recursive relationships such as SUPERVISION where an EMPLOYEE supervises other employees.
Solution: Added self-referencing relationships with clear cardinality constraints (1:N) to represent the hierarchy.
Working with the employee database has been an enriching experience, helping me understand entity relationships and their interconnections, such as EMPLOYEE, DEPARTMENT, and PROJECT through WORKS_FOR, MANAGES, and WORKS_ON. It highlighted the importance of clear cardinalities and constraints like primary and foreign keys for maintaining data integrity. I also gained valuable insights into designing recursive relationships (e.g., SUPERVISION) and weak entities (e.g., DEPENDENT), enhancing my ability to handle complex database requirements. This project improved my skills in creating normalized, robust database schemas suited for real-world applications.
This database represents a simple sales management system, consisting of four tables: CUSTOMERS, ORDERS, LINEITEMS, and ITEMS. It organizes customer information, orders placed by customers, the items included in those orders, and their details. The relationships between tables are defined using primary and foreign keys, ensuring referential integrity.
- Define the structure of the database tables (CUSTOMERS, ORDERS, LINEITEMS, ITEMS).
- Modify the structure of existing tables, for example, adding a new column.
- Delete tables from the database.
- Add records to the database tables.
- Modify existing records in the database.
- Remove records from the database.
- Calculate the total value of items ordered.
- Count the number of orders placed by a customer.
- Find the most expensive order item.
- Use a query within another query, for example, to find customers who have ordered specific items.
- Calculate the total order value for customers with the highest number of orders.Working with the orders database enhanced my understanding of SQL by teaching me how to use DDL commands to structure and organize data, and DML commands for inserting, updating, and deleting records. I gained insights into using aggregate functions like SUM, AVG, and COUNT for data analysis, as well as how to work with nested and correlated subqueries for complex queries. Implementing structured queries like joins enabled me to retrieve and analyze data from multiple tables. This experience improved my SQL skills and deepened my understanding of relational databases, preparing me for more complex tasks in database management and analysis.
Normalization is the process of organizing a database to minimize redundancy and dependency by dividing tables into smaller, more manageable pieces. It ensures that data is stored efficiently and consistently. The key goals of normalization include:
Transaction processing ensures the integrity and reliability of operations within a database, particularly in multi-user environments. A transaction is a sequence of operations performed as a single logical unit of work, adhering to the ACID properties:
Learning about normalization and transaction processing has been invaluable in understanding how databases ensure efficiency and reliability. Normalization taught me to organize data by eliminating redundancy, maintaining consistency, and simplifying queries through well-structured tables and normal forms. Transaction processing provided insights into maintaining data integrity through ACID properties, ensuring reliable operations in multi-user environments. Concepts like rollbacks and locking mechanisms highlighted how databases handle failures and prevent conflicts. Overall, these concepts enhanced my appreciation for the balance of efficiency, reliability, and accuracy in database design.
Below are the SQL codes for structured enquiry tasks completed. Each task represents a critical learning step in understanding and mastering SQL concepts.