I am having an object name Training deal which has in relationship with other objects ,i want to create workflow rule on it but I am confused i have tried my best but its not working.
I have 3 questions:-
I have to create an email alert of training schedule after one day of data entry.
After 5 days of data entry email alert is created for user to take fees from student after 3 days of training start date.
After 1 day of data entry email alter is created to take feedback from student about training after 2 days of training start date.
Please help.
Training deal object image with fields
Related
I am trying to design a DB model for a school timetable, and have some issues figuring out a model that would work with my requirements.
Domain entities:
Subject - something that is taught over the course of a year. eg: English, Programming, etc.
Group - a group of students.
Lesson - a recurring event where students are taught some specific subject. Example:
every Monday at 10:00 group A is taught Programming.
The original requirements were very basic.
CRUD for Subjects.
CRUD for Groups.
Ability to create recurring events that span some period of time. (note: no editing was allowed after creation).
The current model I use is:
Subjects
id:int
name:string
Groups
id:int
name:string
Lessons
id:int
name:string
startDate:date (ex: event starts recurring from Jan 1 2021)
endDate:date (ex: event recurring ends on Dec 31 2021)
startTime:time (ex: 10:00)
endTime:time (ex: 11:00)
dayOfWeek: flag enum that takes values Monday-Sunday
(we have more fields that are responsible for recurrence, but they are ommited as they are not very relevant to my question).
Currently, entire series of events is stored as a single row in a database.
This was working fine, but now additional requirements were added and I am having issues adjusting my model to accommodate them.
New requirements are:
ability to grade students for each lesson
ability to edit lessons (for example shift start/end time 1 hour for event series; change the day on which event occurs etc)
ability to shift a single event in a series (say teacher woke up sick and needs to move lecture from Monday to Tuesday just for this Monday)
#1 in theory is simple - we create a new table Grades that has fields
lessonId:int
userId:int
date:date
grade:int?
but it won't work once we take into account new requirement #2 (ability to edit lessons).
let's say we have an event that occurs each Monday. an event occurred on Monday, Jan 1st. we graded some students, so we have some grades tied to that date.
then we go to edit our lesson to occur on Tuesdays instead of Mondays.
it is no longer possible to map existing grades to this lesson, as the dates no longer match.
#2 editing lessons seems like a pretty straightforward operation..until you consider grades. basically, the only issue with this requirement is the one described in #1
#3 no idea how to implement this, considering it should be compatible with other requirements.
I need help figuring out the database model that would satisfy those requirements.
From your description I take it that the lessons table also has a subject_id and a groups_id, which you merely forgot to put in your table column list.
Let's look at the tasks:
ability to grade students for each lesson
This is not easy. So far you have groups attending lessons. So to start this, you should add a students table to the database. Then, depending on whether a student can belong to more than one group or not, you'd either have the group ID in the student table or create a bridge table group_student.
Now, what does each "lesson" mean in this requirement? So far a lesson is a recurring event (your example: "every Monday at 10:00 group A is taught Programming"). That would mean you'd want a student_lesson table to be able to store the grade. The only problem I see here is that you could store a student_lesson row for a student that doesn't attend the lesson, if you stick to single IDs. Using composite IDs would solve this. The student_lesson table would have student_id, group_id, lesson_id, and grade. And id would have foreign keys on (student_id, group_id) and on (group_id, lesson_id).
If, however, lesson means a single lesson in the recurring lessons, then you need a single_lesson table, too.
ability to edit lessons (for example shift start/end time 1 hour for event series; change the day on which event occurs etc)
Should be no problem. These are just attributes that can be changed, anyway. Maybe you want a history table to see that the Tuesday lesson took place on Mondays until a month ago, but so far there is no requirement for this.
ability to shift a single event in a series (say teacher woke up sick and needs to move lecture from Monday to Tuesday just for this Monday)
Maybe you already have a single_lesson table because of requirement #1. Then each lesson occurrence already gets its one row with a date and sometimes that Monday would become a Tuesday. You could even store both dates, original date/time, new date/time. Maybe even a text for a reason.
If task #1 doesn't require a single_lesson table, because grades are per recurring lesson, then you only need a single_lesson_exception table for the exceptions where original date/time and new date/time are obligatory this time.
I'm creating a feature that has an option to create infinite bank account transactions by month, for example: A user buy something in 12x parcels, will be created 12 rows on database with relation with this purchase in a table called bank_account_transactions.
Now the problematic scenario: A user has a salary that increase the balance of bank account every month for the rest of his life, how can i store this in database?
I thought store data equivalent to 100 years (12*100=1200) but it is so slow because when the user update the value of his salary, will update 1200 rows in database.
How can I solve this in a performatic way? The project is developed with Nodejs and MongoDB.
I'm developing an Asp.net mvc application with entity framework so that I can more easily create dish lists and chore lists for me and my roommates from month to month. I'm trying to model our chore list but I'm having a hard time figuring out how to model it clear and effective way that will make development smooth.
Here is a sample screen shot of the chores list
Chores are done on Mondays and Thursdays. Each chore has a person assigned to it and each chore has anywhere from 4 to 6 different tasks that must be complete.
I'm hoping to make an app that can generate this kind of chart. It doesn't need to hold information about whether a specific box is checked or not, it will be printed off.
But the way the system works is this. It allows the user to create a list of jobs and tasks such as kitchen, living room, and bathroom. And then the user can generate a monthly chore list where the chores are brought up and the person can be selected for each chore. Once this is complete and the user clicks a generate button, the list for the month is generated.
However, I want the system to be able to retain what house jobs were on which month and which users were on which job. I want the system to able to bring back this information even if the current jobs are edited and changed. This is where I'm confused. How would I be able to do this??? Should I make some sort of historical table that copies all of the rows from a chorestable when a chore list is generated? Any input or ideas where to start would be appreciated.
Create next tables:
Chores (Id, Date, RoommateId(link to Roommates), ChoreName, ChoreDescription, RoomId, WorkDate, ...)
ChoreTypes (Id, Name, Description)
Rooms (Id, Name, Descirption)
Roommates (Id, FirstName, LastName, ....)
If you will keep text from ChoreTypes dictionary in Chores table, then it will not change if you update ChoreTypes.
I am making an application that will process a big chunk of information. This information was retrieved using some web crawlers and is about news, containing data such as News Title, URL, Publication Date, Category and Content. The crawled data is in XML format, and I will load that information into my application.
From there, 10 users will process every news and tag the category of the news manually by reading the title. I've used 9 main categories to be used, and for each news the users will decide from 0-5 how much this particular news belongs to each category.
Users will also search for news by title and decide if this news is discussing the same event as another news, or if this news is similar to another news (like a news about a football game at 3 PM and a news about a football game at 5 PM).
I have no problems with making the application itself, I just need some help with the part of how to design one/many tables that can link news that talk about similar events or about the same event, since there can be many many news that can talk about the same event.
So far I've done something like this:
Table News
ID
Title
URL
PublicationDate
NewsContent
Table Category
NewsID
User_ID
Economy
Politics
Present_Day
Sport
Technology
Showbiz
Culture
Region
World
Table User
ID
FirstName
LastName
Each category field in the Category table holds a tinyint data type (I'm using SQL Server) and I've restricted the values the user can input via a check constraint so that it allows values from 0 - 5. I don't know if this is the right approach so far for the database design, and I need to add the table/s that allow to add information about similar news or news that talk about the same event, such as a table Similar_News containing some fields like News_ID, SimilarNews1_ID, SimilarNews2_ID and so on, and must contain the information about which user 'said this', but this sounds like a flawed design to me.
Any help is appreciated, thank you.
Here are some suggestions. In the CATEGORY table you have created 9 different columns (economy, politics etc). What if a few days / months / years down the line there is a new category. In this case you will have to modify your database design. Instead, you could have the following structure of your CATEGORY table.
CategoryId
Category
And have one more table to store the actual news categorization.
Table: NewsCategory
NewsId
CategoryId
CategoryWeight (This will store the rating from 1-5)
If the user feels that a news does not belong to a particular category then no row will be inserted in this table for that category. Such a structure will give you more flexibility to insert new categories in future without changing the database design. You just have to insert new rows in the Category table.
For storing similar news I would recommend one of the following approach.
Create a table event and store the details of the event in this table.
EventId
EventDescription
Sample Data
EventId: 55
EventDescription: Euro 2016 Belgium vs Italy
Now you can include this EventId in your News table. This way you can pull up all the news that are related to this event.
Create Similar_News table with n fields to store the similar News_Id doesn't sound a good idea. How many fields would you create? 3? 10?
You are modeling a n to m relationship so I would only use two fields (three if you wanna store the User Id). For example if New 1 is similar to news 2 and 3. And New 3 is similar to 4, you insert the rows:
New_ID SImilar_New_Id
--------------------------
1 2
1 3
3 4
Another approach would be use a NOSQL DB to store flexible structures, for example:
"News":{
"User_Id":1,
"Category"{
"Economy":3,
"Politics":4
},
"Similar_News":[1,2,3]
}
I'm really stuck on the best way to implement this database.
Here is my problem: The database is to store information on wedding photography clients.
A user can sign up to my site, enter the details of their wedding and get their own "wedding profile page". They can do this without having to have us shoot their wedding.
At any point the user can book a meetup, wedding, or engagement shoot. The website will check if we are available. (weddings take preference over meetups so a client that wants to book a wedding on a day we have a meetup, the meetup will be flagged for a reschedule)
We must also be able to book days off. On these days a wedding/meetup/engagement shoot can not be booked.
engagement shoots cost and upfront fee. With weddings, a deposit is due within 14 days or the date is freed up again. Meetups are free.
I am so stuck with how to implement this system. I just keep going round in circles, the best way I can think is to have a "dates" table, that links all the other tables but I'm sure this is not the most efficient way.
I think what is putting me off is the fact that there can be multiple weddings on the same day (for people who just want a wedding profile), but only one BOOKED wedding per day.
So have I got this completely wrong? or do I store all appointments in one table and use a "type of appointment" table.
SO SO Stuck, I hope you can help me!
P.S. I have missed most fields out to make it simpler to understand.
Keep it simple to begin with. You've identified many of the nouns that should correspond to entities:
USERS
WEDDINGS
ENGAGEMENT_SHOOTS
MEETUPS
UNAVAILABLE
DATES
PAYMENTS
I'd suggest that WEDDINGS, ENGAGEMENT_SHOOTS, MEETUPS and UNAVAILABLE are all type of bookings. You could have just:
USERS
BOOKINGS - this has a date and perhaps a status
BOOKING_TYPE (wedding, meetup, engagement_shoots, unavailable)
PAYMENTS
You may wish to package up all on the things a use has bought relating to a single wedding into a TRANSACTION entity etc which will allow a single payment to be mapped to multiple bookings. When one of your staff isn't available they could have a booking of type holiday etc.
There may be 2 types of USERS - your photography staff who are assigned to a booking and your customer.
Based on the status of the booking, eg. CONFIRMED, PENDING, COMPLETED and the date your business logic could send out payment demands, followups etc.
Create a simple model and start adding data you will soon see the gaps and issues if any. You should have test cases up front to ensure that the data model supports all the scenarios for your application, best to do this with a set of use cases.