Questions tagged [database]

55189 questions
1

votes
2

answer
137

Views

How to get data with multiple references to single table

I have Image table with 3 columns: Id, Name, and RefId - It will contain Id from other table (with this example is Category table and Product table). Category table with 3 columns: Id, Name and ProductId. Product table includes 3 columns: Id, Name. This is Product's data: Id...
LazyCatIT
1

votes
1

answer
943

Views

Offline storage for mobile devices?

I am writing a mobile website that needs to store some data offline, and to sync that data when there is an internet connection. It is possible to use HTML5 Web SQL Databases, but there's a space limit of 5MB. I am wondering: Can I create multiple databases in HTML5 Web SQL Databases, so that the to...
HQXU85
1

votes
1

answer
29

Views

Select object that has no pointer

I have 2 entities named ContentState and HashedFile. Each record of ContentState has a HashedFile linked to it but the relationship is not unique and so there is a many to one relation regarding ContentState with unique="false" and not-null="true" (thus, 2 or more ContentState records can point to t...
little ali
1

votes
1

answer
126

Views

Normalizing and composite table structure

I have difficulty to optimizing the database design in a situation There is a table with 3000 employees and another one table with 300 departments. Problem is there is a possibility to 3000 employees in 300 departments. Basically each employee will work in all department 300x3000 records (worse ca...
aas
1

votes
2

answer
2.4k

Views

Golang MySQL Database Not Selected

I'm using github.com/go-sql-driver/mysql package to connect to MySQL. It works well except when I select a database (USE), I can't run queries against it. package main import ( "database/sql" "fmt" "log" ) import _ "github.com/go-sql-driver/mysql" func main() { dsn := "root:@/" db, err := sql.Open("...
Mark
1

votes
1

answer
67

Views

Connecting to vimeo video through firebase database issue

I am building an app with several video files. I originally stored them in firebase storage and accessed them through putting their links in firebase data base. On further inspection i think that storing them in fire base my be a bit expensive. so i looked around for alternative options and figured...
pete800
0

votes
0

answer
3

Views

Equivalent for DBMS_STATS.GATHER_SCHEMA_STATS(ownname ,options => ); in postgres

Is there any equivalent for DBMS_STATS.GATHER_SCHEMA_STATS(ownname ,options ); in postgres ?
Sanjum
1

votes
0

answer
17

Views

Usage of Power BI Interactive visualisations with Parent-Child dataset relations

I have been meddling with Power BI for almost a week now. It seems like a powerful tool, when you get to know your way around it at least.. I would like to be able to see the sum of Therapists, Admins and Citizens, based on all subgroups for the currently selected group. Here is my example: When i s...
Kalrin
1

votes
3

answer
585

Views

Store results of SQL Server query for pagination

In my database I have a table with a rather large data set that users can perform searches on. So for the following table structure for the Person table that contains about 250,000 records: firstName|lastName|age ---------|--------|--- John | Doe |25 ---------|--------|--- John | Sams |...
kshep92
1

votes
3

answer
121

Views

How to increase the MySQL variable count

Friends, in my project I have a variable named bill_number; every time the PRINT bill button is clicked I want to increase the value of bill_number by one in the database. Please help me as soon as possible. set @bill_number = @bill_numer+1; This is the query I've tried before but it's not working.
user2827435
1

votes
2

answer
5.2k

Views

How to insert long Strings into mySQL database using PHP?

I'm using a simple html-form and PHP to insert Strings into mySQL Database, which works fine for short strings, not for long ones indeed. Using the phpmyadmin I'm able to insert Strings of all lengths, it's only doesn't work with the html file and PHP. Will appreciate every kind of help, would love...
lifelover
0

votes
3

answer
39

Views

Java how to Convert String Date format

How to Convert String date format example I have Date like this 2019-01-01 and change the format into 2019-01 the year and date only?
Dummy Dummy
0

votes
0

answer
21

Views

Choosing Index on table

My table have 10 columns but i will use 5 columns more frequent. which is the better way to create an index like do we have to create index in all the 5 columns or composite index do we have to create. Actually performance is main thing to consider i don't have much idea in tuning side.
naga babu
0

votes
0

answer
16

Views

PostgreSQL Database Log Transaction

I'm a last year college student and I'm doing my thesis right now. My title is "Index Suggestion based on Log Analysis". This project will analyze the PostgreSQL transaction log to give index recommendation to the database that will be tested. This research will develop an index recommender tool by...
wdwilhelmina
2

votes
1

answer
40

Views

Oracle Large Objects storage in blocks

In Oracle data storage, if the size of each block is from 2 KB to 32 KB, how do Oracle store the CLOB/BLOB data types as the size of the CLOB/BLOBS might be in several MB's? Thanks in advance.
oramas
1

votes
3

answer
616

Views

Log Data Analytics : Choice of Database [closed]

I am getting Log Data from various web applications in the following format: Session Timestamp Event Parameters 1 1 Started Session 1 2 Logged In Username:"user1" 2 3 Started Session 1 3...
Peeyush
1

votes
3

answer
505

Views

Is it better to have many columns, or many tables?

Imagine a hypothetical database, which is storing products. Each product have have 100 attributes, although any given product will only have values set for ~50 of these. I can see three ways to store this data: A single table with 100 columns, A single table with very few (say the 10 columns that ha...
Benubird
1

votes
1

answer
2k

Views

Assertion on JMeter JDBC Request sampler

is it possible for jmeter to do assertion on jdbc request sampler( insert, update, delete) ? which assertion method should i use to achieve this? for example: I have a jdbc connection configuration to database, use jdbc request to do insert statement. how can i use assertion to check whether the jd...
user3358737
1

votes
1

answer
255

Views

different sizes of postgres databases. move db from server1 to server2

I'm trying to move a database from server1 to server2. I read docummentation of postgres, and I think everything is right except that after I dumped db from server1 moved it and restored on server2 the sizes are different. Server1 SELECT pg_size_pretty(pg_database_size('db_name'));...
radubogdan
0

votes
1

answer
12

Views

relational and conditional data coding

I have a data set with each state listed from 1990 to 2016 (27 observations per state, for 50 states, is 1350 observations). In the data set, I have state, year, pass (passage of some law), and a list of the state's neighbors. The data look like this... > head(data) state year pass...
Neue1987
0

votes
2

answer
27

Views

Count how many times a value appears in dictionary ? (PYTHON 3)

Suppose i have a list of names like this: names = [ 'James','Bruce','John'] and a dictionary like this: dict= { 'James':{ 'Job' :'Engineer'}, 'Bruce':{'Job' : 'Engineer'}, 'John':{'Job' :'Doctor'} } I want to create a dictionary that count how many times 'Doctor' or 'Engineer' appear in...
Tony Le
-1

votes
0

answer
28

Views

I would like to do something like this with firebase

FirebaseResponse resp_get = await client.GetTaskAsync("Utente:" + txt_Utente.Text); //not work FirebaseResponse response = await client.GetTaskAsync("Utenti/" + txt_Utente.Text); // work User obj = response.ResultAs(); I would like to check where the username is the same and not where the id is (eg....
Join to Caddys
0

votes
1

answer
16

Views

Show different data in webpage when clicked depending on the ID

I am trying to show user data when clicking link depending on a story ID. However, the page is showing the same data from one row in the database every time (web link is showing a different ID 'php?story_id=10' etc. but it's still showing the same data. I have this function: function displayStories(...
monkey232
0

votes
0

answer
7

Views

SQL Server trigger FOR DELETE Trigger not working on inner join with cascading keys

I have a PK/FK table below called Parent and Child. The Parent when deleted will cascade and delete the child. When the Child is deleted first, the trigger should run shouldnt it? I cant get my join to work and I am assuming the Parent table row is already gone. How can I accomplish this? I alr...
Mike Flynn
1

votes
3

answer
1.2k

Views

Ruby : How to parse a jsonp and save json data to database

I want to parse the JSONP data and save that data into my data base . I have my jsonp url lets say this >>http://a0.awsstatic.com/pricing/1/ec2/pricing-data-transfer-with-regions.min.js?callback=callback&_=1409722308446 Its not normal json object so how can i parse this json in ruby/ruby on rails an...
neo-code
1

votes
1

answer
602

Views

Multiple database handling in cscope

I have the following problem. I have a directory with project, let's assume: C:\projects\handler I also have a library that this project uses: C:\projects\core_library I use cscope to create the databases: C:\projects\handler>C:\tools\cscope\cscope -R C:\projects\core_library>C:\tools\cscope\cscope...
Melon
1

votes
1

answer
128

Views

Some confusion about “One to Many” relationship

Please have a look at the below diagram image. That image represents the "One to Many" relationship. It says "Client is introduced by Introducer". Client can have 1 Introducer or non at all, but Intrudcer can have many clients. So even though it is "Client can have 1 Introducer or non at all", it i...
Yohan Weerasinghe
1

votes
2

answer
1.8k

Views

How to connect to WordPress database remotely?

I have a WordPress website, which is not done by me, all I need to do is connect to its database remotely and query some results from its database. The point is that I don't know anything about WordPress, and I saw that the database information are written inside the wp-config.php file, when I opene...
tett
1

votes
1

answer
1k

Views

Lotus Notes to Oracle database migration [closed]

I have a NSF file of a lotus database. The objective is to give up the legacy lotus notes database and migrate it to relational database oracle. Do any one have expertise in this area to give a step wise process to carry out migration from lotus notes to oracle db.
Rohan K
1

votes
1

answer
158

Views

Trying to output a mysql database in php

I'm trying to test outputting data from a database table using phpmyadmin in php. For some reason it isn't working though, no errors involved. What am I doing wrong here? Here is a picture of my database: Note: This database is filled with fake information, no real e-mail addresses are used. Here...
tonnor22
1

votes
1

answer
888

Views

How to delete half the records of a table?

I have this table that holds user relations of a social network website with the following structure. +--------+----------------+ | user_id| friend_user_id | +--------+----------------+ And there is 2 record for every individual relationship in the table. Something like the following: +--------+----...
Hamed Momeni
1

votes
2

answer
270

Views

Liquibase Database Migrations, Managing over time

We've been using Liquibase for our database migrations, which runs off the Migrations.xml file. This references all of our migrations so it looks something to the effect of: ... However, over time, this has grown immensely long. Looking to refactor this has anyone solved this issue? What options ar...
OnResolve
0

votes
0

answer
21

Views

SQL Server 2016 experiences insufficient memory or sessions exceeds the maximum allowed in the server

On SQL 2016 server , we are getting the stack dump for " insufficient memory or the number of configured sessions exceeds the maximum allowed in the server" This is newly upgraded from SQL server 2014 to SQL 2016 2016 (SP2). Its on VM and has 48 GB memory. When this error happened the Max memory was...
Raja
0

votes
0

answer
4

Views

After changing database connection, error occurs

So my codes work perfectly fine until today I had to change the link to the new database. All I did was change the host name, username and password. Now it is returning this exception: java.lang.ClassCastException: java.math.BigInteger cannot be cast to java.lang.Long I made sure the test connection...
PYaj
1

votes
2

answer
119

Views

Un-nesting nested MS Access sql queries

I've been given a small Access database to work on. The guy who created it wrote many custom queries to generate reports. I've been tasked with modifying the reports and the guy who initially wrote the queries is gone and left no documentation. My biggest issue is that he nested the queries 5+ l...
Shaun Poore
1

votes
2

answer
4.7k

Views

Android: How to search data using SugarORM

I am not familiar with Sqlite and therefore is using SugarORM, a database library, with its documentation at http://satyan.github.io/sugar/creation.html Most of its function is same as that in sqlite, but using simplier commands. ExerciseDB public class ExerciseDB extends SugarRecord { @Column(name...
pearmak
1

votes
2

answer
2.5k

Views

Issue setting a RealmList<Object> to my database item, using Realm for android

First I call a function that will bring back my user from the database, and after I get my updated profile from the WS, and I try to change the list of friends from the database. Method to get my user: public UserRecord getMyUser(){ String userId = PSLocationCenter.getInstance().pref.getUserId(conte...
rosu alin
1

votes
1

answer
52

Views

Autoincrement sub-item in relational table

I have a two tables (perfectly willing to change these tables as I'm in the planning phase): create table building ( buildingId integer primary key autoincrement, buildingName text ); create table rooms ( roomId integer primary key autoincrement, buildingId integer, FOREIGN KEY(buildingId) REFERENCE...
Deftness
1

votes
1

answer
3.3k

Views

Creating a Trigger to update another Table in SQL Server

I'm trying to create a trigger in SQL Server. I'm inserting data into the database through forms that I made in Access. When I create a new record that gets inserted into my SALESDETAILS table, I want it to subtract the quantity (column) that was just entered in from my In Stock (column) in my PRODU...
Jess
1

votes
4

answer
142

Views

many to many relation in DB on same table

I'm making a database for a languages dictionary. I have a table of definitions with words in diferent languages. DEFINITIONS ----------- Id Definition Language For example some records may be: 1->casa->spanish 2->house->english 3->maison->french ... And now I have to create another table for the re...
teseocv

View additional questions