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

learn more… | top users | synonyms (1)

3
votes
1answer
68 views

Returning an IEnumerable using Linq-to-SQL which is then bound to a GridView

This function works, but it's really really slow and the generated SQL is gargantuan and horrible to look at. It's also very expensive to run when it shouldn't be. ...
3
votes
0answers
32 views

Seeding a database

I'm seeding my database with really complex code as I think. It works but is not good. Constrains: Every meal has exactly ONE main dish (marked as is_main in ...
0
votes
0answers
5 views

Designing in MongoDB [closed]

I'm designing a simple "social network" with MongoDB. And I am wondering if what I did so far is OK or not, and some cons. The idea is, lets suppose: ...
6
votes
2answers
156 views

Saving and Loading data with SQLite

I'm in the process of learning SQLite in C# and I've come up with some generic methods for finding and updating data. I would appreciate any pointers with the design of my methods and/or my SQL ...
6
votes
2answers
625 views

Simple customer program in C (using binary files)

I have just finished a simple C program which is basicaly composed of 3 functions: accadd(void){} which adds some customer details to a binary file ...
3
votes
1answer
22 views

Database trigger to monitor insert/update events and update another table

I am working on a MSSQL Database (for a program called Sage 200). There are many tables in the database, however, I want to be notified of changes (new record inserted or existing record updated) via ...
4
votes
1answer
36 views

PDO connector class

I have created a DB connector class with PDO. Do I need to add, delete or edit anything in this code? ...
1
vote
0answers
36 views

Locate enteries to the nearest date selected

This code loops through a given range of dates and for every 5 minute iteration pulls up the last known records of the users in the database relative to that timestamp. I'm trying to find a way to ...
3
votes
1answer
55 views

Updates list in haskell to remove duplication

The task in question allows a user to re-rate a film such that only the latest rating from the user should remain in the database. Initially I solved this problem in a very basic manor? This was my ...
25
votes
5answers
3k views

Performance of a Foreach inside a Foreach iterating through a million records

I have two DataTables: dt: is populated from a CSV file with over 1.7 million rows dataStructure.Tables["AccountData"]: is ...
3
votes
3answers
48 views

Perl DBI insert of hash

How can this method that inserts a hashref into a database table be improved? It assumes that the columns of the database table are named identically to the fields in the hashref. The return value ...
3
votes
1answer
32 views

Simple Notification class that models database

I'm updating a website I made awhile ago from a functional design to an OOP design. There are still a lot of functions below this class that I haven't implemented yet but I'm getting to it (such as ...
0
votes
2answers
33 views

Database Connection and Query methods

I have my class DBFuntcions containing this 2 methods: The method for the connection to the database: ...
1
vote
2answers
79 views

Entity framework - code first data access

I'm looking for your opinions about ways to improve the access to data in my application. I develop web applications, using Entity Framework 6 code first, and Autofac for dependency injection. Before ...
1
vote
3answers
138 views

Make C# Unity Script database methods more re-usable and concise

I have a C# file, that makes some modifications on screen (changes the text on the user interface) but I have some doubts: How I can re-use the below methods to be more concise and reusable? How I ...
4
votes
3answers
118 views

Write data from database to a CSV file

I have a database containing a high amount of data. I want my app to filter and select only some of it, and save it into a CSV file or JSON. For the moment I have this method which takes the data ...
1
vote
1answer
36 views

MySQL Database Design for Easy Item Relationships and Meta Storage

I'm playing around with database designs to use for a new system. This system at its core revolves around various types of items (users, accounts, images), their meta (names, titles, file sizes), and ...
1
vote
1answer
21 views

Database schema for a products and bugs aggregator

As an exercise in learning, I'm creating a bugs/issues tracking and "aggregator" web application. A simple app consisting of products, issues, reviews and links related to it. The links will be urls ...
3
votes
1answer
81 views

C# class that handle MySQL db connection

I've built a class that handles all my connections to a MySql database. These are the function I use to create the connection(not really sure about the two dispose functions) : ...
4
votes
3answers
100 views

Amanda's Relationship Tips app, with scroll performance issues

I am having some major issues with scrolling in my active app "Amanda's Relationship Tips" Under the User Advice tab: I'm using the Parse Database as a backend to pull user data. This lag is ...
1
vote
1answer
98 views

PHP/MySQL - OOP database class

I use this database class in a CMS, just a project to learn OOP. Would like to have some review on how to improve it, what should I change, add, remove? ...
1
vote
1answer
69 views

Restricting types not related through inheritance without using instanceOf by creating own class hierarchy

Restricting types not related through inheritance without using instanceOf by creating own class hierarchy. It needs to interact with a key value data store, will ...
1
vote
0answers
29 views

Calculation of duration between two timestamps in different rows

In my sample data table below, all datatypes are varchar(255). ...
1
vote
1answer
43 views

Aggregating search results from multiple databases, in smaller work units

I have a large function that performs a search over a data set given a set of parameters. This function goes through multiple databases which all hold data that would comprise one final entry from the ...
1
vote
1answer
85 views

Many CRUD operations for a list of technicians' shifts

The following code snippet is causing me a performance problem in my application. The first 5 db queries are not high time consuming, the real problem lays on the foreach loop. I considered to use ...
4
votes
1answer
54 views

