|
Schatak wrote: seems to be good and new thing
Pretty sure when new things stop showing up in computing then people won't be doing computing any more.
So new doesn't mean much. The real question does it serve a real need significantly better than some older technology. Must be significant otherwise the learning time and the problems due to learning will not be an effective trade off.
And the vast majority of the time for any really "new" idiom the answer is no.
So based on that one shouldn't look for new technologies but rather look for solutions to real problems.
For example a real problem might be that an existing file based database using expertly created caching and expertly created database design fails to meet real performance needs.
This would be versus situations like the following
- My 'database' is slow, when no actual profiling has been done at all. (I don't even know what profiling is much less creating a simulation of actual production traffic.)
- My database is slow but I don't have any idea how databases work.
- I don't like SQL and consequently all my SQL ends up being written like it didn't exist.
- I don't even know what caching strategies are
- I read about this cool tool and I want to base the entire future of a company for the next 10 years on it just so I can play with it.
- As a developer I need to restore the database 20 times a day and it just takes too long so the database should be replaced even though there is no problem with performance in production.
|
|
|
|
|
Hi.
I have a local db with a number of tables. One is a table with filenames. This method is supposed to remove the file from the database table HiddenFile with the id sent to the method.
I have been trying to solve this for a long time without success.
The code is:
public bool DeleteFile(Int32 identity)
{
string connString = "Data Source=(LocalDB)\\MSSQLLocalDB;AttachDbFilename=C:\\Code\\FileDB.mdf;Integrated Security=True;Connect Timeout=30";
SqlConnection dbConn = new SqlConnection(connString);
dbConn.Open();
using (SqlCommand com = new SqlCommand("DELETE FROM HiddenFile WHERE Id = @Identity)", dbConn))
{
com.Parameters.AddWithValue("@Identity", identity);
com.ExecuteNonQuery();
}
dbConn.Close();
return true;
}
When I run it, there is an error: "Incorrect syntax near ')'".
Can anybody see what the problem is?
modified 6-Sep-15 8:18am.
|
|
|
|
|
"DELETE FROM HiddenFile WHERE Id = @Identity)" <- you have here an unnecessary closing parenthesis...remove it...
Skipper: We'll fix it.
Alex: Fix it? How you gonna fix this?
Skipper: Grit, spit and a whole lotta duct tape.
|
|
|
|
|
I am using netbeans5.5 so how to connect with server to netbeans
|
|
|
|
|
Netbeans is an IDE not a programming language. Please explain in proper detail, what you are trying to do, and what problem(s) you are having.
|
|
|
|
|
I am going to start a big construction project with MVC. I am confused about Db choice.
Although worked with SQL server from past 5 years. but now thinking to use MongoDB.
Is it a good move?
|
|
|
|
|
Depends on what you're planning to store in it, how you want to retrieve the information, what skillsets your build team have etc etc etc.
I'd need far more information about the project to even make an educated guess about which technologies would be appropriate for the it (the project). Oh, and I would charge money to do that.
I would suggest that the very need to ask if it is a good move would suggest that it is probably not a good move in these circumstances
|
|
|
|
|
Yeah, the project gonna be big for sure, data would be like more documents, images , videos . And performance of product is the key, they need fast retivals of docs, images and all. Things like that.
So i heard about MongoDB does the things pretty well, but not sure if it gonna be good for large projects or something.
What are your charges Paypal/CC?
|
|
|
|
|
Schatak wrote: big for sure, data would be like more documents, images , videos . And performance of product is the key, they need fast retivals of docs, images and all.
People often say that but it the same as saying "I want a fast car".
You need to quantify that with real numbers.
What is an "image"?
What is a "video"?
What is a "document"?
How exactly is it retrieved?
What exactly does fast mean?
What exactly is doing the retrieving?
For example are you backing up youtube?
Are you retrieving a cat scan for an surgery team in an operating room?
Are you retrieving a field image on an iphone in a farm in the middle of Idaho? Or the middle of the Sudan?
And drill down on the details too.
If they say "video" is it an hd capture from a hollywood film crew or is it really just a image capture (single frame every 5 seconds) from a security camera above a door?
If they say 10,000 users does that mean they have 10,000 right now? Does it mean there will be 10,000 logged in every second viewing a cat scan? Or does it mean their most optimistic sales goal is to have 10,000 total users in 10 years time and at most 2 users at a time will be looking at a photograph? And best I can say is if they claim 10,000 at the same time right now then question exactly how they came up with that number.
|
|
|
|
|
Schatak wrote: I am going to start a big construction project with MVC. I am confused about Db
choice. I would recommend postponing the choice.
Schatak wrote: Although worked with SQL server from past 5 years. but now thinking to use
MongoDB. They are not the same, and one would perform poor in the area where the other excells. SQL Server would be preferred for relational data, especially if you are on a Microsoft stack.
I cannot determine whether or not MongoDB supports SQL92. It would be nice to know, since;
- You could postpone the choice of which database-class to use by programming against the IDbConnection interface.
- Inject any database-driver in there
- And if you keep your SQL compatible with SQL92, then any database supporting the standard could be used.
SQL92 is not as rich as the Sql dialect of the server, but it does offer the advantage to swap out the database entirely, simply by changing the configuration.
..but in general, you take risks in small and simple projects; it would be very not fun if you had to make a lot of changes in a very large project after some months of work, and breaking it in the process.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Eddy Vluggen wrote: I cannot determine whether or not MongoDB supports SQL92
There's a reason it's called NoSQL.
NoSQL Explained[^] by Mongo themselves.
|
|
|
|
|
Yes, I opened multiple search results in multiple tabs, and the first contained claims to be SQL92 compatible; but they were ODBC-based commercial solutions.
Believe that it was wikipedia that stated there was no support for joins
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
I would use what I know best.
|
|
|
|
|
Right, lets see if my head also think so
|
|
|
|
|
Schatak wrote: Although worked with SQL server from past 5 years. but now thinking to use MongoDB.
Based on what you posted - bad idea.
Only thing that mongodb might be really good at, starting from zero, is storing and retrieving streaming video. And if if you need that then use mongo for that and use the SQL server for everything else.
|
|
|
|
|
Define BIG Construction....
How much data is involved (written to and read from)?
Mainly simple tables with simple types of bugger and heavier types?
You like to encode/decode JSON all the time?
Which requirements are wanted?
In Word you can only store 2 bytes. That is why I use Writer.
|
|
|
|
|
I am not very familiar with Powershell. I have been studying how it works with SQL server. I have a few simple scripts but am hoping there are some libraries of cmdlets writen that allow the backup and restore from an ASP . Net application.
|
|
|
|
|
Wouldn't it be easier to execute either as a simple command, as opposed to invoking a powershell script to achieve the same?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
This is my first time of creating a trigger..I tried to create trigger using mysql to count how many "2007" data are in the table when inserting new record but it not working properly it wont display how 2007 data are in my table.......
My table have more than 50 data...
CREATE TRIGGER No_of_Publisher_year Before Insert ON Book FOR EACH ROW SET @Count_No=New.Copyright;
SET @Count_NO=0;
INSERT INTO Book VALUES(14,'Programming Perl','978-0-201-70073-2','WI','2007-12-11',25.23,2,2007);
SELECT Count(@Count_NO) AS 'No_of_publisher_in_year_2007' FROM Book WHERE Copyright=2007
|
|
|
|
|
dili1234 wrote: how many "2007" data are in the table when inserting new record
dili1234 wrote: CREATE TRIGGER No_of_Publisher_year Before Insert
The before keyword may be why you are not seeing the results you expect.
“That which can be asserted without evidence, can be dismissed without evidence.”
― Christopher Hitchens
|
|
|
|
|
But though i changed Before into after Nothing happened.I want to see the output of the result how just after inserted new value regarding the query....
|
|
|
|
|
Just a dumb question about composite primary key.
I am designing a DB, then i have a specific problem that having 2 primary keys can only solve.
Now I am wondering if having 2 primary keys could hurt performance. Could it be?
I am using MySQL 5.6, and in MyISAM engine.
Any advice will be appreciated.
Thank you
|
|
|
|
|
There cannot be two primary keys; such is always a design-error.
You can have multiple fields that uniquely identify the field, but only one of them will be the actual primary key. The others are 'candidate keys', 'unique constraints'.
No, you don't need a primary key to define a relation, but I would urge to not to. And yes, it will hurt performance.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Ohh I see, thank you.
But why MySQL accept this query
CREATE TABLE IF NOT EXISTS `tbl_sample`
(
`tbl_sample_id` INT UNSIGNED NOT NULL,
`tracked_id` INT UNSIGNED NOT NULL,
PRIMARY KEY (`tbl_sample_id`, `tracked_id`)
)ENGINE = MyISAM
what are you referring about "design-error"? do you mean the design standard or the DBMS itself?
Thank you
|
|
|
|
|
Gilbert Consellado wrote: But why MySQL accept this query ..because it defines a single key, which happens to consist of two fields. It is still a single primary key.
Gilbert Consellado wrote: what are you referring about "design-error"? I mean that there can only be one "primary".
Having multiple fields in a primary key is quite common. Yes, a larger key has a slight performance penalty; it has to check more data than in a single field, and any index containing the key will also grow.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|