People who code: we want your input. Take the Survey

Questions tagged [database]

A database is any organized collection of data organized to provide efficient retrieval.

Filter by
Sorted by
Tagged with
3
votes
1answer
29 views

Creating a join table entry by looking up name

I wrote a stored procedure that allows a join entity to be created by name for my fictional characters database. I would like some feedback on it with regard to exception handling, and conditions I ...
5
votes
1answer
7k views

Importing database of 4 million rows into Pandas DataFrame

I am using the following code to import database table into a DataFrame: ...
0
votes
1answer
505 views

Normalizing an apartment rental database [closed]

We are to normalize a database, though it is mostly all theoretical, we aren't actually plugging in the SQL. This is the Data we have normalized to these tables.. and here is our SQL for normalizing ...
1
vote
0answers
106 views

JSON file for storing means and standard deviation values per demographic group

I wrote an ad hoc script in Python 3 that calculates where the patient result reside with a specific demographic group within the Turkish population, but until now I stored the data in the python code ...
2
votes
1answer
47 views

Query for stddev of number of stars per chatroom message

I am learning SQL today, so I decided to practice by writing some queries for The Nineteenth Byte Data Explorer. This is a PostgreSQL database about messages from The Nineteenth Byte chatroom, created ...
4
votes
2answers
590 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
2k views

Design pattern to implement Database operations [closed]

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
146 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 ...
2
votes
1answer
481 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
4k 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
61 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 ...
6
votes
1answer
69 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 ...
6
votes
1answer
1k 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 ...
2
votes
1answer
160 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
101 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, ...
9
votes
1answer
263 views

Job listings database project in Node.JS

Build a project which can allow user to post and search for job listings, I have written some code and divided into different modules. My motivation is to understand how much over-engineering is ...
2
votes
1answer
97 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 ...
8
votes
1answer
658 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 time not picking Java or C# for a new project... Now I've found something for which C++ seems to be the ...
2
votes
0answers
54 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 ...
4
votes
2answers
7k 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
37 views

Map groups to parent products using nested subqueries

I have the following tables ...
2
votes
0answers
1k 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
10k views

Address book program which saves contacts to text file

...
2
votes
0answers
851 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 ...
3
votes
2answers
1k 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
177 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
251 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 ...
4
votes
1answer
11k 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
220 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
2k 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
191 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. ...
8
votes
1answer
172 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
182 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
135 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 ...
2
votes
2answers
2k 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
235 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
67 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? ...
3
votes
1answer
176 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
119 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
479 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
51 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
55 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 ...
-1
votes
2answers
219 views

Wrapper Connection PDO PHP [closed]

This is my wrapper, how can i improve this? (With a Singleton too) ...
3
votes
1answer
465 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....
5
votes
2answers
95 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
2answers
269 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
128 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 ...
10
votes
4answers
22k 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
667 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
63 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: ...

1
3 4
5
6 7
11