database

Query optimisation

In my application, my module uses the following tables PUBLIC_APPLICATION CATEGORY_MASTER NOTIFICATION_SITE_DETAIL DIMENSION_MASTER DM PUBLIC_REGISTRATION ALLOTMENT_NOTIFICATION. From the following tables I am retrieving the data SELECT PA.REGISTRATION_NO,PA.APP_ID,PA.NO_OF_ATTEMPTS,CM.CATEGORY_NAME, DM.SITE_DIMENSION,PR.B...

SQL database design problem.

I'm creating the database for monitoring status of applications' functionalities. The logic is following: Each application has its own, specific list of functionalities that I'm monitoring. Each functionality belongs to only one application. There is a Functionality table that has foreign key to Application Each application runs on one...

How to store the following SQL data optimally in SQL Server 2008

I am creating a page where people can post articles. When the user posts an article, it shows up on a list, like the related questions on stackoverflow (when you add a new question). It's fairly simple. My problem is that i have 2 types of users. 1) Unregistered private users. 2) A company. The unregistered users needs to type in their...

Is auto-primary-key generation feature of Databases reliable?

I have developed a web application and various clients can store records to that database simultaneously. I have set the auto-primary-key generation functionality of that database that generates a primarykey automatically (auto-increement) whenever a new record is added to the database. So my question is Can I rely on this auto-key-gen...

should I include the @ when using SqlCommand.Parameters.AddWithValue?

I have always included the at sign in the parameter name when using AddWithValue, but I just noticed some code written by someone else that doesn't use it. Is one way more correct than the other? cmd.Parameters.AddWithValue("ixCustomer", ixCustomer); or cmd.Parameters.AddWithValue("@ixCustomer", ixCustomer); ...

Way to abstract database schema creation?

I'd like the ability to create a schema for multiple database types such as MySQL, SQL Server, and PostgreSQL. I know ORM tools such as Hibernate can do this, but I won't be using an ORM to access the database so would like a solution that doesn't depend on one. Are there any tools that can do this? Edit: I forgot to mention that this ...

Validating stored procedure arguments to enforce referential integrity constraints

Hi all, Of late, I have a tendency to validate my stored procedure action query arguments before actually performing the query. An example would be to check that, on update to table 'T' that has a column 'C' which has a unique index, that the Update would not fail... by first performing a "Select Exists on the unique index" type of qu...

Requirements for using an SQL database in a program.

I have been experimenting with writing applications that use a local SQL Database to store data. I am using Visual Studio to create Windows Forms applications and then connecting them to a database and using LINQ to SQL to pass data to and from the DB. My question is, when I deploy this program on a target machine, what requirements must...

SQL Server 2008 Witness Server error

Our SQL Server 2008 mirroring was setup and working a few weeks ago with a 3rd server as the witness. However, we started getting the following error message recently: Database mirroring connection error 4 'An error occurred while receiving data: '64(The specified network name is no longer available.)'.' for 'TCP://COMPUTER-...

Postgres Command Line tool for Import/Exporting data/ddl

For Postgres is there any sort of command line utilities that allow a database to be "dumped to a file" and that allow that same database dump to be imported? I know this can be done through PGAdmin, but I need to be able to do this on the cmd line. ...

python logging to database

I'm seeking a way to let the python logger module to log to database and falls back to file system when the db is down. So basically 2 things: How to let the logger log to database and how to make it fall to file logging when the db is down. ...

Sorting by ratings in a database - Where to put this SQL? (PHP/MySQL)

Hi folks OK - I'll get straight to the point - here's the PHP code in question: <h2>Highest Rated:</h2> <?php // Our query base $query = $this->db->query("SELECT * FROM code ORDER BY rating DESC"); foreach($query->result() as $row) { ?> <h3><?php echo $row->title." ID: ";echo...

C# ASP.net MVC database questions

I am trying to develop a website with C# ASP.net MVC. It's my first time using Visual Studio, C# and ASP.net so I have lots to learn but so far so good. So far... I started a C# ASP.net MVC project and added a database by going to the Database Explorer and clicking "add connection". I then did some standard CRUD controllers and views. I...

Python Daemon To Watch A Folder And Update A Database.

This is specifically geared towards managing mp3s but should easily work for any directory structure with a lot of files. I want to find or write a daemon (preferably in Python) that will watch a folder with many subfolders that should all contain X number of mp3s. Any time a file is added, updated or delete it should reflect that in a...

Is the Google Calendar API appropriate for my problem?

Hey all! I'm currently working with a team on a project that will serve as a campus-wide event calendar for my school. We're designing it to be a web application using JSP having a java back end and connected to a relational database located on a server. The database will store events and produce a calendar on the web page based on the ...

What is the better way to use a my_sql database with a C# .Net software ?

Hi, I would like to create a C# .Net software linked to a database. I had a look at some solutions found on google but none of them convinced me ... So, what do you think is the better way to integrate a my_sql database into a C# .Net Software. Of course a nice integration into visual studio would be better :p Thanks. PS : I use Rub...

In Django, why does this error say that my column can't be null?

picture_url = models.CharField(max_length=2000) ...

Guid.NewGuid().GetHashCode() for DB

Would this be reliable for using as an ID for data storage(SQL Server)? I would use a guid but I prefer a numeric value. ...

MySQL Recover Deleted Database

Accidently dropped my database from Mysql.Any way to recover that table. Anybody can help me please........... ...

Advantage Database or SQL Server

I have a client that currently uses a local Advantage Database on their PC along with an application. They are thinking of upscaling their setup to have multiple applications running communicating with a database server i.e/a client-server environment. They are now considering the best database for this approach. They are looking at t...