Database Session Class

I have made the decision to move the storing of session data from the filesystem to the database. Our application is growing at pace and we are having issues with the load balancer breaking the ...
7
votes
3answers
147 views

Swing UI for database-to-Excel tool

I'm just wondering what is the cleanest way you can write your GUI/Swing code? Right below is the code I have for my main frame. Could you guys let me know if it looks clean/understandable, and if ...
3
votes
0answers
41 views

Implementing a long-running entity lock

Requirement I have an entity named ImportData which can be processed once in order to extract data from a file fed to the application. I need to make sure that, ...
8
votes
0answers
72 views

Go database helper code

Today I've implemented a database helper in Go. I'm new in Go world so I just wanted someone with more experience to take a look and tell me what is good and especially, what is bad (and why, if ...
11
votes
1answer
49 views

Mysql homeowner database

I'm working on a project right now. I don't have much experience in MySQL, or database design, so I was hoping someone could review what I have now. This database must be able to track multiple home ...
2
votes
0answers
21 views

Minimizing database overhead by storing additional information to the users authentication-object (Spring Security)

I am using Spring Security in order to check if a logged in user is authenticated. However, after authentication, as some actual requests come in, I would like to minimize the number of database calls ...
3
votes
2answers
57 views

“Time till” program

I have created a program which works out days, hours, minutes, seconds and milliseconds until a date which the user inputs. Is it possible to shorten/make the output a little clearer? ...
8
votes
2answers
92 views

Code First approach, feeding the table

I have a database (PostgreSQL) from which I want to migrate some data to a MS SQL Server database. I decided to use a code first approach. The question is related to the proper way of feeding my new ...
3
votes
1answer
57 views

Entity Framework Code First Softball Stats Database Schema

I am creating a website for my buddies and I to track all of our offensive softball stats. I am getting tired of maintaining a huge excel spreadsheet and emailing it out every week, so a website is ...
5
votes
2answers
65 views

Selecting users with biopsies in a given country for charting

I have this monstrosity ...
6
votes
5answers
440 views

Function to get rows from database

I have a function that returns rows from my database, and it works fine, but I was told that it was poorly written, and there is a lot of unnecessary code in it. I'm wondering if there is a simpler, ...
7
votes
1answer
197 views

Generic asynchronous SQLite search builder

I am writing a database manager that reads and writes to a local SQLite database on a mobile device. It works pretty well for the most part, but read access is somewhat slow - it takes about 2-5 ...
1
vote
1answer
38 views

Speeding Up JavaMail Sending

I am creating a miniature bulk email sender. I am using Postfix on Ubuntu with JavaMail. Here is the key part of the code: ...
3
votes
1answer
54 views

Mapping different classes to the same database table

I have several very similar subclasses that I (think I) want to be stored in the same database table. Most of the fields are identical, with each subclass adding 1 or 2 custom fields. My code is using ...
2
votes
0answers
67 views

Controller method to add a product, stored across three database tables

I have some questions on how I can improve this "add" action method in a controller. Using a single form, the user can upload a product to be displayed on the site. A Product is composed of three ...
3
votes
2answers
70 views

University Database

I am building a database for a hypothetical university. This is my SQL definition, with generated data added for my future use, such as demonstrating queries: ...
4
votes
1answer
43 views

A simple parcel checker Python script

My current student accommodation uses a manual paper and pen system for checking if students have mail so I made this simple Python script to help mitigate the problem of manually searching through ...
14
votes
1answer
107 views

Example script for teaching DDL and CRUD/DML operations

I have taught some SQL to others before, and I thought of making a script that has these attributes, for the purposes of teaching: Fully functional to run on local DB instance with no fuss Easy to ...
3
votes
1answer
38 views

Usertool For Website Admins — Follow up

A while ago, I posted about creating a user tool for forum admins that allows them to add, edit, and delete users from their desktops. This still is not complete, posting for review on tool so far ...
0
votes
0answers
28 views

BaseX datastore update operation performance improvements

I am implementing social networking functions for benchmarking different datastore. I am having trouble with BaseX datastore which is new, still evolving with updates. When I read/retrieve from Basex ...
5
votes
1answer
26 views

Gathering distinct patient diagnosis records

This code correctly gathers diagnosis records for a patient to show distinct records based on the AMA ICD9 code, diagnosis description, and date of posting. The output is distinct on (ICD code, ...
2
votes
0answers
69 views

Clean reading of HTML table with R

I have some data under an HTML format and would like to import it in R. However, it seems that type inference is much less sophisticated than what exists with functions such as read.table. I am using ...
14
votes
2answers
132 views

Builder pattern for users in document database

I'm attempting to make a builder pattern that makes sense and is practical for storing user data in a flexible way in a document database. The DB I chose is MongoDB, and I'm using its Java API ...
2
votes
1answer
159 views

AngularJS code to query DB and update $scope

I have an AngularJS function that is used to determine which $scope associative array variable is to have data pushed into it. I would love to be able to remove the ...
2
votes
1answer
117 views

Login/registration part of an Android application

I made some PHP files for the login/registration part of my Android application and I would like to know if it can be made safer. config.php: ...