0% found this document useful (0 votes)
14 views2 pages

Database Systems Assignment Overview

The document outlines an assignment for a database systems course, consisting of two questions. The first question requires designing an ER diagram for a company database with specified entities, attributes, and relationships, while the second question involves writing SQL queries based on a given database schema. Students must submit their work as a single PDF file named with their student ID.

Uploaded by

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

Database Systems Assignment Overview

The document outlines an assignment for a database systems course, consisting of two questions. The first question requires designing an ER diagram for a company database with specified entities, attributes, and relationships, while the second question involves writing SQL queries based on a given database schema. Students must submit their work as a single PDF file named with their student ID.

Uploaded by

jwr15778002438
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Fundamentals of Database Systems

Assignment 1

Note: there is no requirement on ER diagram drawing. You are allowed to draw ER diagrams
using any tool. But you need to make sure that your drawing is clear enough. If the diagrams
are not clear, points will be deducted.

For the submission, please pack all files and convert them into A SINGLE PDF FILE. Rename
the PDF file as [Link], where XXXX is your student ID.

Q1. Suppose you are the manager of a company. You want to design an ER diagram for your
company under the following assumptions. [Remember to express all cardinality and
participation constraints in your diagram.] (50 marks)

The company database has the following entity sets:

- Each person is described as ID, name, gender, age and address.


- Some people are employee. Each employee has an employee ID, salary and position.
- Some people are customers. Each customer has a customer ID. Note that the employee
cannot be the customer.
- The company has several departments. Each department has a department name,
location, phone number.
- Each product series has a series name, product type, and target consumer type.
- Each product has a model and price. Note that the product is a weak entity set which
depends on product series.

The company database has the following relationship sets:

- Each department has a unique manager, who is an employee. An employee can be the
manager for at most one department.
- Each employee works for a unique department. Each department contains more than
one employee.
- Some departments can design product series. Each product series is designed by at most
one department.
- Each product series has one or multiple products.
- Some customers buy some products from the company. For such purchasing, we want
to know the purchasing date and payment method.

You do not need to make more assumptions on your design.


Q2. The schema of a database is given as follows. Keys are underlined. (This database is
independent to the example database in lectures. Please do not be confused.)

- 𝑠𝑡𝑢𝑑𝑒𝑛𝑡 = (𝑠𝐼𝐷, 𝑠𝑛𝑎𝑚𝑒, 𝑔𝑒𝑛𝑑𝑒𝑟, 𝑔𝑝𝑎, 𝑚𝑎𝑗𝑜𝑟, 𝑝ℎ𝑜𝑛𝑒)


- 𝑖𝑛𝑠𝑡𝑟𝑢𝑐𝑡𝑜𝑟 = (𝑖𝐼𝐷, 𝑖𝑛𝑎𝑚𝑒, 𝑔𝑒𝑛𝑑𝑒𝑟, 𝑝𝑜𝑠𝑖𝑡𝑖𝑜𝑛, 𝑑𝑒𝑝𝑎𝑟𝑡𝑚𝑒𝑛𝑡)
- 𝑐𝑜𝑢𝑟𝑠𝑒 = (𝑐𝐼𝐷, 𝑐𝑛𝑎𝑚𝑒, 𝑐𝑟𝑒𝑑𝑖𝑡)
- 𝑒𝑛𝑟𝑜𝑙𝑙 = (𝑠𝐼𝐷, 𝑐𝐼𝐷, 𝑠𝑒𝑚𝑒𝑠𝑡𝑒𝑟, 𝑔𝑟𝑎𝑑𝑒)
- 𝑡𝑒𝑎𝑐ℎ = (𝑖𝐼𝐷, 𝑐𝐼𝐷, 𝑠𝑒𝑚𝑒𝑠𝑡𝑒𝑟)

Write a query for each following question. Assuming students’ name and instructors’ name are
unique. (10 marks for each)

a) Find the name and credit of the courses instructed by Bruce.


b) Find the name of the students who have taken a course instructed by Bruce.
c) Find the name of the instructors who teach more than one courses in a semester.
d) Count the number of courses and total number of course credits that each students fail
(grade equals to “F”). List the student’s name, number of failed courses and total
number of credits of failed courses in your result.
e) Find the names of students whose earned credits exceed 42 (>42). (If the student does
not fail the course, then he will earn the full credits.)

Common questions

Powered by AI

Using the same identifier across different roles can lead to identity conflicts, erroneous data entries, and difficulties in maintaining data integrity. This can complicate query processes, create ambiguities during data retrieval, and necessitate sophisticated constraints and checks to maintain database quality and prevent overlap between disparate roles, leading to increased complexity in database management .

Cardinality and participation constraints specify how many instances of an entity can be associated with instances of another entity and the requirement of such an association. Omitting these constraints in a company's database design can lead to incomplete or ambiguous relationships, which may result in data anomalies and integrity issues. These constraints help ensure accurate representation of business rules and avoid errors in data integrity and retrieval processes .

Defining comprehensive entity and relationship sets provide a blueprint for organizing and maintaining data consistency, supporting efficient data retrieval, and ensuring all necessary business processes are represented. They help identify potential data redundancy, establish relationships between business components, and serve as a foundational guideline for future database modifications or augmentations, thereby fostering improved data management within the organization .

Having more than one employee per department ensures workload distribution, promotes departmental robustness, and provides continuity in operations. Structurally, this stipulation necessitates implementing relationships and constraints that accommodate multiple associations and ensure that the system can effectively query databases for department-specific operations without encountering null values or other anomalies .

Participation constraints ensure that instructors have obligatory teaching assignments, facilitating balanced workloads and resource allocation. Ignoring these constraints can lead to discrepancies in instructor utilization, inaccurate department reporting, and potential instructional gaps in courses offered, all of which can affect academic scheduling, resource planning, and student experiences .

Tracking payment methods and purchasing dates helps in understanding customer preferences, spending patterns, and seasonal trends, thereby enabling data-driven decision making. This data supports targeted marketing strategies, customer relationship management, inventory planning, and financial forecasting, thereby enhancing operational efficiency and strategic planning capabilities for future business growth .

The constraint that an employee cannot simultaneously be a customer ensures that the company's data remains clean and roles are distinctly separated. This separation avoids conflicts of interest and maintains the integrity of the database by preventing overlapping identifier usage and role responsibilities, thus ensuring clarity in data queries and reporting .

By specifying that a product series must have one or multiple products, the database structure ensures complete representation of the product line, preventing instances of unfulfilled product series. This constraint influences the queries to effectively track product sales, inventory management, and ensure that no orphaned product series exist, ultimately supporting comprehensive product analysis and strategic planning .

Not enforcing the relationship that each department must have more than one employee can result in data integrity issues, such as departments being improperly represented in business processes or operations being hindered due to lack of adequate staffing. This can complicate performance evaluations, budget allocations, and strategic planning derived from database queries, thus undermining effective resource utilization and operational planning .

A manager must ensure that ER diagrams are legible, logically structured, and accurately represent all entities, relationships, and constraints. Utilizing clear labeling and established diagramming techniques enhances readability. Unclear diagrams can lead to misinterpretations, misrepresentations of the database model, and consequently, incorrect data modeling. This can affect the assessment by leading to deductions in points or requests for resubmission .

You might also like