For example if I have 20 tables, I have to design it by section? i.e
CLIENT (id, name...) -- orders -- ODERS_DETAIL(id, products...)
.
.
.
lives --- ADDRESS(...)
Or I can use The MySQL Workbench EER Model (To me, it looks like the Pysical Model)?
Or like this: Data Modeling Levels
...
I am trying to understand this concept. For example: I have two tables City and Country.
Country
-------
id
abbreviation
name
City
-----
id
name
Country (name or id, or both? - This is the question)
To reference and keep a particular city in sync with the country it belongs to I guess this will be reference to country....
I have a table called "r", inside that table I store id, ip, and country. I am running this query:
SELECT r.country, count(rr.ip), count(DISTINCT rr.ip)
FROM `r`
LEFT JOIN r rr
ON r.country = rr.country
GROUP BY r.country
I do get rows with columns: "country";"number";"number";
But both "counts()" doesn not show what I want it to...
Hello,
Is it possible to do Incremental syncronization for occasionally connected clients using JDO.
I stumbled upon JDOReplicationManager but not sure whether is solves the following needs,
Replication to be initiated from an web application.
Replication should be a two way process. i.e. Synchronization
If there is a failure in netwo...
Consider a table to store SSN and DOB.
CREATE TABLE fbi
(
ssn BIGINT,
dob DATE
)
Data was loaded into the table:
LOAD DATA LOCAL INFILE C:\test.csv
INTO TABLE fbi
FIELDS TERMINATED BY ','
OPTIONALLY ENCLOSED BY '"'
LINES TERMINATED BY '\r\n';
SELECT * FROM fbi;
It is showing null values for DOB. I don't understand the ...
I am using cpanel and I wanted to grant a user create view privileges. When I created the user and database in cpanel it did not have an option for that.
So I tried to do it in phpmyadmin using
GRANT CREATE VIEW ON (dbname).* TO '(db username)'@'localhost';
and I get the error
#1044 - Access denied for user '(host username)'@'loca...
I am using PHP to read a text field (DESCRIPTION) from MYSQL and prepare a JSON object. Modelled on JQUERY DataTables Plug-In example.
The DESCRIPTION field contains carriage returns and I believe this leads to invalid JSON. JSONLINT.com produces "Syntax error, unexpected TINVALID at line 35. Parsing failed".
http://ageara.com/exp3/se...
hi,
i got 2 tables. product and order_items which contain all the products that were bought.
so how do i create a relationship in mysql whereby if a product exists in order_items, restrict users from deleting it from product table??
thanks
...
CREATE TABLE parent (id INT NOT NULL,
PRIMARY KEY (id)
) ENGINE=INNODB;
CREATE TABLE child (id INT, parent_id INT,
INDEX par_ind (parent_id),
FOREIGN KEY (parent_id) REFERENCES parent(id)
ON DELETE CASCADE
) ENGINE=INNODB;
I dont understand the meaning...
I have a .txt file in which i have created database and tables. I want to run it on mysql command line window. I used the command source C:\Dbbut it failed to open it. Do i need to use some other command for it?
...
Perhaps, using the word CRM is a bit of a misnomer, essentially, I'm looking for a fast and easy way to create a front-end so that others in my organization can utilize a MySQL database that I've created that manages lists of respondents to marketing research surveys.
I would need to do the following through the proposed front-end:
...
what is the best way to delete database from windows mysql?I tried DELETE DATABASE phone but it doesn't work.
...
I'm trying to do something like the PHP array_intersect. I have the following table
CREATE TABLE `recipes_ingredients_items` (
`id` INTEGER(11) DEFAULT NULL,
`itemid` INTEGER(11) DEFAULT NULL,
`orderby` TINYINT(4) NOT NULL,
KEY `id` (`id`),
KEY `itemid` (`itemid`)
)ENGINE=MyISAM
AVG_ROW_LENGTH=47 CHARACTER SET 'utf8' COLLATE '...
I get the following error below. Line 53 is if(mysqli_num_rows($r) == 1) {. How can I fix this problem.
PHP error: on line 53: mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given
Here is the PHP MySQL code.
$d = "UPDATE users SET del = 1, del_date = NOW() WHERE userid = '" . $_SESSION['userid'] . "'";
$r = mysqli...
Hi to all
for my app need to have a list of mayor woldwide cities with relative GPS coordinates for proximity search, anyone know how is possible to find a db of this type? (not API)
...
Hi,
I currently have a table of 3m records that needs updating nightly.
The data that populates this table comes from ~100 APIs that all get normalised into one jumbo table.
Problem:
How to reflect new records being added, and records being deleted at the source?
Facts:
I can't truncate the table every night and reinsert.
Each API pro...
I have encountered a problem when designing the table schema for our system.
Here is the situation:
our system has a lot of items ( more than 20 millions ), each item has an unique id, but for each item there can be lots of records. For example for the item with id 1 there are about 5000 records and each record has more than 20 attrib...
i have to select from my homework dates from this time up to the next 2 months...
i'm doing an expiration database.. pls help me
...
Hi,
I want to get only the rows with a unique value for a certain field (2 actually).
My table is like this:
id senderID receiverID ... ... ...
_________________________________________________
0 0 1 ... ... ...
1 2 1 ... ... ...
2 1 0 ...
I found this great example which takes an sql statement and dynamically adds the field names into a header row and the data into the following rows?
Heres the example http://www.weberdev.com/get_example-4249.html
...