Questions tagged [database]

A database is an organized collection of data. It is the collection of schemas, tables, queries, reports, views, and other objects. The data are typically organized to model aspects of reality in a way that supports processes requiring information. Use this tag if you have questions about designing a database. If it is about a particular database management system, (e.g., MySQL), please use that tag instead.

database
Filter by
Sorted by
Tagged with
0 votes
2 answers
384 views

How to repeat multi-step schema change (ETL schema changes?)

I'm new to DBA and not much of a SQL person, so be gentle please. I'd like to restructure a database that requires adding new columns, tables, and relationships followed by removing old tables, ...
jlear's user avatar
  • 180
1 vote
1 answer
3k views

Why I can't know if PostGIS is correctly installed on my PostgreSQL database?

I am absolutly new in PostgreSQL and I am following this tutorial to check if I have PostGIS extension installed on my PostgreSQL installation. This is the tutorial: https://www.a2hosting.com/kb/...
AndreaNobili's user avatar
  • 41.9k
1 vote
2 answers
45 views

Formatting DDL values populated from DB

noob question: my basic Rails app has a DB with Categories and Soups (yup, from Code School), with the class Category containing many Soups. I'm adding the ability for the user to add Categories and ...
user avatar
4 votes
1 answer
3k views

Occasionally retrieving "connection timed out" errors when querying Postgresql

I get this error every so often when utilizing sqlx with pgx, and I believe it's a configuration error on my end and a db concept I'm not grasping: error: 'write tcp [redacted-ip]:[redacted-port]->...
Sean Lindo's user avatar
  • 1,397
1 vote
0 answers
112 views

"Operation must be an updateable query" Error

So I keep getting this error message: from my function that calls this SQL statement: UPDATE EQL_DATA1 SET SubCategoryID = 'value', ItemSize = 'value', Ell = 'value', Tee = 'value', ...
Uchiha Itachi's user avatar
0 votes
1 answer
170 views

Normalisation / 3nf in database

I have this table (Day, Employee no, Employee Name, Client no, Client name, Product no, Product Description, Unit Price, Quantity Sold, Total Sales) Example data : 22nd, e123, Dave, c1264, ...
gweno10's user avatar
  • 405
0 votes
0 answers
573 views

How t optimize read time in a postgresql database

I have a slight problem with a postgresql database with exploding read times. Background info: two tables, both with only 4 columns: uuid (uuid), timestamp (bigint), type (text) and value (double) ...
Anders Bernard's user avatar
1 vote
1 answer
53 views

Trying to create a Teradata view to aggregate how long rows of a specific ID have had a certain value

I have a test report table, that writes a row after each run of a test. Let's say this is the data: | main_id | status | date | |---------|--------|---------| | 123 | pass | Jan 1st | | ...
user1029167's user avatar
-2 votes
1 answer
45 views

Is it possible to show 1 column in a DataGridView?

Is it possible to only show the first column in a datagridview for example I only want to show REGION_ID and the rows under it. Can someone help?
DaF's user avatar
  • 1
0 votes
0 answers
25 views

Query to show difference over time in the data

Lets say I have a table that shows attendence to a lecture. The table is very simple, it only contains the date of the lecture, and the attendees. 2016-10-10 | Adam 2016-10-10 | Mike 2016-10-10 | ...
pgsandstrom's user avatar
  • 14.4k
0 votes
1 answer
124 views

Create new dropdown list with result from dropdown list selection php mysql database

Ok .. here is the thing which is probably very easy to fix but unfortunatly not for me. What I try to create is this: I have 2 dropdown lists. List one consist of data straight from a database table....
Brnovich's user avatar
  • 305
0 votes
0 answers
327 views

Custom order of test database migrations

I'm running django tests on a large application. They require a test database, so I need to create a test database before running tests. But the problem is - because of some dependency problems the ...
Odysseus's user avatar
  • 1,062
0 votes
1 answer
76 views

Cannot connect to MySQL instance on server 1 from Apache in server 2

I have a MySQL server (Centos 6.7) which is hosting my database. This is a production server and there are several vb.net apps throughout the business which connect to it, as well as some other ...
John's user avatar
  • 765
0 votes
1 answer
117 views

How to create a line chart with database values?

I have a database to save some value which is gerilim, akim and power. I want to make a line chart with these values from database. I search on the internet and couldn't find anything. Here is my ...
user's user avatar
  • 23
1 vote
1 answer
235 views

How can i implement row or table locking using visual studio 2015 ?

I want to add in multi-user access feature whereby concurrency wont occur in my web application, is there any method that is easy and simple to implement ?
user7093382's user avatar
0 votes
1 answer
332 views

SQLite rawquery fails to match expected strings

I'm using this method for a simple db search. public Cursor queryExpense(String createdDate, String createdTime, String category, String description, String amount) { SQLiteDatabase db = this....
Jay's user avatar
  • 1,402
