Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 1 year ago.
Improve this question
I have to build the conceptual model for a school, which has a Cafe inside it. The school wants to control the profits which derive from the Cafe.
What could be the best way to represent this with an er-diagram?
I tried to create the entity "CAFE", with attributes NameActivity, Profits. But I don't think that makes sense
One possible conceptual model could be this
The Cafe generates orders and every orders contains different order rows (cappuccino, latte, and so on). You can retrive the profit simply adding the cost of each order row.
Related
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 1 year ago.
Improve this question
I want to design a database which is going to consists of really lot of columns, since it's a web game's inventory but there is going to be really lot of things.
It would probably call for names like "item_1", "item_2" but is that even ideal?
When I plan it to be extended over 1 000 items?
I need to SELECT later if the user has them, every single one.
I plan to use MariaDB and Laravel framework with Jetstream, Livewire and Tailwind.css.
Before you do anything, read about
NF
1NF
2NF
3NF
BCNF
Bearing in mind the knowledge you thusly accumulate, you should reach to a conclusion similar to having some tables like these:
item_types(id, name, ...)
user(username, password, ...)
inventory(user_id, item_type_id, amount)
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 3 years ago.
Improve this question
I'm sorry it seems be weird! but I'm so confused! bear with me:)
I'm new with E-commerce I just create simple app via Laravel, I design this database for it:
I got in my mind tow questions:
I'm confused with where should I add shipping_charges column for order in which table?!
I have governorates(cities) so shipping_charges in the capital of my country should be 5$ and others cities should be 10$. How can handle the price of the cities?
I think you have to put shipping_charges in governorates table because it belongs to it. You can make separate table governorate_to_shipping but it's not neccessary.
In order you have address_id in addresses you have governorate_id so you can join this tables to governorates table and get shipping_charge from it.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I'm developing an airline reservation system as my semester project. Here, when one customer books a seat in a specific aircraft, I need to prevent another customer from booking that seat at the same time. I know how to do this in back-end level using synchronization. I need to know whether there is a way to do this in database level. If so, could you please point me in some direction
You can create unique constraint for 2 columns in table like (flight_id, seat_id)
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
Im curious what is the distinct use of pivot table in database? I mean, how is it apply in real life.
Pivot query help us to generate an interactive table that quickly combines and compares large amounts of data. We can rotate its rows and columns to see different summaries of the source data, and we can display the details for areas of interest at a glance. It also help us to generate Multidimensional reporting.
for more information visit:
http://www.codeproject.com/Tips/500811/Simple-Way-To-Use-Pivot-In-SQL-Query
https://technet.microsoft.com/en-us/library/ms177410(v=sql.105).aspx
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I would like to know if it is possible,
To extract the userid from an ebay page and insert it into mysql as part of an insert statement? Otherwise what would be the best way to do this?
I have files to import, which contain hundred of ebay auction urls, and I must grab the seller id from each one. Is there an easier way to do this than what I am suggesting?
You could use the eBay API for that. The URL for each page contains an item number, and that can be used to query eBay for the seller id.
eBay Hacks Item 109 gives some PHP example code to do what you need (and more).