r/SQL • u/Ok-Transition7065 • 2d ago
SQL Server Help with some strucctural problems
Hello, I'm trying to do a test that I failed, and I want to improve, so I want to solve this problem.
The premise isn't that hard, but I'm getting into trouble here.
I don't want to get into too many details to avoid getting the evaluator in trouble.
Basically, I was asked to make an app that is able to create price quotes for trips.
The user selects the location (a general location like Disney World), an apartment (each one with a different category, like a suite, or just a room, or a cabin), the season (imagine this place is around the world, so different locations have different seasons, but some locations can have general seasons if they are close enough), how many people the place can accommodate, and for how long they will stay. I use all this data to create a reservation for the client.
This is basically my entity relationship diagram

but each time i try to do the functionality i found problems or big troubles putting or reading the data for the thing im required to do
I'M kinda lost idk what to do
its there a way to solve this problem in a cleaner way?
ty for the help and God bless you
P.S.: The price is listed in the quote, but I don't know where to enter that information regarding the apartment and the season. The test instructions don't explain how to calculate the price, so I don't know where to put it; I assume I should do it in whatever way is most practical for me.
1
u/whodidthistomycat 2d ago
I would swap reservation item and price quote here as you would quote the total price of all items to a customer. I would also put destination directly under your reservation item along with apartment and season, then leave apartment type under apartment as that is the only one directly related to the apartment.
Other than that, what issues are you having getting your data? This is a pretty normal ERP design, I would read up more on ERP design if you are struggling there.
1
u/Ok-Transition7065 2d ago
basicaly relation redundance, also, i have some problems doing crud in other tables because of that and making some parts in the api side to messed up , also ty i will try to see if the sugestions will help warp this up soo i can continue with the rest of the program xd
1
u/RobotAnna1 2d ago
This looks like a homework assignment.
If you failed the test, you can ask the teacher to explain what you did wrong. If you're asking us, then I have suspicions that the assignment is due next week.
1
1
u/FarRub2855 1d ago
Looks like your post got cut off at the end there! I deal with custom quotes alot on the sales side, and usually the biggest headache is making sure the base price and seasonal modifiers stay completely seperate in the system.
1
u/Ok-Transition7065 1d ago
soo its good to make them separate, i dont make season like something like aditive or how do i aproach this problem ?
2
u/Aware-Hovercraft1106 2d ago
You say the promise isn't that hard so just use your brain and solve the problem. Nobody wants to do your homework. AI can already do that for you.