2 votes
1 answer
321 views

Incompatible Database Versions when syncing

I'm trying to sync two CE databases as some spike work. I'm following the tutorial here - https://msdn.microsoft.com/en-us/library/ff928606(v=sql.110).aspx to do so. When I try to synchronize the two ...
Ralt's user avatar
  • 2,094
0 votes
2 answers
371 views

MIT App Inventor Create a database that multiple devices can access

I would like to figure out how to create a database that multiple devices can access, this would be for a texting application. I don't want to use phone numbers, or Bluetooth for this application ...
David Clifford's user avatar
0 votes
1 answer
615 views

Can I concat html dom elements

I would like to do something like $(".form-horizontal").find("h3.tableName").html().join(',') (I have my database tables in h3 dom) and get a string output: user,family,photo Can I to it with a ...
Paul's user avatar
  • 1,340
0 votes
1 answer
30 views

MySql - Create view by merging two tables based on values

I have two tables: financials_standalone ('fin_id', 'attr_id', 'year', 'value'); financials_consolidated ('fin_id', 'attr_id', 'year', 'value'); ('fin_id', 'attr_id', 'year') is the unique key ...
Prathab K's user avatar
0 votes
1 answer
26 views

Cross database UID management using a single parent database?

I have a number of MySQL databases that will at some point contain data records. The databases are held on separate servers for a number of reasons not relevant to this question. Clearly MySQL has ...
Babra Cunningham's user avatar
-1 votes
1 answer
177 views

Sql Query To Return Notification from store table

I have a store table which have productName, productNumber, storedInBranch, blockNumber, quantity, notifyIn. If the quantity is less than notifyIn it will notify me and I tried the query below: ...
Deadpool's user avatar
0 votes
1 answer
55 views

MySQL Trigger modify col before insert

I want to modify col before record is inserted inside! I have table for transactions and for every new transaction i want to set 0.5% commission. Problem with is: he all time insert 0 in amount col. ...
Ivan's user avatar
  • 5,202
0 votes
1 answer
192 views

Java/JDBC MySQL Database - Design Query

I just need clarification on whether the following design breaks object-oriented design best practice (in relation to implementing a MySQL database). This is not Java EE scale but rather second-year ...
E. Rowlands's user avatar
0 votes
1 answer
26 views

inserting data via SQL script

I have a CSV file which consists of one column. I want to insert (not import) all the elements in the columns into the database table. I know that if I wanted to insert few elements, then I can use ...
priyanka3's user avatar
  • 149
0 votes
1 answer
36 views

Nest Data Under Column in Associative Table

I am trying to produce a nested JSON file with a PostgreSQL database. I have three tables: Person_tbl, Log_tbl, Person_Log_tbl, where the latter is an associative table containing Person_id and Log_id ...
2b2a's user avatar
  • 95
2 votes
1 answer
4k views

BCNF, 3NF, and candidate keys

I am having issues understanding how to determine if relations are in BCNF, 3NF, and in general identifying the candidate keys of a relation. Consider relation R = (A, B, C, D) with the functional ...
sudo_coffee's user avatar
0 votes
1 answer
547 views

Mongoose - What is this extra _id property being added to my friendship property?

So I've run into this issue before but now I really want to flatten it out and never run into it again. I have a user schema which accepts other users as friends. However, instead of just adding a '...
user7024499's user avatar
1 vote
1 answer
98 views

Getting exception when trying to connect to parse server from Android

I just started with database integration for the first time with my Android App Development training. I'm using the Parse SDK through Heroku. I've been struggling for ages to just get a simple app ...
Wilhelm's user avatar
  • 113
0 votes
1 answer
229 views

Python PyQt5: Can I also insert a QPushButton into a database via SQL?

As the title suggests I want to know if it's possible to insert a QPushButton into a database via SQL? connection = pymysql.connect(host = 'localhost', user = 'root', db = '...
Ramón Wilhelm's user avatar
0 votes
1 answer
799 views

orientdb connect invalid password and username

I have a problem on my linux mint. I installed OrientDB, create a database and successfully connect to this database with password and username root root. But after closing server.sh and reopening ...
Nurbolat Urmanov's user avatar
0 votes
2 answers
283 views

unable to insert data in hive having custom delimiter

