database

Performance tool for MySQL

Ciao, I'm looking for performance tool for testing of load in terms of data and number of users,better if they are open source Thanks Andrea ...

SQL Server (2008) Creating link tables with unique rows

Hi guys, I'm having trouble getting in touch with SQL Server Managemen Studio 2008! I want to create a link-table that will link an Event to many Audiences (EventAudience). An example of the data that could be contained: EventId | AudienceId 4 1 5 1 4 2 However, I don't want this: Even...

Table revision/history?

Hello, Im trying to figure out the best way to keep history/revision of tables in a relational database. I have done some research and reading, and am not sure what would be the best way to go about keeping track of changes. For my main tables, Im quite sure I have settled for a revision table, to keep track(see picture) but it is the ...

Generic Database Monitoring Tool

Hi ... It seems like something like this should exist, but I have never heard of it and would find such a utility to be incredibly useful. Many times, I develop applications that have a database backed - SQL Server or Oracle. During development, end users of the app are encouraged to test the site - I can verify this by looking for entr...

Renaming DB column in referencing table (violation?)

Say I have this table: Person table -------------- PersonId Address table ------------ AddressId PersonAddressId where PersonAddressId is PersonId and the foreign key. Is there any type of database violation in renaming the foreign key? It can become very confusing to work with when they have different names. ...

What's the best practice for storing huge amounts of text (into a DB or as a file?), and what about compressing it?

I'm building a web-app that handles internal emails and other frequent small-to-medium sized chunks of text between users and clients. What's the best method for storing this data? In a database (MySQL) or as thousands of individual files? What about compressing it (PHP's gzcompress() or MySQL's compression features)? This will not be a...

scope in PHP classes

I am creating a database connection object, and I'm not sure what the best way would be... If I create a dbConnection class which establishes the connection (using mysql_connect) can I then call mysql_query from anywhere in the main script? what about from inside OTHER classes? Do i need to pass the object or attribute as parameters? ...

Please help me with a MySQL SQL subquery

I have two tables named foo and bar, hypothetically speaking. foo has columns foo_id, foo_fluff bar has columns bar_id, foo_id, timestamp I need a query which will retrieve return one row for any foo_id that the table bar contains, with the latest timestamp. So, if bar has three rows, two of which have a foo_id of 1, and 1 of which ha...

JSON is used only for JavaScript?

I am storing a JSON string in the database that represents a set of properties. In the code behind, I export it and use it for some custom logic. Essentially, I am using it only as a storage mechanism. I understand XML is better suited for this but I read that JSON is faster and preferred. Is it a good practice to use JSON if the intent...

vba simple database query from word

This is basic stuff, but I'm somewhat unfamiliar with VBA and the Word/Access object models. I have a two column database of about 117000 records. The columns are 'surname' and 'count'. I want a user to be able to type SMITH in a textbox and hit submit. I then want to run something like SELECT table.count FROM table WHERE surname = str...

How to access various databases using OLE DB with minimum installation

Hi, Our reporting tool needs to access the database and get information from it. The tool uses Crystal Reports. The database can be one of SQL Server, Oracle, Sybase and Postgres. Currently, we install the database client with the report tool installation. We would like to avoid this client installation due to licensing issues and user p...

In ColdFusion, how can I extract and store the contents of the submitted form?

I'm writing an application in ColdFusion, and even though it is mostly stable, it errors every so often. Because it has replaced the old application already, sometimes it is the users who get errors instead of me. I've created a nice page that people get when they get an error that sends information to me, such as error, referrer, error...

Are stored procedures required for large data sets?

I've just started my first development job for a reasonably sized company that has to manage a lot of data. An average database is 6gb (from what I've seen so far). One of the jobs is reporting. How it's done currently is - Data is replicated and transferred onto a data warehouse. From there, all the data required for a particular repo...

Selecting a database in mysql with spaces in its name

I want to select my particular database in mysql console, but the problem is that my database name has a space in between and mysql ignores the part after the space. For instance, when i give the command: use 'student registration' I get the message: cannot find database 'student' ...

Hibernate One-To-Many Unidirectional on an existing DB

Hello Stack Overflow Experts, i have need of your expertice: I am trying to use Hibernate on an Existing DB. Currently im trying to load a User object and a list of UserData objects that go along. in the DB the (simplified) layout is | User | | UserData | ---------------- ----------------------...

Conditional SELECT of a column

Heyall! Maybe you can help me with a SQL Query: I have a conversion value in a secondary table and the following structure: ID PRICE_BRL PRICE_USD -- --------- --------- 1 10 5 2 12 NULL 3 NULL 3 4 14 NULL 5 NULL 4 6 NULL NULL I need a Result Set Like that prioritizes the first column, in c...

Starting a new app with database support

Hello, I'm starting a new C# project that uses a database, but I want it all to be version controlled. I'm thinking about a SQL server database (If I make a mdf file, will I be able to use it in a computer without SQL Server installed?) and LINQ to SQL. How do you usually start a project like this? Do you create a .sql file to create th...

How to find the one hour period with the most datapoints?

I have a database table with hundreds of thousands of forum posts, and I would like to find out what hour-long period contains the most number of posts. I could crawl forward one minute at a time, keeping an array of timestamps and keeping track of what hour had the most in it, but I feel like there is a much better way to do this. I wi...

Define Generic Data Model for Custom Product Types

I want to create a product catalog that allows for intricate details on each of the product types in the catalog. The product types have vastly different data associated with them; some with only generic data, some with a few extra fields of data, some with many fields that are specific to that product type. I need to easily add new pr...

Maintain valid records in a table

I have a table which holds flight schedule data. Every schedule have an effective_from & effective_to date. I load this table from flat file which don't provide me an effective_from and effective_to date. So at the time of loading I ask this information from user. Suppose user gave from date as current date and to date as 31st March. No...