SlideShare a Scribd company logo
1 of 1
1. Draw an ER Diagram for the following scenario: A university consists of a number of
departments. Each department offers several courses. A number of modules make up each
course. Students enrols in a particular course and take modules towards the completion of
that course. Each module is taught by a lecturer from the appropriate department, and
each lecturer tutors a group of students.
2. Draw an ER Diagram for the following scenario : We want to represent information about
products in a database. Each product has a description, a price and a supplier. Suppliers
have addresses, phone numbers, and names. Each address is made up of a street address,
a city, and a postcode.
3. Draw an ER Diagram for the following scenario : A database will be made to store
information about patients in a hospital. On arrival, each patient’s personal details (name,
address, and telephone number) are recorded where possible, and they are given an
admission number. They are then assigned to a particular ward (Accident and Emergency,
Cardiology, Oncology, etc.). In each ward there are a number of doctors and nurses. A
patient will be treated by one doctor and several nurses over the course of their stay, and
each doctor and nurse may be involved with several patients at any given time.
4. Draw an ER Diagram for the following scenario: The company you work for wants to
digitize their time cards. You have been asked to design the database for submitting and
approving time cards. Draw the database ER diagram with the following information:
A timecard should have hours worked and date submitted
Each timecard is associated with exactly one employee
Each timecard should have a unique id
Each timecard has a status: it is either approved, not approved, or pending
Each employee has a unique id
Each employee has a name and address.
Each employee submits a time card every pay period. i.e. In 1 year, they will submit multiple time
cards
Each employee either has direct deposit or physical check as their method of payment
Each employee is associated with exactly one manager
Each manager has a unique id and a name
Each manager is in charge of multiple employees
Each manager approves time cards for multiple employees
5. There exists a database of people who take measurements of trees in various locations. A
person may take measurements of multiple trees, and each tree may be measured multiple
times throughout a number of days. For each and every tree we need to collect
information about to what species does it belong to, what are the latitude and longitude of
the tree. We also need to maintain an identification number for each and every tree.
Whoever the person taking the measurements of the tree , that persons name,unique
identification number,address and role need to be maintained. Whatever the
measurements taken need to maintained separately with the details of what the diameter
and height of the tree , when exactly the measurement has been taken. For each and
measurement taken we have to maintain a record. We also need to correlate with who is
the person who has taken the measurement. Depict an ER diagram for the above scenario.

More Related Content

Similar to SQL practice questions for beginners

Need help with this ASAP- This is Database systems- Please draw out th.pdf
Need help with this ASAP- This is Database systems- Please draw out th.pdfNeed help with this ASAP- This is Database systems- Please draw out th.pdf
Need help with this ASAP- This is Database systems- Please draw out th.pdfStewart29UReesa
 
Case 2 Study the following case study and All answer questi.pdf
Case 2 Study the following case study and All answer questi.pdfCase 2 Study the following case study and All answer questi.pdf
Case 2 Study the following case study and All answer questi.pdfaayushmaany2k14
 
Class lecture notes # 2 (statistics for research)
Class lecture notes # 2 (statistics for research)Class lecture notes # 2 (statistics for research)
Class lecture notes # 2 (statistics for research)Harve Abella
 
Coit20247 ass1 requirementdba1 spec (1)
Coit20247 ass1 requirementdba1 spec (1)Coit20247 ass1 requirementdba1 spec (1)
Coit20247 ass1 requirementdba1 spec (1)Sandeep Ratnam
 
4. case study
4. case study4. case study
4. case studykhoahuy82
 
Maintenance of records and reports copy
Maintenance of records and reports   copyMaintenance of records and reports   copy
Maintenance of records and reports copySaurav Garg
 
Documenting And Reporting
Documenting And ReportingDocumenting And Reporting
Documenting And ReportingTosca Torres
 
Statistics basics
Statistics basicsStatistics basics
Statistics basicsdebmahuya
 
Statistics 1
Statistics 1Statistics 1
Statistics 1Saed Jama
 
9. Documentation, Recording and Reporting.pptx
9. Documentation, Recording and Reporting.pptx9. Documentation, Recording and Reporting.pptx
9. Documentation, Recording and Reporting.pptxAme Mehadi
 
