Need help todesign ER Diagram - erd

How can i design this ER Diagram
The Ministry of Transportation (MOT) supplies department keeps track of all the items (furniture and equipment such as a chair or printer) in the Ministry offices. There are several MOT buildings and each one is given a different name to identify it. Each item is assigned a unique ID when it is purchased. This ID is used to keep track of the item, which is assigned to a room within a building. Each room within a building is assigned to a department, and each department has a single employee as its manager.

i am trying several time but can't understand what to do.If anyone can simplified then it can be much easier for me.

Related

How to show only highest education in OBIEE

Good evening everyone,
I am using OBIEE and I am trying to extract a file containing some candidates' information to keep in our records, as my organization will need to delete most data soon.
I have data related to recruiting that people put in their applications for job vacancies.
I am trying to have a single row per candidate per application (i.e. if a candidate applied to 2 different jobs, it will count as 2 rows), and insert the highest education, the related insitution, their most recent job title, and the most recent employer name.
I have these facts:
ID,
degree_type,
institution,
job title,
employer.
and they all have the starting date and the graduation date.
When I extract the report, I get something like this:
ID
degree_type
institution
job_title
employer
001
Doctorate
Univ. A
eater
google
001
Master's
Univ. B
sleeper
samsung
001
Other
Univ. A
jumper
apple
002
Bachelor's
Univ. C
clapper
nutella
002
Master's
Univ. D
somethinger
fujitsu
002
Doctorate
Univ. A
somethinger
fujitsu
003
Other
Univ. E
eater
EU
003
Doctorate
Univ. Z
spy
UN
As you can see, each person might or might not have different levels of education, and when I extract this analysis, I have one ID with multiple rows, as many as every degree and every job experience, sorted by chronological order.
This creates some readability issues. Besides, we only want the highest degree and the most recent job.
So something like this.
ID
degree_type
institution
job_title
employer
001
Doctorate
Univ. A
eater
google
002
Doctorate
Univ. A
somethinger
fujitsu
003
Doctorate
Univ. Z
eater
EU
Instead, when I try to apply filters or step, I can only manage to obtain a result based on either
A) the most recent degree and the most recent employer, or
B) each degree and each work experience that was carried out in the same time period of the degree.
Option A does not work for multiple reasons, e.g., if someone got a certification after a PhD, I will have a person with "other" whereas they should have "doctorate"
Option B is not useful at the moment, as we only want one row. Besides, if I worked after getting a degree, that work experience would not appear as it only shows the work carried out during the studies.
I am new with OBIEE, and I am not familiar with SQL. I usually use R, and for completely different reasons.
If I could assign a value to each degree and then filter by the highest (eg., IF there is a doctorate, THEN show it and STOP. ELSE show master's. IF not master's and doctorate, THEN show bachelor's and STOP.) And then add the work experience by date, that would be great.
Is there a way to do this?
Thank you so much! And apologies if it does not make any sense.
PS> I saw this reply already How To Get Highest Education Using MySQL?
but that person has multiple columns for each degree, whereas I have them altogether.
I am assuming that OBIEE is just a DB and you can use SQL to get the info.
I also assume that the ID column you provide represents unique ID per Employee.
Your task requires intermediate if not advanced SQL techniques to solve. Here are the steps.
you need to codify the sort order of the degree level - in 3NF (third normal form) you would add a reference table to store one row per degree and include degree_name varchar column (primary key) to equal the values you list in your post, but then another column degree_sort integer that sorts the degrees the way you want. You would join to this table on the varchar value and return the degree_sort value
Handling ties: Another complexity is how to handle the possibility of a employee having multiple jobs at the doctorate (I presume that is the highest) education level - you would need a "start_date" or some data point to break ties.
Here's a stack post that explains an analogous scenario, getting the record that represents the latest revision of a document (revision is your degree level, document is your employee ID):
https://stackoverflow.com/a/38854846/1279373
Your partition clause would be:
PARTITION BY id ORDER BY degree_sort DESC, start_date DESC
Note: The where clause (see sql in the referred to answer) handles "return only the rows with rank 1"; use ASC (ascending) and DESC (descending) in the ORDER BY clause to rank "low to high" or "high to low".

Determining if street address is within city limits

I am attempting to determine if a U.S. address is within city limits or not. (Another example is if an address resides within a particular county or not).
For example, we are creating a website allowing a city to sell its pet licenses. If, for example, the address is for W. Lafayette, Indiana, but the home is just outside of the established city limits, we want our website to be able to notify the user that they do not need to buy a pet license (otherwise when the city sees it, they need to refund that money to the pet owner).
Google Maps obviously knows city boundaries. For example, when you view W. Lafayette, IN, on the map you can see a red line and light red shading showing the city limits: (example)
My question: how do I determine if an address is contained within that bordered area? (I'm hoping for perhaps the ability to send lat/lng to an API to determine if it is contained within that region... or some other ideas as to how to do this?)
Side note: postal code is not enough. There are many instances where an address can have a city, state, zip that is the same whether the home is in or out of city limits.
Thank you.
Tom

how to implement collection interface

In an institute following information is maintained about the students:
Student Class
Roll Number (Unique identifier of the student)
First Name
Last Name
Year Of Study
Activity Choice
For each of the following scenarios, specify which of the four core collection interfaces will be most appropriate and why. If you feel, more than one interface is suitable, you can mention all of them. Also describe briefly, why you think so.
1.Every week, a student is chosen at random as in charge of the Mess Food committee.
2.The students are allowed to choose a recreation activity to be provided by the institute in the common room. List of unique activities is to be prepared to be provided by the institute.
3.We need to know how many students have opted for each activity. So count the number of students who have the same activity.
4.The institute provides a career counselor for students who visit the institute once a week. Each student can book a slot with the counselor. Create a waiting list of students for the forthcoming weekly visit.

Input multiple field data through a form in Access 2010

Thanks to all in advance for their help and input.
I have a growing business where I work with small university sports teams in lining up hotel accommodations when they play at other universities. Using Access 2010, I have one data table for hotels and a corresponding form where I can input and update hotel information. Then I have another data table where I track proximity to universities by hotel. So, for example, if I have a team playing in St. Louis, I might have one hotel with close proximity to UM St. Louis, Missouri Baptist, and Washington University.
My goal is to be able to input multiple universities and their corresponding distance from hotel on my hotel input form and obviously have my proximity table updated with the input. I've created the relationship in the form to link the two tables together, created multiple combo boxes with the intent of inputting more than one can only input one university at present.
Can someone suggest a methodology for achieving this? Thank you once again for the assistance.

To draw ER diagram of manufacurer sells products?

I am learning the data model and came accross this situation where a relationship SELLS between manufacturer and Products entities. I don't know how to represent the bolded statements in the question below:
" Manufacturers are identified by their name; they have an address and a phone number. Each
manufacturer usually sells several products, with distinct names. However, two products from two
manufacturers might have the same name. "
Is it possible to make it visible in the diagram? If yes, how ?

Resources