Questions tagged [database]

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

Filter by
Sorted by
Tagged with
6
votes
2answers
178 views

Database data insertion

...
5
votes
2answers
8k 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, ...
4
votes
1answer
2k 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 ...
4
votes
1answer
1k views

Location-based reminder application

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
332 views

Factoring out REST-POST activity to a manager

I want to factor out the AsyncTask to a Manager. I thought to make it a singleton, but then I cannot use generics as the object ...
3
votes
1answer
4k views

Simple in-memory database

How can I improve this code (elegance, best practices, etc)? ...
5
votes
1answer
236 views

Truncating long strings when saving inventory items to database

To test incoming data for string values that are too large for the "database" (MS Access), I could do this: ...
8
votes
2answers
2k 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 ...
10
votes
4answers
18k views

Disposing the Context in the Repository pattern

I have a question about the Repository pattern: ...
4
votes
4answers
3k 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 ...
5
votes
1answer
427 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
141 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: ...
7
votes
1answer
12k 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 database ...
2
votes
0answers
321 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 consists ...
4
votes
2answers
8k 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 ...
3
votes
2answers
102 views

Getting student demographics report with ActiveRecord

I have two active records StudentDemographics and StudentWeeklyReport both having has_many ...
12
votes
1answer
13k views

Storing a ByteBuffer into a Cassandra database

I have a couple of fields which I am trying to put together into a single ByteBuffer before storing it in a Cassandra database. That byte array which I will be ...
2
votes
1answer
3k 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
3k views

Optimizing join statement

I have this piece of code: ...
2
votes
1answer
2k 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 ...
3
votes
5answers
244 views

Getting the unique identifier from a given login username

Are there any issues in this code? ...
3
votes
2answers
175 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
210 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 - ...
3
votes
1answer
2k views

Basic Java database

I just wrote my first Java database program for the purpose of getting feedback on the implementation and coding. It has 1 table and 2 buttons and prompts the user to select a folder, lists the ...
1
vote
2answers
3k views

Database abstraction class

The class does some database abstraction operations. And while I could have just used an ORM, I prefer to get my hands dirty when learning something new. There are no bugs (not as far as I know anyway)...
4
votes
1answer
4k views

Handling of open database connection and calling shared function from WebAPI

I'm working on an ASP.NET project using VB.NET that uses Dapper and the code as implemented so far runs fine with just me testing. In the example below, Dapper calls a stored proc. But I am ...
4
votes
2answers
1k views

Android database access

For my simple Android application, I don't want to use an ORM. I'd like to have a db-communcation layer easy to user, to read and efficient. This is my solution: every entity (ex: Person) as an ...
3
votes
1answer
535 views

DAO Layer Code Review

Please review my following code for DAO layer. ...
2
votes
1answer
2k views

Testing database table creation with NUnit

I'm new to using NUnit and have written a test to check for the existence of a database table. I have the below code that should check whether a new table named NewTable has been created in the ...
2
votes
1answer
72 views

ORM Entity with many similar relationships

To provide some background context, I'm implementing a web-based solution (Java, Spring, Hibernate) that allows the creation/authoring of task-centric workflow documents. Basically a workflow ...
2
votes
2answers
266 views

Inserting into a database using JDBC

I am trying to insert into a database using JDBC and each thread will be inserting into the database. I need to insert around 30-35 columns. I wrote a stored procedure that will UPSERT into those ...
4
votes
2answers
206 views

Inserting into database columns

I am trying to insert into a database using JDBC and each thread will be inserting into the database. I need to insert into around 30-35 columns. I wrote a stored procedure that will UPSERT into those ...
1
vote
2answers
872 views

Using a dependency container to load a parent/child class

In PHP, I have a parent/child class and am using dependency container to load them. I am trying to use the same database connection on all of them without duplicating the object. I used ...
2
votes
2answers
6k views

Payment application database

I would really like some advice from any DB gurus who have a few minutes free. After doing some reading and playing with sqlfiddle over the weekend I have constructed this PostgreSQL schema and it is ...
2
votes
1answer
14k views

NHibernate session and transaction implementation

In order to create loose coupling architecture on my web applications, I have created my own implementation for ORM, in this case, NHibernate. I want you please to review the code and tell me if you ...
1
vote
1answer
368 views

How to write a stable WCF service

I'm writing a WCF service for validating password and getting company ID for the clients that requests the services. The service runs on a server locally as a windows service, which sends queries to ...
3
votes
1answer
442 views

Model for web applications

I'm developing a model for web applications. The database that I use is Redis. I created special DbField objects like ...
1
vote
1answer
118 views

Basic commenting structure for commenting on objects [closed]

I would dearly love some feedback on the model below. It's a basic commenting structure where users can comment on a variety of objects in the model. I have denormalised it to make querying simpler, ...
3
votes
1answer
825 views

Database, User and Validator in PHP

Please review my classes and give me some advice to improve them. I have also put some additional questions in the code and I hope you can give me an answer for some of them. Database.php ...
2
votes
1answer
427 views

Adding new methods to GenericDataAccess

I have this GenericDataAccess class to interact with database from my school. I want to ask for some suggestions and advice in how to to improve it and add new ...
2
votes
1answer
6k views

reusable data access class in C#

Below is my attempt at the beginnings of a reusable ado.net data access class. Please let me know of any improvements that I could make. Thanks! ...
4
votes
1answer
284 views

How can I improve my PHP model for my HTML5/JS mobile app?

I am posting the a section of the model of my application. Any/all feedback would be very helpful as I am trying to build my PHP skills, but I will ask a couple specific questions that might help ...
3
votes
1answer
371 views

Is my base class constructed correctly?

I have tables that use BulkManager to save data to database. I moved common functionality to BulkTableBase. Because creation of ...
4
votes
4answers
647 views

DAO for happenings registration website

As a learn-by-doing project to learn Java webapps, I'm creating a website for registering and displaying happenings using JSP/Servlets, Apache Tomcat server, JDBC and a MySQL database. I use JSP for ...
2
votes
2answers
1k views

Flexible and modular CMS with user management in CakePHP

Please review my database design: I think it is quite self-explanatory, but to be absolutely clear: My goal is to make an application which has a super flexible user management (which is why the ...
7
votes
4answers
444 views

Storing .h files in SQLite using SQLJet

I’m trying to learn as much as I can on my own by reading lots of examples, documentations, and asking here. I would like to improve my style to write efficient code and adhere to Java standards. In ...
1
vote
0answers
10k views

Using database connections in PHP classes

I need some advice\suggestions on how to create\handle database connections for a project I'm working on. I'm creating a simple work order system for my company using PHP 5.4.3, right now there isn't ...
0
votes
2answers
229 views

How to Improve This Program, Add Comments, etc.?

Do you have any suggestions to improve or extend this script? Any ideas for removing or adding comments/docstrings? ...
2
votes
2answers
2k views

An object-oriented student record system

I'm after a collection of opinions regarding cohesion and coupling with my application to improve OO programming. Control Class - Populates test data and calls main menu ...
8
votes
1answer
878 views

Fluent interface for manipulating employee records

I wanted to try experimenting with fluent interface design in the C programming language. That's why I wanted to ask you, Dear Code Review users, comments on the way I have implement this simple ...

1
7 8 9
10
11