A database is any organized collection of data organized to provide efficient retrieval.
0
votes
0answers
15 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 change, add, remove?
...
0
votes
1answer
34 views
Restricting types not related through inheritance without using instanceOf by creating own class heirarchy
Restricting types not related through inheritance without using instanceOf by creating own class heirarchy
Need to interact with a key value data store, will convert to object before putting but need ...
1
vote
0answers
23 views
Calculation of duration between two timestamps in different rows
In my sample data table below, all datatypes are varchar(255).
...
1
vote
1answer
40 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
76 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
46 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
128 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
39 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
55 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 ...
12
votes
1answer
48 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
19 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
91 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
53 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
64 views
6
votes
5answers
421 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
153 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
37 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
53 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
53 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
60 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
38 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 ...
13
votes
1answer
94 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
37 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
21 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
20 views
Gathering distinct patient diagnosis records
PostgreSQL 9.2
The below 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 ...
2
votes
0answers
50 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 ...
13
votes
2answers
120 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
89 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
73 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:
...
2
votes
1answer
102 views
Separate model from DB mapper (entity manager)
I've read that it is good to separate model from DB mapper (entity manager) (but at the end, it is perhaps personal - just a matter of opinion). Anyway, if I understood correctly, I should not have ...
3
votes
1answer
92 views
Constructing NewsArticle objects from a database table
This class seems to be able to represent the data stored in any possible database table:
...
2
votes
3answers
271 views
DataGrid Filter Method Very Slow
I'm having a lot of trouble in my Database program with trying to implement an effective DataGrid filtering method. After taking advice from a previous code review I'm trying to implement a DataModel ...
0
votes
0answers
34 views
SQLite app for local storage
When I make an app using SQLite for local storage I've settled into a nice routine; create a contract class and a extended BaseColumns class to hold column names ...
2
votes
1answer
67 views
Database Connection Program
Earlier today I asked a question as a guest (whoops) regarding my Database program. I could not comment nor post again asking for further advice from the people that answered my question. I have ...
3
votes
2answers
109 views
Database Connection Program With HR Functionality
I've started writing a fully functional Database program in C# that allows a user to access a HR system (with more systems planned in the future). I have come over to C# from Java around two weeks ...
2
votes
1answer
91 views
Customize data types in a generated model with hibernate
I have a Spring/Hibernate application with the following domain class (irrelevant code stripped for brevity):
...
1
vote
3answers
133 views
Checking user access to servers
I have pasted a method I wrote, which is too slow to my liking (easily takes 60+ seconds to execute). The method loops through 12 different servers, checks if userX has access to any of the databases ...
2
votes
1answer
28 views
Find foreign key membership including owner in SQL Server
Was hoping someone could sanity-check this SQL statement. I need to find the owner (schema), table, and column on both sides of a foreign key:
...
1
vote
1answer
92 views
Key Value Store for Android on top of Sqlite3
I wrote this simple key-value interface on top of Sqlite3 to use in my Android app. I am using this to persist Java objects as strings converted using Gson.
The public API has 3 methods.
...
5
votes
1answer
208 views
Use PreparedStatement to insert into H2 database
This question is related to my question on Stack Overflow earlier today. After getting suggestions on using the PreparedStatement from Java I changed my code a ...
2
votes
1answer
44 views
Importing Excel file to a database just once
How should I rewrite an if-return-else condition in the middle of this function?
...
1
vote
1answer
111 views
PHP script to connect to MySQL database using PDO
Introduction
I am preparing to use a basic script to cover how you can connect to a MySQL database using PDO. This script is meant for educational purposes (introductory class on PHP/MySQL) and does ...
2
votes
3answers
169 views
Music collection with lyric songs and instrumental pieces
I have problems with dealing with derived classes that inherit from the same base class.
I have 2 types of songs:
Songs with lyrics that have: Title, Tags (sad, happy etc.), lyrics (one line), ...
3
votes
3answers
72 views
Grabbing hashed password from a database
I have just discovered the beauty of prepared statements in PHP and how they protect against SQL injection. In my first time using them, I am attempting to grab a hashed password from a database and ...
3
votes
0answers
183 views
Combining pagination and non query grouping in Slick 3.0
I have the following tables:
val postTable = TableQuery[Posts]
val postTagTable = TableQuery[PostTags]
val tagTable = TableQuery[Tags]
One post can have multiple ...
10
votes
5answers
1k views
Marijuana information program
I made a simple marijuana information program in which I give the user a list of strains and give the user information about it, like: effects, medical, negatives, and its cannabis type ...
4
votes
2answers
36 views
Multiple DB record creation after a successful operation
I am working on a payment process. Upon a successful payment process, I have to create multiple records. For that, I have made this class:
...
3
votes
1answer
137 views
Versioning documents in Couchbase
I've just converted a class for versioning Couchbase documents from Java to C#, but I'm not 100% familiar with the Couchbase API so would like some feedback.
The original class can be found here.
...
3
votes
1answer
32 views
Updating multiple membership plan expiration dates at once
I have model action in RequestAdmin like this:
...