Push data to Azure SQL database

I am pretty new using Azure SQL database. I have been given a task to push a 100 million record text file to Azure SQL database. I'm looking for suggestions how to do it in an efficient manner. ...
more »

2017-12-03 21:12 (2) Answers

2 Functional Dependencies in a single table

I'm trying to create a schema based on these 2 Functional Dependencies. A -> B, C, D B -> D I'm trying to create a single table including both of these FDs with the following constraint: A pair tuple (B, D) can be repetitive...
more »

2017-12-03 03:12 (1) Answers

JDBC nested while loop

there. I am a beginner using java. I want to do a nested while loop for my SQL query results. My original result was like following, eno ename title date_visit ssn pname charge 103 Jekyl Doctor 20170717 946883650 Gers...
more »

2017-12-02 23:12 (1) Answers

Counting instructors in a database

I think I have the right idea to solve this function, but I'm not sure why I get this error when I try to test it. Can anyone please help me fix this? cur.execute(q) sqlite3.OperationalError: near "HAVING": syntax error Courses Table: ID, Course, S...
more »

2017-12-02 21:12 (1) Answers

Memory-efficient large dataset streaming to S3

I am trying to copy over S3 large dataset (larger than RAM) using SQL alchemy. My constraints are: I need to use sqlalchemy I need to keep memory pressure at lowest I don't want to use the local filsystem as intermediary step to send data to s3 ...
more »

2017-12-01 15:12 (1) Answers

c# - Data won't save in my database

My data won't save on my database. Instead of going into "Product has been added", it goes to "Product ID already exist" even though it's not. Here is the code: private void btnAddProduct_Click(object sender, EventArgs e) { if(txtNewProd...
more »

2017-12-01 13:12 (1) Answers

Mongodb replication (secondary server)

I set up a master-slave replication of MongoDB by using 2 servers. The problem is I always going to assign rs.slaveOk() in slave server after inserting data in master. I want to automatically synced(no need to rs.slaveOk()) in secondary! What configu...
more »

2017-12-01 11:12 (1) Answers

Django save blank value

I have a number of unknown values in a df, where the cells are filled with the chars '---' I would like to tell Django that, if it finds something that is not a number of any kind (int / decimal / floating point) to leave the value of that field bla...
more »

2017-11-29 16:11 (1) Answers

exist in Firebase database user name

I am trying to search a "username" in firebase database but it always returns the else statement mDatabaseref = FirebaseDatabase.getInstance().getReference("user_info"); mDatabaseref.addListenerForSingleValueEvent(new ValueEventListener() { @O...
more »

2017-11-29 16:11 (3) Answers

Add a filter based on other column values in kdb

I have a column containing symbols like EURUSD, USDINR etc. I need to create a new column based on the condition that if any of the first three or last three alphabets of the currency pairs belongs to this list ref: ("INR", "BLR"....) then I have to ...
more »

2017-11-29 07:11 (3) Answers

Can I execute multiple SQL statements?

I am running an sql database for movies and I am working on this function so that whenever a user checks out a movie, the movie would be updated saying it has been checked out, then the checked out movie would be added to a table for checked out movi...
more »

2017-11-29 01:11 (5) Answers

Must Declare Scalar Value?

I am working with SQL and c# for my assignment. For this assignment I am running a movie database and I am stuck on this part where I have to check out a movie. I keep getting a 'must declare scalar value' but I am unsure how to do that. My code: &...
more »

2017-11-28 16:11 (1) Answers

Postgresql: partial foreign key?

Is it possible to create a partial foreign key (similar to partial indexes) in general sql / postgresql? I have not found a way to force referential integrity in the following case: Table A is soft-deletable (it has a column deleted_at, which is set...
more »

2017-11-28 14:11 (0) Answers

Pandas "read_sql" UnicodeDecodeError

I use pandas to read from Vertica DataBase: pd.read_sql(query, self._conn) But it fails with UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe9 in position 1: invalid continuation byte. Other queries don't fail, so the problem is in some ...
more »

2017-11-28 11:11 (1) Answers