Draw an EER diagram according to the notations discussed in class to a.pdf
Draw an EER diagram according to the notations discussed in class to a.pdfDraw an EER diagram according to the notations discussed in class to a.pdf
Draw an EER diagram according to the notations discussed in class to a.pdfabc2232
 
PROJECT-HOSPITAL MANAGEMENT SYSTEM CHAP. 1 TO 4
PROJECT-HOSPITAL MANAGEMENT SYSTEM CHAP. 1 TO 4PROJECT-HOSPITAL MANAGEMENT SYSTEM CHAP. 1 TO 4
PROJECT-HOSPITAL MANAGEMENT SYSTEM CHAP. 1 TO 4NICHOLAS RATEMO
 
INSTITUTIONAL RECORD AND REPORTS.pptx
INSTITUTIONAL RECORD AND REPORTS.pptxINSTITUTIONAL RECORD AND REPORTS.pptx
INSTITUTIONAL RECORD AND REPORTS.pptxvikaskushwaha86
 
Draw an EER diagram according to the notations discussed in class to a.docx
Draw an EER diagram according to the notations discussed in class to a.docxDraw an EER diagram according to the notations discussed in class to a.docx
Draw an EER diagram according to the notations discussed in class to a.docxBlakeSGMHemmingss
 
Health care facilities treat many types of For.docx
Health care facilities treat many types of For.docxHealth care facilities treat many types of For.docx
Health care facilities treat many types of For.docxstudywriters
 
PART IHCA270 Health Care Finance PART I - Contractual AllowanceBa.docx
PART IHCA270 Health Care Finance PART I - Contractual AllowanceBa.docxPART IHCA270 Health Care Finance PART I - Contractual AllowanceBa.docx
PART IHCA270 Health Care Finance PART I - Contractual AllowanceBa.docxherbertwilson5999
 
Nursing records & reports
Nursing records & reportsNursing records & reports
Nursing records & reportsjasleenbrar03
 

Similar to SQL practice questions for beginners (20)

Introduction To Database Design.pptx
Introduction To Database Design.pptxIntroduction To Database Design.pptx
Introduction To Database Design.pptx
 
Need help with this ASAP- This is Database systems- Please draw out th.pdf
Need help with this ASAP- This is Database systems- Please draw out th.pdfNeed help with this ASAP- This is Database systems- Please draw out th.pdf
Need help with this ASAP- This is Database systems- Please draw out th.pdf
 
Documenting and reporting
Documenting and reportingDocumenting and reporting
Documenting and reporting
 
Case 2 Study the following case study and All answer questi.pdf
Case 2 Study the following case study and All answer questi.pdfCase 2 Study the following case study and All answer questi.pdf
Case 2 Study the following case study and All answer questi.pdf
 
Class lecture notes # 2 (statistics for research)
Class lecture notes # 2 (statistics for research)Class lecture notes # 2 (statistics for research)
Class lecture notes # 2 (statistics for research)
 
Coit20247 ass1 requirementdba1 spec (1)
Coit20247 ass1 requirementdba1 spec (1)Coit20247 ass1 requirementdba1 spec (1)
Coit20247 ass1 requirementdba1 spec (1)
 
4. case study
4. case study4. case study
4. case study
 
Maintenance of records and reports copy
Maintenance of records and reports   copyMaintenance of records and reports   copy
Maintenance of records and reports copy
 
Documenting And Reporting
Documenting And ReportingDocumenting And Reporting
Documenting And Reporting
 
Statistics basics
Statistics basicsStatistics basics
Statistics basics
 
Statistics 1
Statistics 1Statistics 1
Statistics 1
 
9. Documentation, Recording and Reporting.pptx
9. Documentation, Recording and Reporting.pptx9. Documentation, Recording and Reporting.pptx
9. Documentation, Recording and Reporting.pptx
 
Draw an EER diagram according to the notations discussed in class to a.pdf
Draw an EER diagram according to the notations discussed in class to a.pdfDraw an EER diagram according to the notations discussed in class to a.pdf
Draw an EER diagram according to the notations discussed in class to a.pdf
 
