Tagged Questions

SQL is an acronym, standing for "Structured Query Language" (not "Standardized"). Database interaction requires the use of SQL, and over the years - vendors have implemented extensions of SQL (such as tsql for SQL Server & Sybase, plsql for Oracle, plpgsql for PostgreSQL; there's no known tag ...

learn more… | top users | synonyms

1
vote
0answers
31 views

Better way to write this SQL query and shorten the length

I had to write a SQL query recently to do a few joins and sums, and at the end of it I realized that I have nearly written a storybook. I know the tools to optimize it, but my trouble is the length of ...
1
vote
2answers
61 views

How to optimize this SQL delete

I want to optimize the performance of this SQL query. If I populate this hashtable with one million keys the query will take around minute. How I can optimize this Java method for faster execution? ...
3
votes
1answer
116 views

Getting rows from several tables where one table doesn't include the rows from the next tables

I have some entity that is spread across three tables. I have to get in a single result the following values: All the values that are in the first table but not on the second nor the third. All ...
2
votes
2answers
90 views

Is this PHP/sqlite code safe?

I am a 3rd year computer science undergraduate. One of my university lecturers has developed his own page for students to submit work. It came up that one student was accused of hacking (sic) by the ...
0
votes
0answers
31 views

How to refactor this cursor used in a SQL query

So I got this query from another analyst here and I'm a little stumped as to why a cursor was used instead of just joins. Could I please have some help trying to refactor it? I am using MSSQL 2008. ...
2
votes
2answers
46 views

A database schema for articles and their revisions

I'm designing a super simple web application for creating articles. All articles on this site can be edited by different people and each edit is a revision. Using an RDBMS, this is my schema: ...
0
votes
2answers
81 views

User lib php v2

I've been working some forth looking on design patterns, and I would like some help to improve the code (fixes, tips, just generally improvements, or things you consider bad practise, etcetera in my ...
2
votes
1answer
78 views

I'm designing a DB for an online school. Am I on the Right Track?

Okay, so I'm a not-really-recent-anymore graduate of Michigan Tech. I've been a cook since graduation and I'm an eensie teensie bit rusty in pretty much all my learnin'. Couple weeks ago I got hired ...
0
votes
2answers
141 views

Getting data from database and then outputing it to the DataGridView

I am at the point where I feel that I am not doing it right. It works and does the job, but I am sure that there are more efficient and smarter ways of doing it. I would like to see if there is a way ...
4
votes
0answers
85 views

Conditional Create: must be the only statement in the batch

I only want to create this SQL function if the dependent Assembly exists. I can do it using dynamic SQL, but it seems messy and I lose syntax checking (in management studio). This function's ...
2
votes
1answer
149 views

Android SQL in its simplest form

I thought I would just post a really simple wrapper for those who don't want to implement the retarded SqliteOpenHelper, which is really, really stupid. Below is a class to open/create a database, ...
0
votes
2answers
127 views

Critique my Database design/help me simplify my C# code please

I wish to create a database for a webpage where users are able to add their own events to a timetable. Users will be able to decide if the events should be recurring (weekly) or not. Users should be ...
2
votes
1answer
113 views

Database Code Review

public void AddClient(Client obj){ try{ using(System.Data.SQLite.SQLiteConnection conn = stock.db.SqlLiteConnection.getSQLLiteConnection()){ System.Data.SQLite.SQLiteCommand cmd = ...
0
votes
2answers
133 views

Inserting Data in The Database using LINQ TO SQL

Can this Code be any shorter? because it seems it is very long with just simple insertion of data using LINQ TO SQL public void addPatientInformation() { using(DbClassesDataContext ...
2
votes
1answer
59 views

Working Mysql Query but i need more optimize this query

This project is based on trivia(Question/Answer Quiz) basically scenario its so simple but i have to improve/ more optimize my query using these tables I have 5 different table.... (working Query) ...

1 2 3 4 5 6
15 30 50 per page