Structured Query Language (SQL) is a language for managing data in relational database management systems. This tag is for general SQL programming questions; it is not for Microsoft SQL Server (for this, use the sql-server tag), nor does it refer to specific dialects of SQL on its own.
0
votes
0answers
37 views
T-SQL Issues With Defining 'AS' [migrated]
I am creating a fully dynamic application but have ran into a bit of a hiccup. There are multiple 'undefined' fields that can be defined by the users. The only problem is redisplaying them. Currently ...
-1
votes
2answers
91 views
Servers for learning SQL [closed]
I'm a python/haskell guy that is looking to learn SQL, specifically Oracle's version. Is there like a free Oracle server with dummy data so that I could play with it? I'll take an equivalent MySQL ...
1
vote
0answers
56 views
Designing a universal database driver class
I have a homebrew MVC framework that I have been using for a while, and it has been working great, but I am planning an upgrade to it for its ORM classes. So far, it only supports SQL databases by ...
0
votes
2answers
139 views
Create a database for database tables
I'm working on a project where I have to give users the ability to build their own tables,
each user can create more than one table.
(the type of all data is string).
The user can create a table and ...
-3
votes
2answers
248 views
Why do we still use a programming language instead of using just SQL? [duplicate]
In database managements systems lecture, my professor said that we can use Oracle etc. ui designing tools instead of using Visual C# or etc. He added that SQL is as strong as a programming language. ...
9
votes
4answers
502 views
Will working in IT limit your career prospects as a programmer? [duplicate]
I took a job working as an IT guy (SQL programming, helpdesk, etc.) because I had need of a job (to pay back student loans accumulated from school).
I'm very happy to have a job, but I eventually ...
0
votes
2answers
106 views
Should I retrieve one large set of data to filter or smaller individual sets of data?
I have a company intranet that utilizes a similar set of data across many different pages and many different methods.
Speaking in generalities, is it closer to "best practice" to retrieve a large ...
4
votes
4answers
590 views
why are noSQL databases more scalable than SQL? [duplicate]
Recently I read a lot about noSQL DBMSs. I understand CAP theorem, ACID rules, BASE rules and the basic theory. But didn't find any resources on why is noSQL scalable more easily than RDBMS (e.g. in ...
0
votes
3answers
153 views
How to maintain user relationship when user unfollows another user
I have a table of user relationship which stores who follows whom, the table structure is as follows
-id
-follower
-following
when someone follows any other user, I add a record with follower user ...
-4
votes
0answers
55 views
Is it advisable for a beginner to choose Oracle Database 10g/PL-SQL as his first RDBMS & query language to learn? [closed]
I am new to the subject of databases and after some theoretical knowledge about RDBMS,SQL,ER Model,transactions,indexing & hashing,concurrency etc I needed a RDBMS to practice the SQL commands.I ...
10
votes
4answers
929 views
Why do relational databases only accept SQL queries?
As far as I know, most relational databases do not offer any driver-level API for queries, except a query function which takes an SQL string as an argument.
I'm thinking how easier it would be if one ...
2
votes
2answers
353 views
Why OTServs have an item cloning problem if the server crashes? [closed]
OTServs are open source MMORPGs with a huge community. Mostly all of them have a serious problem: if the server crashes, people can clone items. This is a dirty trick that can be executed because the ...
57
votes
13answers
4k views
Why use a database instead of just saving your data to disk?
Instead of a database I just serialize my data to JSON, saving and loading it to disk when necessary. All the data management is made on the program itself, which is faster AND easier than using SQL ...
1
vote
2answers
120 views
Is NoSQL a good fit for a graphing app, and how can I compare different NoSql Servers?
I am traditionally a MsSQL or MySQL developer - I have been prototyping a new application that involves storing data from many targets.
I have seen that the app appears to get slow after scaling to ...
1
vote
1answer
86 views
Database data structures for RESTful api
I am creating a RESTful API. I am struggling to decide on the best way to design my database tables around my resources.
Initially, I though a table per resource would be a good way to go, but I'm ...
2
votes
1answer
67 views
Internationalization through SQL Database and performance issues
I'm using .Net technologies and because ASP.Net "instant translation" is not really easy to do with ResX, since it has to be compiled after every change, there are a few hacks available ...
2
votes
2answers
362 views
Why is NoSQL better for this scenario?
Hypothetical scenario: Let's say we are downloading JSON from Facebook with details of a user's friend's checkins, posts, etc... These come in as one document per friend per activity, so with 8 ...
-1
votes
1answer
119 views
Development paradigm: SQL programming vs using SQL to program [closed]
I would like to know what are the pros and cons to two apparently valid philosophies regarding the programming of an application which makes extensive use of a database.
The first philosophy is to ...
-1
votes
1answer
85 views
Database Connection Variable Name [closed]
What are the most well known / commonly accepted variable names used for the SQL connection itself?
In Perl, I have seen $dbh (stands for database handle, but why 'handle'), which has been used only ...
4
votes
2answers
128 views
Formatting SQL Based on an AST
I am working on my .NET open source project for generating SQL...
Initially, I wrote the project so it spit out exactly one SQL format... ugly. I started using this project in the real world and ...
6
votes
4answers
308 views
Good idea to move logic out of SQL statements?
I'll preface this question by saying that I am very new to professional software dev.
I work on a team that takes data in from other groups in my company and turns this data into reports usable by ...
4
votes
2answers
166 views
How would I make a suggestion for a change to the SQL standard
If I wanted to make a suggestion to a change to how the UPDATE statement works in SQL, how would I go about it?
Is there a website for the next standard?
I googled, but just kept getting the ...
4
votes
1answer
147 views
Algorithm to denormalize database
I have built a QlikView script generator (QVS), that can be used to generate large script files for data imports from SQL Server to QlikView.
QlikView does not like 'fully' normalised database ...
3
votes
1answer
302 views
Is Clojure a 3GL or a 4GL?
A bit of background (in case I'm mistaken)...
I think I understand that (it's an oversimplification):
manually entering codes into memory (or on a punchcard) is "first generation language"
using ...
1
vote
1answer
91 views
Is Neo4j graph database sufficient to itself for all query types?
Neo4j eases relationship traversals => especially useful for a social network for instance.
But are there any scenarios when it's advised to associate an additional relational database (or other ...
7
votes
4answers
346 views
Database History Table / Tracking Table
Currently I want to structure a tracking/history table like this:
PrimaryKey - ID
OtherTableId - fk
fieldName - name of the field its tracking
OldValue
NewValue
UserName
CreateDateTime
So ...
12
votes
6answers
1k views
Do You Still Need Indexing After Database Normalization
After you have done a good normalization, do you still need to index the table? How is this going to affect the performance? Will it even affect the performance in some way after a good normalization? ...
0
votes
1answer
162 views
For PL/SQL, do large companies prefer ANSI SQL joins or old Oracle joins? [closed]
I am interviewing for a PL/SQL position with a large corporation. I will have to write a multiple choice exam. I am wondering whether the exam will likely use old-style joins (joining happens in the ...
1
vote
1answer
122 views
Static Tables vs Dynamic Entity Attributes Storage Configurations
I am trying to figure out a better way to decide table storage configurations whether it will use static configurations using tables or dynamic configurations using EAV (entity-attribute-value)
When ...
8
votes
4answers
341 views
Should database queries be abstracted out of the page itself?
When writing page generation in PHP, I often find myself writing a set of files littered with database queries. For example, I might have a query to fetch some data about a post directly from the ...
2
votes
3answers
989 views
Where can I learn SQL using an online site? [closed]
I'm used to practice my coding skills using an Online Judge like Project Euler or Codeforces, when I try to learn new programming languages. But it seems this cannot be applied to SQL.
Are there any ...
7
votes
4answers
251 views
Storing Dynamic SQL in text files vs inline code
Our Architecture team is proposing a framework that would see our SQL queries moved from coded strings within our applications, into a file based system where we would invoke them with function calls. ...
21
votes
5answers
773 views
Multiple database accesses or one massive access?
What is a better approach when it comes to performance and optimal resource utilization: accessing a database multiple times through AJAX to only get the exact information needed when it is needed, or ...
0
votes
1answer
266 views
TFS SQL Deployment Data Script
We are using TFS and SQL Server 2005 (looking to upgrade to SQL Server 2012 if that makes a difference). We store our database schema in a Visual Studio Database project (VS 2010).
When code is ...
4
votes
3answers
352 views
SQL RDBMS : one query or multiple calls
After looking around the internet, I decided to create DAOs that returned objects (POJOs) to the calling business logic function/method.
For example: a Customer object with a Address reference would ...
0
votes
1answer
105 views
Concurrency checking with Last Change Time
I have an app with the following three tables
Email (emailNumber, Address)
Recipients (reportNumber, emailNumber, lastChangeTime, status)
Report (reportNumber, reportName)
I have a C# application ...
6
votes
1answer
583 views
self referencing tables, good or bad?
Representing geographical locations within an application, the design of the underlying data model suggests two clear options (or maybe more?).
One table with a self referencing parent_id column
uk - ...
-1
votes
1answer
133 views
Address search from large text file
Basically I want to develop a Address lookup(part of my project) using C# (and I can use SQL if necessary). I have a very large text file which have all the UK address and postcodes. Addresses needs ...
5
votes
2answers
272 views
Best practice to represent SQL in program source code
Where SQL statements are executed from a program, what is the best practice to store the statement text?
Most often it is in a read only string, in the source file it is executed in.
I think a ...
-1
votes
1answer
564 views
How to create computed column in SQL Server 2008 R2 [closed]
I have a SQL Server 2008 R2 database. This database has two tables called Pictures and PictureUse.
Picture table has the following columns:
Id (int)
PictureName (nvarchar(max))
CreateDate ...
0
votes
0answers
41 views
Moving sql database [closed]
I need to move the sql database to a new server without changing the app that uses that database, how can i do this easily without affecting the users ?
1
vote
5answers
342 views
Is it Considered Good SQL practice to use GUID to link multiple tables to same Id field?
I want to link several tables to a many-to-many(m2m) table.
One table would be called location and this table would always be on one side of the m2m table.
But I will have a list of several tables ...
1
vote
1answer
169 views
Structure of a correctly implemented JTable with TableModel and Listeners?
I am pretty new to Java and its JTables and this is where I am struggling at the moment.
I need to create a GUI which shows me results of a sql query like SELECT * FROM tblPeople WHERE name='Doe'. My ...
-1
votes
1answer
392 views
How to use PostgreSQL on AWS - Ubuntu 11.10 [closed]
I'm extremely new to cloud-computing, Linux, and PostgreSQL, so if this is a stupid question, I apologize.
I've managed to create an m1.large instance running Ubuntu 11.10, connect via Putty SSH, and ...
0
votes
0answers
95 views
Benchmarking ORM associations
I am trying to benchmark two cases of self referential many to many as described in datamapper associations. Both cases consist of an Item clss, which may require many other items. In both cases, I ...
-1
votes
1answer
187 views
keeping connection open all time in sql
I have developed a Windows application in c# in which multiple users can add some numbers and their name and can view the data entered. The problem that I have is that the sever is on my laptop and ...
0
votes
5answers
225 views
Is comparing an OO compiler to a SQL compiler/optimizer valid?
I'm now doing a lot of SQL development at my new job where as before I was doing Object Oriented desktop app stuff. I keep running across very large scripts (thousands of lines) and wanting to ...
0
votes
2answers
188 views
Do I need to know databases like Oracle or SQL Server for a data analyst role? [closed]
I know only MySQL and do web application programming and Linux system administration. I have also started learning AI and machine learning.
I want to go into data analysis.
Do I need to know MS SQL ...
2
votes
3answers
683 views
Storing Attendance Data in database
So i have to store daily attendance of employees of my organisation from my application . The part where I need some help is, the efficient way to store attendance data. After some research and brain ...
85
votes
16answers
5k views
“Never do in code what you can get the SQL server to do well for you” - Is this a recipe for a bad design?
It's an idea I've heard repeated in a handful of places. Some more or less acknowledging that once trying to solve a problem purely in SQL exceeds a certain level of complexity you should indeed be ...