PROJECT-HOSPITAL MANAGEMENT SYSTEM CHAP. 1 TO 4
PROJECT-HOSPITAL MANAGEMENT SYSTEM CHAP. 1 TO 4PROJECT-HOSPITAL MANAGEMENT SYSTEM CHAP. 1 TO 4
PROJECT-HOSPITAL MANAGEMENT SYSTEM CHAP. 1 TO 4
 
Funding for Standing Frames
Funding for Standing FramesFunding for Standing Frames
Funding for Standing Frames
 
INSTITUTIONAL RECORD AND REPORTS.pptx
INSTITUTIONAL RECORD AND REPORTS.pptxINSTITUTIONAL RECORD AND REPORTS.pptx
INSTITUTIONAL RECORD AND REPORTS.pptx
 
Draw an EER diagram according to the notations discussed in class to a.docx
Draw an EER diagram according to the notations discussed in class to a.docxDraw an EER diagram according to the notations discussed in class to a.docx
Draw an EER diagram according to the notations discussed in class to a.docx
 
Health care facilities treat many types of For.docx
Health care facilities treat many types of For.docxHealth care facilities treat many types of For.docx
Health care facilities treat many types of For.docx
 
PART IHCA270 Health Care Finance PART I - Contractual AllowanceBa.docx
PART IHCA270 Health Care Finance PART I - Contractual AllowanceBa.docxPART IHCA270 Health Care Finance PART I - Contractual AllowanceBa.docx
PART IHCA270 Health Care Finance PART I - Contractual AllowanceBa.docx
 
Nursing records & reports
Nursing records & reportsNursing records & reports
Nursing records & reports
 

More from Mohd Tousif

Sql basics and DDL statements
Sql basics and DDL statementsSql basics and DDL statements
Sql basics and DDL statementsMohd Tousif
 
SQL practice questions set
SQL practice questions setSQL practice questions set
SQL practice questions setMohd Tousif
 
Introduction to Databases
Introduction to DatabasesIntroduction to Databases
Introduction to DatabasesMohd Tousif
 
Entity Relationship Model - An Example
Entity Relationship Model - An ExampleEntity Relationship Model - An Example
Entity Relationship Model - An ExampleMohd Tousif
 
Entity Relationship (ER) Model
Entity Relationship (ER) ModelEntity Relationship (ER) Model
Entity Relationship (ER) ModelMohd Tousif
 
SQL Practice Question set
SQL Practice Question set SQL Practice Question set
SQL Practice Question set Mohd Tousif
 
Introduction to Databases - Assignment_1
Introduction to Databases - Assignment_1Introduction to Databases - Assignment_1
Introduction to Databases - Assignment_1Mohd Tousif
 
Data Definition Language (DDL)
Data Definition Language (DDL) Data Definition Language (DDL)
Data Definition Language (DDL) Mohd Tousif
 
Data Warehouse Concepts and Architecture
Data Warehouse Concepts and ArchitectureData Warehouse Concepts and Architecture
Data Warehouse Concepts and ArchitectureMohd Tousif
 
SQL practice questions set - 2
SQL practice questions set - 2SQL practice questions set - 2
SQL practice questions set - 2Mohd Tousif
 
SQL practice questions - set 3
SQL practice questions - set 3SQL practice questions - set 3
SQL practice questions - set 3Mohd Tousif
 
Oracle sql tutorial
Oracle sql tutorialOracle sql tutorial
Oracle sql tutorialMohd Tousif
 
Sql (Introduction to Structured Query language)
Sql (Introduction to Structured Query language)Sql (Introduction to Structured Query language)
Sql (Introduction to Structured Query language)Mohd Tousif
 
System components of windows xp
System components of windows xpSystem components of windows xp
System components of windows xpMohd Tousif
 

More from Mohd Tousif (20)

Sql commands
Sql commandsSql commands
Sql commands
 
Sql basics and DDL statements
Sql basics and DDL statementsSql basics and DDL statements
Sql basics and DDL statements
 
SQL practice questions set
SQL practice questions setSQL practice questions set
SQL practice questions set
 
Introduction to Databases
Introduction to DatabasesIntroduction to Databases
Introduction to Databases
 
