A database is any organized collection of data organized to provide efficient retrieval.
-4
votes
0answers
17 views
Spatial autocorrelation in R lag based on distance between stations [on hold]
My data:
Gage_number Latitude Longitude Date Gage_1 Gage_2 Gage_3
1 35.02 -80.84 1/1/2002 0.23 0 0.7
2 35.03 -81.04 1/2/2002 0 0 0.2
3 35.06 -80.81 1/3/2002 ...
4
votes
2answers
86 views
Converting recordsets to POCO
The goal this method was to emulate the way EF or Dapper return to you concrete POCO classes instead of recordsets when querying your db. Our current code is riddled with iterations over recordsets ...
0
votes
2answers
84 views
Design pattern to implement Database operations [on hold]
I am trying to implement design pattern in my project and have been reading material over net.
we have a sales application ( in C# ) where in we are storing entities like
...
4
votes
1answer
36 views
Flask Database Model Design
I am developing my first website in Flask using PostgreSQL and I want my database to have professors from all universities and courses in the USA.
As I am not very familiar with databases I have ...
3
votes
1answer
50 views
Wrapper class for executing database queries
I have a wrapper class for executing database queries from an ASP.NET application. Please provide suggestions on how I can improve this class. It is working fine. Anyone can use this class in their ...
4
votes
1answer
57 views
Database design for school attendance and scheduling
I work at a small English school in Japan and I'm trying to create a database to handle student attendance and class scheduling. I'm using PostgreSQL for the database and I'll use PHP for interacting ...
4
votes
1answer
30 views
Counting penalties for each player by joining tables, where some of the data is null
I have a table full of player names:
I also have a table full of player penalties:
I have to list all of the players names, player numbers, and the number of penalties that they've incurred.
To do ...
0
votes
0answers
32 views
Obtaining statistics from DB for activities on a given day
I am working on a Spring-MVC project in which there is a part of statistics objects I want to retrieve from the DB, but as I have to retrieve it for entire day, the response time is very bad(18.7 ...
2
votes
0answers
36 views
Stored procedure to describe the reason that a particular employee is unsuitable for a particular task
I used the following Stack Overflow questions as references for writing this code:
Select columns from result set of stored procedure
What is the equivalent of String.Join on TSQL?
The idea behind ...
4
votes
1answer
28 views
Java JDBC: MySQL database-wrapper
I'm currently enrolled in a further education with the topic database administration.
Among other chapters it contains how databases can be accessed from application-software.
Because it lacks ...
1
vote
1answer
11 views
SqlAlchemy model for users and timezones
I have a following schema, I would like to query user and all timezones belongs to it including timezone name. Could you please validate if my schema constructed correctly and most efficient way?
<...
2
votes
0answers
74 views
Fetch object from database, or fetch it using an API if it isn't there
To give some background on this particular code, there is a controller which recieves an object, hashes parts of it and looks into a database to see if there is a similar hash in the db, if there is, ...
7
votes
0answers
142 views
Job listings database project in Node.JS
I am creating a pet project where candidates can apply and recruiters can post their listings:
db.js
...
3
votes
1answer
57 views
Java database query logic
I'm making a wrapper for querying the database so that I can more easily control the flow of database management and to make it easier for me to write data beans around my database. This code is ...
7
votes
0answers
114 views
Writing my own DBMS: Storing databases
I've been interested in writing something meaningful in C++ for a long time, yet I had a hard not picking Java or C# for a new project... Now I've found something for which C++ seems to be the right ...
2
votes
0answers
50 views
Updating a table when a process ends
I have the following piece of code. I would like to be able to combine my first big block if statement inside my while loop and clean up my usage of variables since I'm doing a lot of setting.
I've ...
3
votes
2answers
297 views
Simple class to access MySQL database
I have written this simple DBHelper class to access a MySQL database. I am rethrowing a more generic exception so that the client side can take some action like ...
2
votes
1answer
36 views
3
votes
0answers
172 views
Firebase many to many relationship structure
I'm trying to create a logical and scalable many to many relationship data structure in Firebase. A user can authenticate with Facebook/Google, upload 3 photos, and a video. Users can also "star" ...
4
votes
3answers
98 views
1
vote
0answers
23 views
Inserting large datasets into SQLite db becomes very slow over time
I'm using the program below to insert values from very large .csv files (~2.5 million lines) into an SQLite DB. It starts very fast, but begins to slow over time, before eventually hanging ...
4
votes
2answers
73 views
PDO Insert Method
I'm currently creating a class that will have a bunch of my most common database functions. This is the first method I've made, I would appreciate any feedback, thanks!
...
7
votes
1answer
83 views
Reduce amount of calls to database for authentication
I'm currently having a bit of code, which I just know can be improved a lot. I am just blind to it. All of my code looks quite neat to me, except these parts... The login + authentication process is ...
4
votes
2answers
119 views
Keeping bank account records using a struct
Can you just shoot me some ideas on how to better structure the program and also if you notice any big no-nos at first glance? This is certainly not production code, it is my first attempt at a data ...
3
votes
1answer
66 views
Inventory of objects with item types and quantities
I am thinking about how an inventory could be designed. The requirements for this inventory will be the following:
There will be predefined item types in the inventory.
The user can define new item ...
3
votes
2answers
100 views
Build a pizza and choose your toppings
I've created a scenario below, in which a user can build a pizza and choose their toppings, then order their pizza:
...
2
votes
1answer
114 views
List<List<string>> vs DataTable
I have an application which uses SQLite. In that database I have several tables that I need to be able to read and update in my application. Often I need to 'cross-reference' these tables to get the ...
1
vote
0answers
90 views
Email thousands of customers from a PHP form using a MySQLi query on a MySQL database
How can a large internet service provider email certain customers to warn them about an impending service interruption? I'm providing what I think is a reasonable solution, but I have not tested it. ...
9
votes
1answer
118 views
C++11 Command Line Address Book
A friend is doing a CS course that has a command line address book as
a term assignment. Although I am a programmer in industry, I don't do
a lot of C++, so I ended up doing this as a learning ...
3
votes
2answers
72 views
Loading items from XML document
I'm making a game in Unity and I need to have a inventory/item system, I decided to store my items in simple XML document which I later read from. I'm planning to have different varieties of items and ...
5
votes
1answer
81 views
Civil status database with Django
I'm beginning with Django and I have a Civil Status project.
I created my first models.py in order to get a Form, but I had some advices in order to normalize my database.
I made this process and I ...
3
votes
2answers
72 views
Read in file, and then compute class mean, median, max, min, class averages & update file
The application is designed to read in class results of individual students from a single text file, and then manipulate the data to give information such as class mean, median, max, min, individual ...
6
votes
1answer
128 views
Car leasing system - add lease to database
I just came back to programming and decided to create a car leasing system (GitHub page here.) to teach myself about databases, gui programming and web development. And I would like some input on what ...
1
vote
1answer
44 views
Database Dynamic Table Creation
The code below is meant to build an array with certain properties neccesairy to create column for a table in a database.
Would there be any more effcient way of doing this?
...
2
votes
1answer
46 views
Classical model for database connection provider
Let's forget about Spring Singleton Beans and about other frameworks in Java. We have one or more simple HttpServlets. And we should make database connection. (doesn't matter what is it, hibernate ...
2
votes
2answers
99 views
Repository searching code duplication
A followup question to this: IQueryable Extensions working on expression for collection property
I am working on a project for a family member which involves the use of a database and a repository, ...
3
votes
1answer
112 views
Text-based menu to manipulate a database text file
I am making a program that lets a user manipulate a database (a text file).
In the code I am posting, I show only 2 of the menu choices, namely "createdb" and "deletedb", and a few functions I made ...
5
votes
1answer
25 views
Interpreting database values as times and integers
I am working through Chapter 10 of Haskell Programming from First Principles.
I've gotten the code to work, but I am uneasy about the fact that a few of my functions - namely, ...
2
votes
0answers
24 views
Google App Engine - Blog Post & User Profile Handler
I am currently developing a web app that lets users submit posts and replies, and they can have their own profile which lists all the submitted posts and replies. I am also using X-AppEngine to fetch ...
0
votes
0answers
43 views
Generating Django fixtures from .csv
I've written this script to create a Django .json fixture starting from a .csv.
The .csv must have 'model' and 'pk' fields. What do you think?
...
-1
votes
2answers
45 views
Wrapper Connection PDO PHP [closed]
This is my wrapper, how can i improve this? (With a Singleton too)
...
3
votes
1answer
212 views
Storing database references to files/media
This is an extension of this question due to it not covering an important role of my setup that I think needs more attention.
The files are stored on a different server for separation and convenience....
6
votes
2answers
58 views
A telephone book command line program in ANSI C - follow-up 2
(See the previous iteration.)
What does this program do?
This program gives you a command line interface for managing your personal telephone book. The program supports three actions:
Adding a ...
1
vote
1answer
72 views
Java HikariCP classes
I'm currently making a server in Java, as database stuff I'm using HikariCP (because AFAIK, it's the best library). I try to do it as good as possible so I hope some of you can review my classes.
...
3
votes
2answers
120 views
Fetching records, optionally including deleted records
I have an original method that almost does what I want (a method I did not create), but now I need to find records that were deleted so I added another method ...
7
votes
4answers
843 views
Inserting a DBNull value into a database
I have code which works pretty well. I just need some of your opinions on how to write it better with fewer line of code. I want to use a ternary operator but I couldn't make it work so I did an ...
0
votes
1answer
154 views
JDBC helper model
I needed to create a basic JDBC helper class for our JDBC connection and wanted to know if my design is appropriate or needs cleans up?
Just a basic JDBC utility class which helps reduce the ...
1
vote
1answer
48 views
A telephone book command line program in ANSI C - follow-up
(See the next iteration.)
This question is a slight improvement over A telephone book command line program in ANSI C
I have incorporated almost all points stated by Toby Speight.
Now I have this:
...
4
votes
1answer
71 views
A telephone book command line program in ANSI C
(See the next iteration.)
Introduction
I was in the mood for some C code and wrote this program for handling a personal telephone record book. One of the goals is strict portability; the code ...
7
votes
0answers
119 views
Harry Potter's Family Tree Database
As an assignment for a class, I have made a small Harry Potter family tree in Prolog. It compiles into a self-contained executable that can be run straight from the command line on Linux machines. ...