What is the specific use of Pivot table in SQL? [closed] - mysql

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

Related

Problems with the definition of an entity in ER diagram [closed]

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.

Requiring Data from PostGres and MySQL in one view [closed]

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 have two databases one in PostgreSQL and other in MySQL. What I want is to get data from both databases and create a view and then iterate it on front-end.
Is it possible?.
The smartest thing to do would be to create two connections, one to each database, and handle it that way.
If you need to join the tables, you could consider using a mysql_fdw foreign table in PostgreSQL and join the tables in PostgreSQL.

How to achieve synchronization in database level? [closed]

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)

How many records can be possible in mysql? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
How many records can be possible & how many maximum records can be effective in mysql?
Actually my table has
24 Tables
1000000 Rows in Table (Each table (max))
Can I use mysql, please help me to solve my problem.
Yes you can use mysql perfectly.
One million rows (AKA records) is not too much for mysql, if you index that.

Searching one field from several mysql databases? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 5 years ago.
Improve this question
I have several databases represents the companies we work.
In every database there are fields which we work on.
And in the fields area, there are field infos and our engineer who worked at that field.
I need to search all databases and filter with engineer names, to get a list of fields he worked.
I hope I could explain.
Any simple solution?
Nope. You're going to have to manually write queries to search each table in each database. The whole idea of database schemas and tables is that they are distinct wrappers for data, which can't be implicitly joined.