database

Creating VIEW in system level

I have created a VIEW using the CREATE OR REPLACE VIEW statement at the domain schema level. create or replace VIEW SERV as select loop.loop_serv serv, component.cmpnt_id,component.loop_id from component,loop where component.loop_id = loop.loop_id union select distinct ' ',0,0 from component,loop; So if I login to the domain schema a...

How to convert XML file to a Database?

I recently downloaded the SO Data Dump and was wondering how I could convert it from XML to a DB that I could use in my .NET applications. ...

Does an in-memory database also have a filesystem component?

I'm working with Datamapper which allows you to specify either a path to a database file on your system or simply the string "memory" and then an "in-memory" database is used. However, I have no idea what this means. Is an "in-memory" database purely memory-based or does it get serialized to the filesystem at some point? What's the b...

Splitting a Server Hosted Access Database

I am looking into building an access database that will replace a very frightening combination of excel spreadsheets that are linked together. The files for the current spreadsheet system are located on our Windows Storage Server, which has a mapped drive to the directory they use. Multiple users access this system as it host inventory, ...

database query's from class object with php

Hello, My question is: Can I still do query's from within an object like this: $result = mysql_query ($q,$dbc) or trigger_error("Query: $q\n<br />MySQL Fout: " . mysql_error($dbc)); by passing the global dbconnection variable $dbc to the constructor or is there a better way? Or creating a singleton class for...

How to Send DateTime Or DbNull to DB using c#?

Hi all. I have a web form (.aspx) that has a textbox. My user can enter a value into the textbox as a persian date. what should I do is converting texbox.text into DateTime. But sometimes,the textbox has no text within it and so I should take care of it and return null. when I return null how can I insert null (c#) into DB? ...

pass MySQL link to a class method

Here is my problem, i have a class with a ave method, i want to pass a Mysql DB link to it, so i create a new object from the class, and call the saveProperty method, and in my main file i created a MySQL connection and saved the link in a var called $db so when i call the method it's link this: saveProperty($db). but insted of saving t...

postgres: constraint check

Hi there, please have a look at the following table: name | x | y ---------+-----+------ foo | 3 | 5 bar | 45 | 99 foobar | 88 | barfoo | 0 | 45 I want to add a constraint CHECK ( y > x ), but this obviously will fail due it is violated by the row 'foobar'. How do I create a constraint that says: check (...

How do I protect the database server?

Currently my database user and its password are pretty easily to guess, eg. database user: dbadmin database pwd : super + companyname What and how to generate a secure a secure database password? Using md5 or sha1?? What are the things that I need to pay attention to secure my database? I am using php, thanks ...

How to load text file (txt/csv) into a database table (Windows) - looking for an RDBMS independent solution

Hi all, I am looking for a generic way to load flat/text files (txt/csv) into a database table in a .Net application. So far I know that... 1) I could MSSQL BCP - but that's MS SQL Server only 2) Use the JET engine to access flat files (pain with schema.ini file etc. as file names frequently vary) 3) Load txt/csv file into a .Net array...

User's text in my database as a separate table or within other data

This question is based on my plan at the thread. I have the following table where kysymys is a question in English. I would like to know how I should store the data of an user's question: in a separate table where I have the parameters question-id and question-body OR in the current table where I have other parameters too I nee...

[Java(J2SE)] Store data(strings) in database

I have a Vector < String >. Now i want to store those Strings in database. But i have one "but"! The program user mustn't install anything else except J2RE, he will just copy program to his computer and run. Does java has such kind of database? P.S. Previously i think about object serialization or just simple text\xml file but according...

To improve a relation figure for a database

This question is based on my plan at the thread. The following figure shows relations in my database I have two "help-tables": questions-subjects and check-moderator. I use the former because one question can have many subjects, while the later because more than one moderator can check a question. I left out the 1-to-1 number out at...

Examples of good UI for selecting multiple records

I'm currently revisiting an area of my Windows-based software and looking at changing the relationship from 1->M to M->M. As a result, I need to adjust the UI to accommodate selecting multiple related records. There are a lot of ways to handle this that are common, but usually pretty clunky. Examples include the two-pane list of all ite...

How to improve a ERD

This question is based on my plan at the thread. My entity-relationship diagram is I would like to know the following. Does my sequence diagram match the following relation diagram? ...

How to model Open/Closed statuses in a database?

Hello, Imagine I have an Orders table with columns OrderID (PK), CustomerID, CustomerOrderN and so on. Now I need to add a possibility to "close" orders with specifying a reason why order is closed (for example "offered price is too high for customer", "not available", "customer asked to close the order"). Question 1. What would be ...

To SHA512-hash a password in MySQL database by Python

This question is based on the answer. I would like to know how you can hash your password by SHA1 and then remove the clear-text password in a MySQL database by Python. How can you hash your password in a MySQL database by Python? ...

Access Visual Studio 2008 server-based database from VB 6 project

Is it possible to access a Visual Studio 2008-created server-based database from a VB-6 application? If not, what is the best way to share a database between a VB-6 application and a C# application? ...

Connect multiple tables in different databases? MySql.

Hey, I am looking for a good way to connect to at least 2 databases in mysql using php and gathering information within each of those databases from tables. The tables will have related information. eg. I have site names in one database('siteinfo') in a table called 'sites'. I also have the site descriptions in another database('sitede...

Advantages to using Microsoft SQL Server with an open-source stack

SQL Server seems to have really terrific tools and features, enough to make me consider using it instead of MySQL, even though I'm doing development on an open source stack. Has anyone developed an app on a non-.NET stack and chosen to use SQL Server as your backend? What were your reasons for doing so? ...