Click here to Skip to main content
15,892,927 members
Everything / Database Development

Database Development

database

Great Reads

by Evoluteur
Generic REST or GraphQL endpoints for CRUD and more, written in JavaScript, using Node.js, Express, and PostgreSQL
by Aleksandr Ulanov
Learn how to use Redis and its geospatial indexes and commands for complex geo calculations
by Rob Culhane
How to dynamically add access database columns at runtime using VB.NET
by Paul D. Sheriff
As more and more users interact with web applications on their mobile devices, it is becoming increasingly important for software developers to allow them to work offline; PouchDB can help.

Latest Articles

by Nicolas DESCARTES
What are vector databases?
by Ștefan-Mihai MOGA
How to solve real-life problems using B-trees
by Mark Pelf
Showing problems with limited accuracy of SqlServer data type “datetime” in .NET7 EF7 environment
by Mark Pelf
Tutorial on EF7 – Code First approach using Command Line (CLI)

All Articles

Sort by Updated

Database Development 

N 5 May 2024 by Wendelius
As far as I can see, the structure you have thought of should work fine. Each named location is inside another location (street inside a city and so forth). Always when you find a new location you should just add the location to the location tree...
N 4 May 2024 by Pete O'Hanlon
Disclaimer. I love Postgres so my advice is going to centre on you using Postgres. Your third scenario is a prime candidate for using the Geospatial extensions. When you have these installed, you can do queries by location. There are datasets...
N 4 May 2024 by PJ Arends
I am sure I can cobble something together and make this work, but I am seeking some advice from people with experience before I get going on this. First some background. I am trying to organize all our photos in such a way that it is easy to...
18 Apr 2024 by Pete O'Hanlon
There's a wonderful tool in SQL Server that allows you to view the e execution plan for a query. With this, you can analyse to see that you are doing things like indexed queries. We can't help you because we don't have your database schema, and...
18 Apr 2024 by Member 14760154
I have a problem with my query data , it become very slower when i try to access at pag 1200 i also use case when in my query Select Reg_ID,Reg_Service_ID,Reg_Patient_ID,Patient_Name,Doctor_ID,Doctor_Name, CASE WHEN...
17 Mar 2024 by Sh.H.
Hi guys Here we have listORG with 3 fields: Idx   ,   Etude   ,   Name ---------------------------------- 1         Etude1      John 2         Etude2      John 3         Etude3      John 4         Etude4      John 5         Etude5      Merry...
17 Mar 2024 by Graeme_Grant
You would use a CollectionViewSource and use grouping. I assume that you are using WPF. Here is a sample: How to: Sort and Group Data Using a View in XAML - WPF .NET Framework | Microsoft Learn[^]. Hereare some more things that you can do with...
16 Mar 2024 by Gerry Schmitz
You don't need an ObservableCollection to "count"; but you can substitute if you want. public class Org { public int Idx; public string Etude; public string Name; } static List _listOrg = new...
12 Mar 2024 by OriginalGriff
There are problems here with what you want to do: you can't use a single ObservableCollection for two different lists, and while you could put all the items from both into a weakly typed ObservableCollection and cast them appropriately when you...
24 Feb 2024 by Student_abc
When I click the Add Button on the admin page, I want it to display the total unit number of each bloodgroup on the user page. So here, I used session state to display it, but still, it's not working and is not showing any error. I also made...
24 Feb 2024 by OriginalGriff
Look at your code: Session[BloodGroup1 + "TotalUnit1"] = TotalUnit1; And if (Session["A+_TotalUnit"] != null) { Label3.Text = " " + Session["A+_TotalUnit"].ToString(); } The index names...
20 Feb 2024 by CHill60
Posting solution from comments to close off the question. Try using db.OpenEx("Driver={Microsoft Access Driver (*.mdb, *.accdb)};Dbq=XXX"); Points to note: - The parameter pair Uid= and Pwd= are only required if the MS Access database is...
20 Feb 2024 by Maciej Los
I'm no sure what you want to achieve... I believe below example will help you to understand how to filter your data. DECLARE @cn AS INT = 253; -- 253 --594 --2132 DECLARE @ip AS INT = 1; DECLARE @pcn AS INT = 0; WITH cte AS ( SELECT...
20 Feb 2024 by NigelSHoult
I am trying to write a program that uses CDatabase to connect to a local Access database without setting up a DSN (it works fine when I do use a DSN but I don't want to have to create one for every database). I haven't found anything that works...
19 Feb 2024 by DT_2
I need to find the immediate parent id based on the below condition: |CustomerNum|ParentCustomerNum|IsPlatform| |-----------|-----------------|----------| |132 |0 |1 | |253 |132 |0 |...
9 Feb 2024 by Nicolas DESCARTES
What are vector databases?
20 Jan 2024 by Ștefan-Mihai MOGA
How to solve real-life problems using B-trees
22 Dec 2023 by Sandeep Mewara
You need to do the following: ALTER TABLE TABLE2 ADD CONSTRAINT[symbol] FOREIGN KEY(column_name) REFERENCES TABLE1(column_name); Thus, your case: ALTER TABLE ORDER_ITEM ADD CONSTRAINT FK_ORDERS FOREIGN KEY(OrderID) REFERENCES ORDER_T(Id); ...
22 Dec 2023 by Richard Deeming
Create a foreign key in an existing table - Create Foreign Key Relationships - SQL Server | Microsoft Learn[^] ALTER TABLE ORDER_ITEM ADD CONSTRAINT FK_ORDER_ITEM_ORDER_T FOREIGN KEY (OrderID) REFERENCES ORDER_T(Id);
22 Dec 2023 by Rama2F
This is the first time I use SQL, and I have a problem with adding a foreign key to my table. I have 2 tables: ORDER_T (referenced) and ORDER_ITEM (referencing) create table ORDER_T( Id int primary key, OrderDate date, TotalAmount int ); ...
22 Nov 2023 by _Asif_
This is a bit interesting problem. I have created a sample solution for you that you can extend as per your need. The actual issue is 15000 courses that you can't export as columns. Practically speaking in a given date range (semester) we are...
21 Nov 2023 by Richard Deeming
Quote: since the actual data set have about 15000 courses it is not very feasible That means you will end up with a table with about 15002 columns - one for each course, and one each for the student ID and department code. As per the Maximum...
21 Nov 2023 by GypsyLuca
I have a data with same id but multiple line i am required to convert into single line and mark id as primary key in SQL Server or excel. Student_ID |Dept_Code |Course_Code |Status -------------------------------------------------- 1001 ...
24 Oct 2023 by Member 11400059
I have ASP.NET Core MVC project with .NET 7. I want put my SQL Server connection string in appsetting file. Then use that in my entire project and the layers. But I get the provider error: System.InvalidOperationException: 'No database provider...
21 Oct 2023 by Graeme_Grant
String keys are "case sensitive". Change this: builder.Services.AddDbContext(options => options.UseSqlServer(builder.Configuration.GetConnectionString("Con1"))); .. to this: builder.Services.AddDbContext(options => ...
2 Oct 2023 by Bhanu Arora 2023
I want to store a high computational parameter to prevent its recomputation. But this parameter needs to be updated frequently to maintain consistency, should I use cache or a database or is there any other better solution for this?? I am using a...
29 Sep 2023 by OriginalGriff
All a Cache is is memory that is "closer to the processor" - often part of the same chip, and which is faster for the processor to access that having to go outside the CPU to main memory top get the value. And all frequent updates will do is...
28 Aug 2023 by Member 11164293
Add N char befor you quated stרingת for example insert into #tabname (f1) values (N'כן')
9 Aug 2023 by Andre Oosthuizen
You can find a step-by-step on how to create the SSIS Package, starting at lesson 1 - MS Learn | Create a new Integration Services project[^] Quote: 1) On the Windows Start menu, search for and select Visual Studio (SSDT). 2) In Visual Studio,...
9 Aug 2023 by ahmed_sa
I have two servers one server have sql server database and another server have db2 database I need to read data from db2 database on server A then after read it insert it into sql server database that exist on server B I use sql server 2017 ...
30 Jul 2023 by Nishikant Tayade
I am working on a desktop application. So there are different buttons on the front end and a click on that button fetch the information from hardware connected to PC via Serial Port and store that data into database and shows the information. Problem is that if i create a table in my database...
16 Jul 2023 by Naresh Barule
We have an RDS instance hosted for Aurora PostgreSQL, specifically using the 'db.r5.xlarge' instance type. When we initially set up the RDS instance, a default user named 'rdsadmin' was automatically created with the 'SUPERUSER' role. During the...
5 Jul 2023 by Siavash.BRY
Hi I have a MySQL Server version: 8.0.31.0. Without any process, it stops automatically with the following error message. Faulting application name: mysqld.exe, version: 8.0.31.0, time stamp: 0x6320bd31 Faulting module name: mysqld.exe, version:...
5 Jul 2023 by Andre Oosthuizen
You can look into a few options - 1) Check your MySQL error logs in your MySql data folder for any errors - How to see log files in MySQL[^] 2) Check your Windows Event Viewer for any related system or application errors occurring around the...
4 Jul 2023 by OriginalGriff
This site isn't for tech support for MySql - it's a software development site, and this question has nothing to do with software dev. You'd be better off asking in a dedicated forum: https://forums.mysql.com/[^]
8 Jun 2023 by Mark Pelf
Showing problems with limited accuracy of SqlServer data type “datetime” in .NET7 EF7 environment
6 Jun 2023 by Member 11400059
Hi I Create C# windows form project and setup file for it. but I get the error after install my app on my friends system. the error is: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The...
6 Jun 2023 by PIEBALDconsult
I recommend something along these lines: string server = null ; // Fetch from configuration string database = null ; // Fetch from configuration System.Data.SqlClient.SqlConnectionStringBuilder constr = new...
6 Jun 2023 by DEK46656
You might also try Build Your Own Database From Scratch[^]
6 Jun 2023 by CPallini
You might have a look at: "How Does a Database Work? | Let’s Build a Simple Database[^]".
6 Jun 2023 by temchik_ggg
I am a SWE student and I have to write my own RDBMS using C++. I am not going to write smth simple like txt file with all operations with O(n) cost. I am really interested in RDBMS implementation. I have questions like: 1. File architecture 2....
4 Jun 2023 by Uwakpeter
I created MVC application using the DB first approach in VS 2022, after adding the Entity Data Model to the application, the model.tt did not generate database tables as classes! What I have tried: I have deleted the EDM file multiple times,...
4 Jun 2023 by Graeme_Grant
Check out this recent article, it will walk you through the process: Entity Framework 7 – Database First – Using EFCorePowerTools[^]
3 Jun 2023 by OriginalGriff
There is no single string that will work for all server instances, unless it always directs to one specific server - in which case you need two things: 1) The IP address or host name of the server: mySQLServber.mydomain.com for example. 2) The...
1 Jun 2023 by Mark Pelf
Tutorial on EF7 – Code First approach using Command Line (CLI)
30 May 2023 by brahim farhat (AAD)
I want to back up and restore my SQLite database I read some online questions and answers but couldn't figure it out yet I read about BackupAgentHelper but I can't understand how it works i also tried FileInputStream but this not working all the...
26 May 2023 by Vadim Loboda
A way to persist C# object graph to database with single procedure using ADO.NET and table valued parameters
25 May 2023 by Mark Pelf
Tutorial on EF7 – Database First approach using GUI tools EFCorePowerTools
25 May 2023 by Mark Pelf
Tutorial on EF7 – Database First approach using Command Line (CLI)
24 May 2023 by brahim farhat (AAD)
I am trying to sum profits with avarage price of both purchase price and sale price this is the result that i expect according to calculator: 24*(24*4)/24-24*(36*2.333+24*2.5+48*2.4)/108 The result is: 38.4026667 How to get this result in...
23 May 2023 by Graeme_Grant
Here is how I would look at it before I create the Sql statement: item 1. 36 2.333 83.988 item 1. 24 2.57 60 item 1. 48 2.4 115.2 Total 108 259.188 avg purchase price = 259.188 / 108 = 2.399888889 So if sell price is 4.00 * 24 = 96 The...
23 May 2023 by brahim farhat (AAD)
I solved my problem by this query : SELECT sa_id, sa_date, p_name, cu_name, sa_quantity, sa_price, sa_amount, Sum(pur_quantity * pur_price) / Sum(pur_quantity) AS...
21 May 2023 by brahim farhat (AAD)
I have 4 tables in my database SQLITE as following: 1- products 2- customers 3- sales 4- purchases sales table has product ID (pro_id) and customer ID (cu_id) I am trying to join customers and products in sales using inner join but my problem...
21 May 2023 by Wendelius
The relations between tables are not quite clear but are you looking for a correlated subquery? Something like SELECT sa_id, sa_date, p_name, cu_name, sa_quantity, sa_price, sa_amount, ...
12 May 2023 by Member 11400059
I want get a backup from my SQL Server database in C# Windows Forms. But I have some problems. When I want to save the backup file with a different name of database, my app crashes and errors. Also I cannot save my backup on the desktop but all...
12 May 2023 by OriginalGriff
Probably, it's because the SQL DB engine doesn't run under your user - it has it's own user with different permissions because it runs as a service and doesn't require any user to be logged in. As such, it doesn't have access to your user files...
7 May 2023 by Richard MacCutchan
Look at the part before that word: set Last Login. What is "Last" in there for? Is the column's actual name two words, or is there a link character missing? If it is the actual name of the column then it needs to be surrounded by square brackets:...
7 May 2023 by Rainy Plant
Com2.CommandText = "update dbo.UserRecords set Last Login=" & dtpLastLog2.Value.ToString & "where " & txtEmailName.Text & "=Email" The problem is the program is throwing an exception System.Data.SqlClient.SqlException: 'Incorrect syntax near...
24 Apr 2023 by Eligio Morgado H.
Compare two SQL Server databases and show difference in tables and fields
9 Apr 2023 by Abed Al Rahman Hussien Balhawan
customer table (CUST_ID,CUST_NAME,CUST_ADDRESS,EMP_ID) take table (CUST_ID,LOAN_NUMBER) table loan (LOAN_NUMBER,AMOUNT,BRANCH_NAME) Find the customer name, loan number and loan amount of all customers having a loan at the Perryridge branch. ...
9 Apr 2023 by mtoha
I think you should change this : create table pets( id_pet int identity not null primary key, type_pets nvarchar (20) not null, breed nvarchar (20) not null, stock int not null, created_by varchar(20), --getdate() created_date datetime ); --...
9 Apr 2023 by Peshhobs
Hi, can you give me some advice - mostly about table relationships, because that's the hardest part for me? Information should be displayed on: - Species, breeds of animals - Description of animals - Registration of sales - Customers - Employees...
7 Apr 2023 by Oblit3ration
Hi all,Would someone mind helping me with the following please?I'm using Visual Web Developer Express, with Microsoft's StarterSite in order to start to learn a small amount of web development. I've been practising getting a webpage to enter data into fields in a couple of tables so far...
31 Mar 2023 by User 15929814
I am a beginner and Im trying to connect the dots and learn, my aim is to get the input values and post them to postgresql database as post request. My code so far. What I have tried: import { useState, useEffect } from "react"; import axios...
28 Mar 2023 by Busenur Çetin
I solved the problem writing down how to do it in case someone will face with same error. 1)Move js folder in public folder 2)Write the code belove in signup.ejs: document.getElementById("adminSignup").onsubmit = (e) => { ...
28 Mar 2023 by Busenur Çetin
I keep getting this error on console.: "Refused to execute script from 'http://localhost:3000/js/main.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled." I tried every way I could find on the...
28 Mar 2023 by Dave Kreskowiak
You showed everything except the one line that loads the "main.js" script and that's the one that matters. Judging by the error message alone, you need to change that tag to read something like:
18 Mar 2023 by FRS4002
I am using PHP and MYSQL to make a search field and it is working fine. But when I type % and click search, I am getting all rows of the column description from the database. Here is the code:
18 Mar 2023 by Patrice T
Have a look at: SQL Wildcard Characters[^]
18 Mar 2023 by OriginalGriff
The '%' character in an SQL LIKE clause is a wildcard: "match any number of any characters including none" - it's like "*" in a file name under Windows: "*.*" matches every file name with every extension. If you want to allow the user to search...
16 Mar 2023 by raddevus
Function to help convert null to DBNull.Value for inserting in database
13 Mar 2023 by Masis Levin
Redis with .NET | Redis Documentation Center[^]
12 Mar 2023 by Gcobani Mkontwana
Hi Team I need some help, my record is not updating any new entries and this is a problem for me because the user details not submitted and saved. I need some help with my code below What I have tried: require_once 'db_conn.php'; // Start a...
8 Mar 2023 by johnsmith20122
I am new to PHP and have been having a few problems. I am not necessarily facing any errors, but I cannot seem to figure out how to change the nav bar once the user is logged in. At this moment, I've had to essentially re-create the 'index.php'...
8 Mar 2023 by Khushboo Dewani
what is the code for add data in redis database using hash datatype of redis in C# asp.net core 3.1?Also what is the concept of master key in it? I have to analyse the code for add in api and rewrite the code for add so that my data should be...
8 Mar 2023 by johnsmith20122
I have had this problem that I have been trying to solve for days now and it's getting to the point where I am getting extremely frustrated so I had no choice but to ask for help. I've been trying to create a login feature for what feels like a...
8 Mar 2023 by johnsmith20122
I do feel like an idiot now. Turns out, it was DB problem. Password was set to 50 but minimum for hash is 60. I've set it to 255 and it all works as it should now. Thanks for the help anyway!
7 Mar 2023 by Gcobani Mkontwana
Hi Team I am struggling if it will be possible to save a signature as a file format to the db record, i need some help the only example i seen so far are store it locally. What I have tried: // HTML code
7 Mar 2023 by OriginalGriff
We can't tell - we don't have any access to your data, and that is probably significant. So it's going to be up to you. Start with the documentation: PHP: password_verify - Manual[^] which says that the second parameter is a hashed value created...
6 Mar 2023 by Andriy Protskiv
Workaround for performance issues with AT TIME ZONE
4 Mar 2023 by Abed Al Rahman Hussien Balhawan
customer table (CUST_ID,CUST_NAME,CUST_ADDRESS,EMP_ID) has table (CUST_ID,ACCOUNT_NUMBER) take table (CUST_ID,LOAN_NUMBER) table loan (LOAN_NUMBER,AMOUNT,BRANCH_NAME) table account(ACCOUNT_NUMBER,ACCOUNT_BALANCE) Q1 Find all customer...
4 Mar 2023 by RickZeeland
SQL Server is not the easiest database to start with, if your needs are simple take a look at: LiteDB :: A .NET embedded NoSQL database[^]
4 Mar 2023 by Proba23
When i tried to run my visual code program, it gives me this error ... How can i fix it vs-sql-error hosted at ImgBB — ImgBB[^] What I have tried: Tried to download ldb for sql 2017
3 Mar 2023 by Maciej Los
Follow this article: A network-related or instance-specific error occurred - SQL Server | Microsoft Learn[^] Good luck!
3 Mar 2023 by OriginalGriff
Read the error message - it says to check the Windows Log for details, so that is where you start. We can't help you fix this - we have no access to your system. I'd suggest that if the log is unhelpful you contact MS Tech support who can dial...
2 Mar 2023 by Lee P Richardson
Deploy EF database migrations while avoiding security flags
1 Mar 2023 by Gcobani Mkontwana
Hi Team I need some help, i have a logic that attached document as pdf, this document does saves to the database well. But the problem i cant seem to achieve get the document as pdf on the email, only shows text its not right to a user and need...
1 Mar 2023 by Dave Kreskowiak
Are you trying to send the PDF as an attachment in an email? Your question isn't very clear on this. Also, you're code seems to be "monolithic", meaning doing more than one thing at a time. Break this code down into multiple functions. One to...
28 Feb 2023 by Andre Oosthuizen
Firstly, as mentioned by OriginalGriff, you are wide open to some serious security risks. Read this article with solutions to how you can fix these security risks - Nine Severe PHP Vulnerabilities & How to Fix Them[^] To get to your problem, you...
28 Feb 2023 by Gcobani Mkontwana
Hi Team I am struggling to signup new users to the record list from the database, somehow it refuse to insert data to the database columns. What I have tried: // database record SELECT�*�FROM�`signup`�WHERE�1 return� ...
27 Feb 2023 by OriginalGriff
As I told you last time ... Don't do it like that! Never concatenate strings to build a SQL command. It leaves you wide open to accidental or deliberate SQL Injection attack which can destroy your entire database. Always use Parameterized queries...
27 Feb 2023 by Andre Oosthuizen
Firstly, your moment.min.js is outdated hence the first WARNING, not an error. Update your .js file, the latest can be found here - Latest Moment.js File[^] Your real error is in Could not load content for...
27 Feb 2023 by Legalraasta tech
It is problem of something like data not update and represent on web page. I have an a webpage where the system of service update and delete happen . It is made in HTML,CSS,PHP. last time when I delete an row and update the table.the overall...
11 Feb 2023 by Graeme_Grant
Here is a list of the EMOJI codes: Full Emoji List, v15.0[^] Here is one solution: How to store Emoji Character in MySQL Database - StackOverflow[^]