Entity Relationship Model - An Example
Entity Relationship Model - An ExampleEntity Relationship Model - An Example
Entity Relationship Model - An Example
 
Entity Relationship (ER) Model
Entity Relationship (ER) ModelEntity Relationship (ER) Model
Entity Relationship (ER) Model
 
SQL Practice Question set
SQL Practice Question set SQL Practice Question set
SQL Practice Question set
 
Introduction to Databases - Assignment_1
Introduction to Databases - Assignment_1Introduction to Databases - Assignment_1
Introduction to Databases - Assignment_1
 
Data Definition Language (DDL)
Data Definition Language (DDL) Data Definition Language (DDL)
Data Definition Language (DDL)
 
Data Warehouse Concepts and Architecture
Data Warehouse Concepts and ArchitectureData Warehouse Concepts and Architecture
Data Warehouse Concepts and Architecture
 
SQL practice questions set - 2
SQL practice questions set - 2SQL practice questions set - 2
SQL practice questions set - 2
 
SQL practice questions - set 3
SQL practice questions - set 3SQL practice questions - set 3
SQL practice questions - set 3
 
Oracle sql tutorial
Oracle sql tutorialOracle sql tutorial
Oracle sql tutorial
 
Sql (Introduction to Structured Query language)
Sql (Introduction to Structured Query language)Sql (Introduction to Structured Query language)
Sql (Introduction to Structured Query language)
 
Sql commands
Sql commandsSql commands
Sql commands
 
Virtual box
Virtual boxVirtual box
Virtual box
 
Deadlock
DeadlockDeadlock
Deadlock
 
Algorithm o.s.
Algorithm o.s.Algorithm o.s.
Algorithm o.s.
 
System components of windows xp
System components of windows xpSystem components of windows xp
System components of windows xp
 
Ipc
IpcIpc
Ipc
 

Recently uploaded

Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024The Digital Insurer
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 

Recently uploaded (20)

Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 

SQL practice questions for beginners

  • 1. 1. Draw an ER Diagram for the following scenario: A university consists of a number of departments. Each department offers several courses. A number of modules make up each course. Students enrols in a particular course and take modules towards the completion of that course. Each module is taught by a lecturer from the appropriate department, and each lecturer tutors a group of students. 2. Draw an ER Diagram for the following scenario : We want to represent information about products in a database. Each product has a description, a price and a supplier. Suppliers have addresses, phone numbers, and names. Each address is made up of a street address, a city, and a postcode. 3. Draw an ER Diagram for the following scenario : A database will be made to store information about patients in a hospital. On arrival, each patient’s personal details (name, address, and telephone number) are recorded where possible, and they are given an admission number. They are then assigned to a particular ward (Accident and Emergency, Cardiology, Oncology, etc.). In each ward there are a number of doctors and nurses. A patient will be treated by one doctor and several nurses over the course of their stay, and each doctor and nurse may be involved with several patients at any given time. 4. Draw an ER Diagram for the following scenario: The company you work for wants to digitize their time cards. You have been asked to design the database for submitting and approving time cards. Draw the database ER diagram with the following information: A timecard should have hours worked and date submitted Each timecard is associated with exactly one employee Each timecard should have a unique id Each timecard has a status: it is either approved, not approved, or pending Each employee has a unique id Each employee has a name and address. Each employee submits a time card every pay period. i.e. In 1 year, they will submit multiple time cards Each employee either has direct deposit or physical check as their method of payment Each employee is associated with exactly one manager Each manager has a unique id and a name Each manager is in charge of multiple employees Each manager approves time cards for multiple employees 5. There exists a database of people who take measurements of trees in various locations. A person may take measurements of multiple trees, and each tree may be measured multiple times throughout a number of days. For each and every tree we need to collect information about to what species does it belong to, what are the latitude and longitude of the tree. We also need to maintain an identification number for each and every tree. Whoever the person taking the measurements of the tree , that persons name,unique identification number,address and role need to be maintained. Whatever the measurements taken need to maintained separately with the details of what the diameter and height of the tree , when exactly the measurement has been taken. For each and measurement taken we have to maintain a record. We also need to correlate with who is the person who has taken the measurement. Depict an ER diagram for the above scenario.