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

learn more… | top users | synonyms

2
votes
0answers
34 views

Matchmaking two clients together [on hold]

The approach I am using to match two clients together is as follows: Client sends token to server Server creates an entry in the matchmaking table Client sends ...
4
votes
1answer
113 views

How do I add JDBC and Queue functionality to a simple server?

I would like to add some capabilities to the server. Firstly, it should accept and handle connections with multiple clients, so that there are no mixups between clients. Secondly, there should be ...
0
votes
1answer
75 views

Did you like my product?

I have the following MySQL query which selects product details and whether the viewing user likes them. I feel like it could be more efficient and that there is a more practical approach than using a ...
0
votes
0answers
5 views

Implementing locks to make Google Search API ACID (Transactional)

x-post from StackOverflow, but I realized this question might be a better fit for this community. I'm working on an AppEngine project that requires flexible searches over a dynamic dataset, and ...
4
votes
1answer
45 views

Persistent key value store for Python using SQLite3

This is a module to implement a key value store in Python using SQLite3. Originally written to allow sharing of configuration among multiple threads that are already sharing a SQLite3 database, I have ...
0
votes
0answers
8 views

MySQL Structure - Need some feedback [migrated]

I am trying to create a movie database (wiki style) and I am stuck on the database structure. I would like some help and suggestions please. Here is my basic idea: movie_table ...
0
votes
0answers
6 views

“Wide” vs “Long” Database Structure - Is there a logic when to use which? [migrated]

I'm currently setting up a database to house records for an application I'm writing and am trying to come up with the most efficient DB structure to use... Of course I know that there are as many ...
2
votes
1answer
45 views

DB security and efficiency in WordPress plugins

I recently wrote my first WordPress plugin, which was also my first PHP project. After I was done, I didn't care for the code at all, so I have spent the past couple of days refactoring it. I'm trying ...
4
votes
1answer
95 views

My simple PDO wrapper class

I made a simple database class and I wanted to know if there are any improvements I could work on as far as readability, efficiency, methods and making it modular goes. Any other suggestions are also ...
1
vote
2answers
55 views

Where to protect DB data against XSS injections?

To protect my web site against XSS injection, I am using OWASP Encoding Project. Is it a good idea to protect all data retrieved in my DB to avoid XSS by going throuh all the data just returned by ...
2
votes
2answers
55 views

Managing and searching objects using tags

I wonder Is it appropriate to hide imported classes (collections and UserDict in this case) from Python IDE (e.g. IPython)? Is there a more efficient algorithm/implementation? Please feel free to ...
2
votes
1answer
69 views

Security of authentication check for a blog

I am currently making a very big blogging system for my Website where I want really neat code! So, I was wondering: is this method safe/does it have any problems with security? Yes, I'll be encrypting ...
7
votes
3answers
458 views

Are these Java MySQL connection classes and methods implementation the optimal?

I got three classes for MySQL Database access/manipulation, First : Conector. It has got methods for connecting, disconnecting, querying and updating db. Second : ...
2
votes
1answer
54 views

Delivery geolocations query

I have the below MySQL query that does exactly what I need. But I am sure there are better queries that do the same thing. If you see something very ugly or bad and have any suggestions, I will be ...
2
votes
1answer
62 views

Cleaning up nested promises in Cloud function

I am writing the Cloud function for Parse whose purpose is to update my database with a provided array of data objects. The main problem are the nested promises, which doesn't look right. Any help ...
6
votes
2answers
91 views
6
votes
2answers
127 views

My database class extends MySQLi

The following is a small class I extended MySQLi with. I'm going to use this in my upcoming projects, but my main reason to do this class is learning, so I would like to submit this for your review, ...
5
votes
1answer
34 views

Separating Duplicates from Uniques

I have a MySQL table with a very large data. What I need is to find and separate duplicates from the unique rows Let's say this is my table: ...
3
votes
1answer
134 views

Flat-file DB with CRUD

I just finished writing a flat-file DB class for PHP which supports selecting, updating, inserting and deleting. I was wondering if there are any ways to make it faster or if I'm doing anything the ...
3
votes
1answer
66 views

Appropriate way to create object for storing data in a ListView & Profiling

I'm creating a location based reminder application in Android using proximity alerts, geocoder, Google Maps API and their Places API. Currently there is a default ...
2
votes
2answers
97 views

how can I factor out REST-POST activity to a manager?

I have this RestPostActivity: ...
3
votes
1answer
251 views

Simple in-memory database

How can I improve this code (elegance, best practices, etc)? ...
7
votes
2answers
303 views

Using keywords async/await in database queries (Windows Phone 8)

I have a local database in Windows Phone 8 app. The app includes a lot of queries to the database and I don't want bad effect on the responsiveness of UI. For ...
6
votes
3answers
322 views

Repository pattern review, question about when dispose the Context

I have a question about the Repository pattern. This is my repository: ...
4
votes
4answers
90 views

Music list program

