database

Store Information In MySQL Database with Python

I am working on a huge project. I have been working on it for a while now, and decided to "up" the security on the way the software handles data. I already know how to encrypt and decrypt the data strings using DES encryption, but what I am not sure about is where to put that encrypted data. I would like to store everything in a MySQL da...

Strategy to handle large datasets in a heavily inserted into table

I have a web application that has a MySql database with a device_status table that looks something like this... deviceid | ... various status cols ... | created This table gets inserted into many times a day (2000+ per device per day (estimated to have 100+ devices by the end of the year)) Basically this table gets a record when jus...

What back end database /technologies are being used by The New York Times engine?

Does anyone know what technologies/ content management systems newspaper companies like the New York Times or the LA times use to run their websites? I need to re-design my Universities website, and I want to make sure I'm using/researching the best technology possible. ...

JavaScript Avatar

Hello, I'm trying to create a javascript avatar. E.G with Head Items, body items etc... I have a PHP script that queries the database and retrieves the current items the avatar/user is wearing, it's response is in a serialised array. The item/avatar images are in E.G: http://blahblahblahBlah.com/graphic/itemtype/id.png Thank you in adv...

How can I model an is-a relationship with DBIx::Class?

With the following (simplified) MySQL table definitions: create table items ( item_id int unsigned auto_increment primary key, purchase_date date ) engine = innodb; create table computers ( item_id int unsigned primary key, processor_type varchar(50), foreign key item_fk (item_id) references i...

Database table normalization question

I'm making an online calendar. One will be able to create en event and then have the possibility to choose to add "infinite" or "from" to "end" datetime. And if you choose to add a "from" to "end" you can choose it to be no repeat or repeat every day, every week or every month. I wonder what is the best way to create these relations. ...

SQL: Any straightforward way to order results FIRST, THEN group by another column?

I see that in SQL, the GROUP BY has to precede ORDER BY expression. Does this imply that ordering is done after grouping discards identical rows/columns? Because I seem to need to order rows by a timestamp column A first, THEN discarding rows with identical value in column A. Not sure how to accomplish this... I am using MySQL 5.1.41 ...

remote server connect with mysql

Hi, I have mysql 5.1 set up and running. I need to connect to: location: comm.eng.bxg.com name: amntxy user: username pswd: password I have tried using mysql -h amntxy -u username -p Also tried: use amntxy and use comm.eng.bxg.com/amntxy But I am unable to connect. I get the following error: ERROR 2005 (HY000): Unknown MySQL ...

Best way to create SQL indices?

What is the best way to create an SQL index in SQL database? CREATE INDEX idx ON sometable (col1, col2, col3); Or CREATE INDEX idx1 ON sometable (col1); CREATE INDEX idx2 ON sometable (col2); CREATE INDEX idx3 ON sometable (col3); Which is the difference between these 2 methods? Does it depends on the SQL implementation? (SQLite, M...

Install script - How to check if database tables already exist?

Hi! I found out how to find if the database exists with this code: if(mysql_select_db('db-name')) return true; But i would like to check the tables inside the database. Here is the code: error_reporting(0); session_start(); global $_ERROR; $_ERROR = array(); $installed = false; if($_POST) { $num = 0; foreach($_POST as $ke...

database security

Hi, I created a db to manage the users of my webpage. What is the way to make this db protected from malicious users? I want to find out what are the main protection methods, as well as less used methods. ...

Putting database logic in the application instead of trigger, stored procedures, constraints etc.

I'm using Rails and it does not provide support for database specific actions like triggers, stored procedures and various constraints (not all of them). I wonder if I should put the database logic in the application itself instead. Because then you can make more complex logic than the database provides and it is also database independ...

Pictures & Tags - Database Design Question

I have 3 tables which allows me to get all tags of some picture, or all pictures with a specific tag. I would like also to know the number of times each tag exist. How could I get this info using MySQL ? Is it worth to add a "Count" column to the Tags table to hold this info ? Files Table File ID File Name ... ------- ------...

How should I pass parameters between separated parts in my system?

I have a large system working on a set of data. My system is combined of several separated parts (like services) - the separation is based on a platform of sort. Throughout the system flow the set of data is altered and updated to a DB. The platform I use allows communication between the different parts with XMLs. So, if one part needs ...

Python and sqlite trouble

Hello, I can't show the data from database sqlite in python. connection = sqlite3.connect('db') connection.cursor().execute('CREATE TABLE IF NOT EXISTS users ( \ id TEXT, \ name TEXT, \ avatar T...

SQL Data Type to store Product versions

What data type should i use for a SQL column to store Product version eg. Version 0.1 0.1.1 0.2 1.1 1.1.647 2.0 ..... In query i should be able to sort them based on version number and i want an optimal query to find highest number. Thanks ...

Rails Team specific content?

Hi Everyone, I have made a fairly simple app, which can be found on GitHub called BaseApp2. It's basically a starter application for future apps that I make to save me redoing the same parts over and over again. It's not advanced, but it serves its purpose for me. At the moment any information that's entered into the database is eith...

Pros and cons of external database services (mongohq, etc.)

For putting together a site from scratch, what are the advantages and disadvantages of using external database services, e.g. MongoHQ, Amazon RDS? ...

Country/State/City Database?

Ok, this one is a non technical question. I am creating a business directory and I'd like to categorize listings by location. Instead of giving users an option to enter the location, I am going to provide them with a list of locations which follow a Country/State/City format. I tried GeoWorldMap by GeoBytes. It looked promising in the be...

Recommended database backend for blog

Greetings, I'm building my personal website using php. My standard approach is to use MySQL as a database backend. I've been hearing a lot about document orienting databases and I'm wondering if these ( couchDB, mongoDB) might be a better option for me. I understand that a low traffic site such as my personal homepage isn't going to se...