New answers tagged

5

.net already uses connection pooling, so when you create/dispose a connection, you are not actually opening and closing a database connection, just fetching and returning a connection to the pool. So you don't really get any benefit by changing to Open/Close, and the using construct guarantees that the connection is returned to the pool correctly even in ...


-3

is it bad to only be using 1 connection for a small personal program that accesses 1 database (and 2 tables) You should not limit program to 1 connection. Sooner you will end up situations you require more than one simultaneous connections, Built in connection pooling, is reusing connections and will only return connections to pool when you close it (...


0

The standard is to use first_name, last_name, etc. I mean standard not as formally defined (say in ISO 9000) but informally, a usage I have observed over 30 years in dozens of companies and hundreds of systems, thus an informal standard. There's nothing to stop you doing things a different way if it makes sense for your situation, however: Developers ...


0

I always used to to the name_first order as it effectively groups the fields making intellisense easy to use. However, it can get annoying when you are refactoring. eg: iteration 1: table person : firstName address iteration 2: table person firstName //todo:: change this everywhere to match the new scheme nameSecond address ...


0

Only up to a point As a software developer, you'll probably have to query and update the database, and knowing how the DB operates is critical to avoiding bad queries, inefficient joins and so on. You might have a dedicated DBA who can decide where to add indexes ir partition the database, but you can't count on it, not in small companies and not always in ...


0

Understanding how things work under the hood will help you debug your queries for performance & storage considerations. For example, a range query will perform better with a B-tree type of index. And when doing joins, you can add hints to the query engine on whether to use HASH or MERGE joins. And on the physical side, you can distribute tables in one ...


0

It is absolutely worth the time! Being a full stack developer enables you to efficiently produce value-added solutions. I've seen all too often communication breakdowns and silo'd development... Triple the development time and half the quality. At the end of the day, the more skills you have, the more valuable you will be.


2

Don't discount the possibility that you'll need to actually go into the database and query it directly as part of a debugging process. If you ever end up doing that, you'll definitely want to know all about the database technology and how your particular database is structured. Maybe it won't happen. But if it does (and in my experience it always does at ...


9

A few years ago I worked on an application that was written by somebody who had clearly never learned how SQL databases work. I was given a problem report to fix -- the main status summary page, which had always been slow, had now started to be so slow that it was hitting the server script execution timeout (of 3 minutes) during rendering. It seemed that ...


0

From Msdn, you need to use the TableAdapter that is created: If you do not have an instance available, instantiate the TableAdapter you want to use. Example: NorthwindDataSetTableAdapters.RegionTableAdapter regionTableAdapter = new NorthwindDataSetTableAdapters.RegionTableAdapter(); regionTableAdapter.Insert(5, "NorthWestern"); Check the ...


3

Is there some historical or practical reason why SQL (or more specifically T-SQL in my case) does not support the closure property in many areas where many other language families like C do? The historical reason is that Codd first defined the concept in 1970 and it wasn't turned into what we would now call SQL until 1974. Many of the things that would ...


4

1) Sql does support relational closure, which means you can use base tables, table literals, views, subqueries, CTE's, table variables and table-valued functions interchangeably in queries, and nest them arbitrarily. You can also use the resultset from a stored procedure in a query, as long as you execute the query and loads the result into a temp table ...


1

Unless someone has a really unique way of addressing this problem, I would think they would buy something already built because there are security issues along with established ways of doing this. First of all should I use NoSQL or SQL for this kind of architecture? From an architecture standpoint, both will work, so consider security as a prime ...


0

When you save, just do things in the right order and wrap the whole lot in a Transaction. Begin the Transaction. Insert the "Fishing Trip" record. Retrieve the Primary Key for the record just inserted. For each User: Create each "Trip-User" record. Use the Trip's Primary Key. Retrieve the Primary Key for the "Trip-User" record just added. ...


1

This data can be expressed well in a relational database, so a document based database doesn't really offer an advantage Using the database's querying features to narrow down the booking to the doctor and date(s) you're interested in and doing the actual processing in the application should work well. There are perhaps a few hundred bookings per month and ...


0

What about different table for different type of user. And one table for common information of user. Then specific table have a reference to basic info rowID RegularUser { ID, SpecificDataForRegularUser, BasicInfoID} Manager { ID, SpecificDataForManager, BasicInfoID} UserBasicInfo { ID, Name, Phone, ...} Then data structure for different type of user ...


1

5Mb seems like a trivial amount of data these days. So I wouldn't worry about pulling that out on demand, deserialising and manipulating that. Performance shouldn't be a problem given your quantities of data If there are no projected format changes for this data, I would stick to this approach.


4

Put the data in a data base. Write a function which pulls all the data from the database and populates the arrays. Pass the populated arrays to the unchanged calc function Write a function to write a database using the resultant arrays from the calc function.


0

I use partitioned views (I don't have Enterprise so I can't partition tables). They are perfect for your type of criteria. See https://sqlsunday.com/2014/08/31/partitioned-views/


1

How much work is it to derive the data to display? If it's a fairly simple query, than re-doing it every time may be little more work than doing it once, saving the results somewhere else in the DB, and then drawing from there. Do all users see the same data? I mean, are there any parameters on this screen, or is the display the same for everyone? If there ...



Top 50 recent answers are included