I need a little help with improving my first Java program. I have programmed for about a month, so my code is quite messy. The program is a "Musiclist" program, with which you can add songs, edit ...
4
votes
1answer
189 views

In-memory data cache architecture for data transfer

I am writing a cron job to manipulate and transfer remote data. I need to cache data from a table, process it, merge with previous table, iterate the process, and eventually send the result data to ...
1
vote
1answer
95 views

Updating visiting dates of each visitor

I am still a PHP beginner. Please review/improve my PHP code and reveal errors, typos and warnings. ...
1
vote
1answer
69 views

Data table class

so this is my code and I just want to improve it, I'm a beginner so I think there are some better and short ways to do what I did here. Any Ideas? The code: ...
1
vote
1answer
76 views

Login and User Information Requests

I am trying to improvise a piece of code. The best is to get reviews from experts, so here I am. Can you have a look? What do you think of it? Any suggestions? This code basically connects to a ...
5
votes
1answer
427 views

A Simple Cache class

“There are only two hard things in Computer Science: cache invalidation and naming things.” -- Phil Karlton That being said, I created this SimpleCache class which I intend to use to cache ...
1
vote
0answers
103 views

In-memory data cache architecture

I am designing a basic in-memory cache storage with a thin CRUD (actually CRD) interface. The design is inspired by backend solutions such as Parse and StackMob. Main characteristics: Cache ...
1
vote
2answers
759 views

SQL database design e-commerce

I am new to database design but am fairly familiar with SQL and its syntax. I want to create a database for an E-commerce website that will sell a single product type such as a shirt. They could be ...
4
votes
2answers
310 views

Implementation of OOP for retrieving list of objects from database

If I have a Person class that outlines the properties of a person and one of People that just contains a ...
0
votes
1answer
73 views

API request and database insert

This is a pretty big undertaking for me with my basic skills, and I was kind of flying blind. It's basic in its intent: get a bunch of case info from a helpdesk app and put it into a database. There ...
2
votes
1answer
130 views

Insert or update a user in database

The code uses SQLAlchemy Core. However, what I want to know is if writing code in this pattern is recommendable. ...
3
votes
1answer
2k views

How to use ByteBuffer properly?

I am trying to use ByteBuffer properly with BigEndian byte order format. I have couple of fields which I am trying to put together into a single ByteBuffer before storing it in Cassandra database. ...
2
votes
1answer
630 views

Builder pattern for Codeigniter ActiveRecord queries

I am using Codeigniter and it's ActiveRecord. I had this idea for a base class that provided a generic getter/setter for doing simple queries on a database. I have a lot of database objects that ...
4
votes
2answers
125 views

Optimizing join statement

I have this piece of code: ...
2
votes
1answer
179 views

Building a simple database in Python

I choose to use a dictionary to store the variables for fast GET and SET commands. In my code, I have saved all of the open ...
1
vote
1answer
837 views

PDO class for multiple databases

I have PDO class below: ...
1
vote
1answer
43 views

First Schema for Location and Countries

This is my first MYSQL schema for caching location data (co-ordinates to place names) and referencing it with a country. I was wondering what everyones feedback was on it, did I do a good job? ...
14
votes
1answer
15k views

Very simple PHP PDO class

There are many PHP PDO classes out there, agreed. However I find they do not allow for flexibility. So I created one that helps reduce development time as little as it may be but it does the job ...
0
votes
1answer
196 views

guide me to make my code perfect

I had made some of pages and they work but I'm not sure if I coded it in best way so I want your suggestions and ideas to make my code better. connection.php ...
1
vote
1answer
141 views

Generic DB Value Getter

I'm trying to see if there is a better way to do this when I just need one column with one row. Do not mind the lack of use of a prepared statement, I will put it in. ...
5
votes
1answer
563 views

Logfile parser for Team Fortress Classic video game

I'm currently working on a logfile parser for a pretty old videogame called Team Fortress Classic, which can be compared to Counter-Strike 1.6 and is available on Valve's Steam platform. I started ...
3
votes
2answers
127 views

Querying a database with PHP

I'm new to PHP programming. I would love some feedback on this simple code I wrote which queries a database based on some arguments supplied by a user and returns an HTML table displaying the data. ...
1
vote
1answer
113 views

Need your opinions on my database normalization attempt [closed]

I'm working on a project with CakePHP where it will allow users to log their drug use. Be it alcohol, caffeine, or whatever else. When people add a log, they select the substance from a drop down, ...
2
votes
3answers
99 views

Improve my SQL select statement

I have three tables for a blog system. The blog ...
5
votes
1answer
620 views

Generic method for database calls

Background Breaking from MVC, I've implemented the following architecture: POST/GET ➤ PHP ➤ Database Calls ➤ XML ➤ XSLT ➤ HTML All database interactions are ...
0
votes
1answer
122 views

Database “design” using Symfony2 and Doctrine2

I'm working on an application, which tracks expenses. I have users, and each user can create his categories for the expenses (like Food, Bills, Transport, Drinks, Clothes) and then create expenses - ...