I am trying to learn hive, this may be stupid a question but I created a table in hive as follows create table if not exists tweets_table( tweetdata STRING, followerscount INT, ...
Ninad Nehete's user avatar
1 vote
1 answer
734 views

Undeclared identifier database table not recognized

uses dmInfo; {$R *.dfm} procedure TForm3.Button1Click(Sender: TObject); begin with dmInfo do begin tblInfo.Open; end; For some obscure reason, tblInfo is regarded as a undeclared identifier. ...
Philip Ellis's user avatar
0 votes
1 answer
2k views

How to create Oracle DB connection via Java and Tomcat?

I am trying to use Oracle DB via Java and Tomcat. The problem is that I can not configurate correct connection via connection pool and declaration in "server.xml" file. So, when I use this code in a ...
Александр Сергеевич Джус's user avatar
0 votes
2 answers
2k views

Connection to database PHP

I have a problem, when i'm trying connect to database, on my webside shows something like that idk why :( connect_error) { die("Connection failed: " . $conn->connect_error); } echo "Connected ...
artist's user avatar
  • 319
1 vote
0 answers
1k views

Creating a Poll with Firebase

So here's a bit of background: my firebase data structure is essentially the root Reference, the question then data for follow ups and responses the user would select from (in the actual poll the idea ...
Taras Tataryn's user avatar
0 votes
1 answer
617 views

can session be used to cache data in laravel 5.3?

I am working on a project in laravel 5.3 where I need to get a big data from my DB. so what I am doing right now is getting data though Query and then saving it in session so that no further DB query ...
Tishad Touhidul's user avatar
1 vote
0 answers
346 views

Saas MongoDB + Node.js Architecture

guys! Sorry if there's another question like mine. I just searched a lot but couldn't find an answer. Let's say I'm willing to create an business management app for schools, and let's say I really ...
Pedro Silva's user avatar
0 votes
1 answer
3k views

Is it possible to hack my database by knowing the username and password (only) in PHP [closed]

Is it possible for someone to hack a MySQL database by knowing (only) the username and the password for my database. There is no phpMyAdmin to login from it and there is no way to do any SQL ...
isams's user avatar
  • 45
2 votes
0 answers
381 views

Creating a Per-User dynamic connection string for ASP.NET website connecting to a SQL Server database

Per-user (dynamic) connection strings for Asp.Net website. I have seen some posts on dynamic connections for Linq, but we use straight ADO connections. ASP.NET website: hosted in IIS, the ...
user7091723's user avatar
-1 votes
1 answer
72 views

Normalisation to 3NF

I am currently trying to normalise a set of data for my coursework. I believe I have managed to get everything to 3NF bar this one table as I think it still has a transitive dependency. Also it has an ...
user avatar
0 votes
0 answers
83 views

how to draw the erd for this given reletional schema?

consider the following relational schema : employee (person-name, street, city) works (person-name, company-name, salary) company (company-name, city) manages (person-name, manager-name) With ...
blank94's user avatar
  • 384
0 votes
1 answer
110 views

Data schema for storing large number of rows

I'm working on project with following domain structure: Users. There could be multiple users. Projects. Every user can create multiple projects. Keywords. Every project may contain a lot of keywords, ...
user12384512's user avatar
  • 3,391
1 vote
1 answer
338 views

HSQL and MSSQL datepart parameter

I have an embedded HSQLDB database for testing. The production database is SQL Server 2012. I am using a native query which has this predicate on the where: and (pc.SOME_DATE IS NOT NULL AND pc....
Andre's user avatar
  • 64
5 votes
3 answers
25k views

Subquery returns more than 1 row in select statement

Suppose I had two tables, orderdetails and orders. I would like to print orderDate, the status of the order & the total price. In the orderdetails table, there is orderNumber, quantityOrdered, ...
Damhan Richardson's user avatar
0 votes
1 answer
807 views

sshtunnel not working in when used in a function

I am trying to create a sshtunnel to access my database. I am using the sshtunnel package together with SQLalchemy and pandas. Example 1 # run in terminal ssh -L 5433:127.0.0.1:5432 [ssh_config] ...
Lucas Neo's user avatar
13 votes
1 answer
6k views

How does Heroku billing dynos work exactly?

I was trying to understand the Heroku pricing system. Okay so the free account receives 1000 dyno/hour. What's the exact meaning of a dyno/hour? It depends on what? Requests per seconds? Number of ...
Marc Ibrahim's user avatar
-2 votes
1 answer
71 views

Handling Database Exceptions gracefully

I have a executor service, where the thread runs 2-3 multiple process on the context object , and logs the state into the database, after each process is completed. Current code defines try and catch ...
user3601857's user avatar
1 vote
1 answer
296 views

Cannot connect to database using GUI

Hello its my first time using GUI software for postgres. I want to know how to connect to my database using pdAdmin or any other software. I usually connect using command line I use ssh @example.a....
Satsuki's user avatar
  • 2,186
0 votes
1 answer
2k views

How to identify user account in DBA_SYS_PRIVS table in Oracle Database

I'm trying to look for all the users with certain privileges in the DBA_SYS_PRIVS table. The table has a GRANTEE column and according to Oracle Official website, the GRANTEE column shows "Grantee name,...
Sio's user avatar
  • 27