Questions tagged [database-management]

115 questions
0
votes
2 answers

Merging specific rows by summing certain columns on grouping variables

The following dataframe is a subset of a bigger df, which contains duplicated information df<-data.frame(Caught=c(92,134,92,134), Discarded=c(49,47,49,47), Units=c(170,170,220,220), Hours=c(72,72,72,72), …
gfmg1992
  • 99
  • 2
  • 8
0
votes
1 answer

How can I fix, ORA-02291: integrity constant violated - parent key not found

I'm using apex oracle, and I keep getting this violation. If anyone could explain to me why, I would be very grateful. my code: CREATE TABLE books ( book_id INT GENERATED BY DEFAULT AS IDENTITY NOT NULL, title VARCHAR(255)…
0
votes
1 answer

How to enter multiple records in single query in sql plus

I have student table with 3 atributes STUDENT_ID, NAME and AGE I'm getting this error after executing the query Query: INSERT INTO student(STUDENT_ID, NAME, AGE) values (3, 'WILSON', 40), (4, 'ALEX', 30); Error: ORA-00933: SQL command not properly…
0
votes
1 answer

Database change management

I was wondering if there is any tool which would help me transfer changes form one database to another. Currently every time I want to deploy new version for tests I have to manually execute all database changes scripts and transfer them to every…
magneto
  • 135
  • 1
  • 3
0
votes
1 answer

How to records the number of hours each month an employee worked in an ER diagram between two entities?

So we have two entities, employee, and group An employee is uniquely identified by an id and has a name A group is uniquely identified by name and has a department An employee may work in multiple groups, and each group contains many employees You…
0
votes
0 answers

An exception of type OperationalError occurred. Arguments: ('database is locked',) ;SQlite

I am trying to write function for updating database table columns (here column name will differ various point of time.) So while doing so, i am getting "operation error, Database locked". Could anyone suggest reason behind this. For more…
0
votes
1 answer

How to change the where clause and append at the same time using SELECT statement in SQL Server?

sect<-c("Healthcare","Basic Materials","Utilities","Financial Services","Technology","Consumer" "Defensive","Industrials","Communication Services","Energy","Real Estate","Consumer Cyclical","NULL") mcap<-c("3 - Large","2 - Mid","1 -…
0
votes
1 answer

How to use parallel computing in R?

sect<-c("Healthcare","Basic Materials","Utilities","Financial Services","Technology","Consumer" "Defensive","Industrials","Communication Services","Energy","Real Estate","Consumer Cyclical","NULL") mcap<-c("3 - Large","2 - Mid","1…
0
votes
3 answers

How to pick a value associated with the maximum value in a table [WITHOUT USING LIMITS]

I have a table like this that contains values like Sales Table Year Profit 1982 20 2000 100 1900 10 1800 2 I basically want to pick the year that has the maximum profit i.e. year 2000 because the profit there is 100. What I tried…
0
votes
1 answer

Fetching data really fast from Google cloud firestore

I am making a flutter application and I’m using cloud firestore as my online database. One of the features in my app is looking for nearby users and showing their profile to the current user in a custom widget on screen. The way I do it is I get…
0
votes
1 answer

Reorganizing columns by two column combination

I am currently learning the tidyr and dplyr. Went in the following issue I am not sure how to appropiatly face: Imaging the following dataset: Factor 1 Factor 2 Year value A green 2016 1.2 A green …
gfmg1992
  • 99
  • 2
  • 8
0
votes
2 answers

MySQL: Is it good to define a new date column to determine what date a record has been fetched when there is already a created_at column?

I need some help about database management. I am trying to retrieve data from my database (filtering them by the created_at field). There will be no problem when I am retrieving data from my database created in today's date. For example today is…
Michael
  • 335
  • 1
  • 22
0
votes
2 answers

How do I evaluate the cost of using MS SQL Server vs Amazon Redshift?

I have a client using SQL Server for everything, including powering marketing dashboards using analytics queries. They are excited to start pushing data into Redshift as a data warehouse for the speed improvements alone (eg queries that take hours…
ScottieB
  • 3,958
  • 6
  • 42
  • 60
0
votes
1 answer

Advanced webshop filtering w/ MySQL

I am making a webshop in MySQL and PHP with a database design similar to this (see the picture) I am not having a problem with multiple-price items with different specifications, like in the question linked above. This will be a computer webshop so…
Zsombor
  • 45
  • 9
0
votes
1 answer

Fix misspelled column name in every table of a SQL Server database

I've got a SQL Server database running in SSMS which contains ~75 tables. I've just realized every table has a modfiedBy column header, which is misspelled and should instead be spelled modifiedBy. Is there a way to change (ALTER??) all these column…
Kyle Vassella
  • 2,296
  • 10
  • 32
  • 62