Tag Info

New answers tagged

1

Your Altered_Files design is absolutely fine. In fact I would award bonus points for separating the files per se from the hierarchy. @chillworld's suggestion is workable and very common but yours is better because of the NULL issues you mention. I can't think of any update which is better in one schema or the other. Change as single row - either the file ...


0

Let's say you made the table like this CREATE TABLE TrainEvents ( id INT NOT NULL AUTO_INCREMENT, station_arr_id INT NOT NULL, station_dep_id INT NOT NULL, arr_dt DATETIME NOT NULL, dep_dt DATETIME NOT NULL, ... PRIMARY KEY (id), KEY station_arr_index (station_arr_id,arr_dt), KEY station_dep_index (station_dep_id,dep_dt) ...


0

You should store all the events(*) in a dedicated table A with a date column for time of the train departure (to re use your example). This will allow you to deal with exceptions when (to reuse your example) a train departure is cancelled even if it was initially supposed to leave the station this day. Quering the table will then consist in using 2 ...


1

I'd suggest you have a think about this system's use cases. Work out in your own mind how the queries will look for the given design and for your alternative. Include scenarios where people move between slots. What do updates look like? Can business constraints be enforced in DRI? Can the desired values still be found? Having actual examples to talk ...


0

Use a query to generate a drop type script [in SQL Plus]: set lines 132 set head off set pages 0 spool drop_types.sql select 'drop type '||type_name||';' from user_types; spool off Then execute the script in SQL Plus: @drop_types.sql


1

Scenario 1 could have multiple products linked to the same product_price. The second scenario, where the tables have the same PK (and one is a FK), is forced to being 1 to {0,1}. Edit: Well now that you've changed Scenario1, my answer doesn't fit any more. Now, your two scenarios are identical, but your first table has two PKs. Scenario2 is fine and ...


1

According to this information on the ICAEW site, the things to be copied are fairly well defined. This is based in the UK. See: http://www.icaew.com/en/members/practice-resources/news/money-laundering-what-do-you-do-with-passports Basically they say that identification: "For the purpose of due diligence evidence under the Money Laundering Regulations you ...


0

Your Order should be Primary Key which you can link to another table where order details will be given. Products { ProductID, Name, Price } Customers { CustomerID, FirstName, SecondName } Customer_Orders { OrderID (Primary Key) CustomerID ... } Order_details { OrderID ProductID Quantity }


0

I would not recommend doing automatic migrations from any relational databases (or other that differs in logic) to MongoDB. Of course it can be done, but the database performance might not be (and will most probably not be) good. Now, answering your questions directly: 1) what do you mean by MySQL parameters? 2) Check the official docs page about the ...


1

If you just need results from multiple schemas, you can re-use the same query string and set the search_path in between: SET search_path = u111, public; SELECT * FROM foo; SET search_path = u222, public; SELECT * FROM foo; ... If you need to combine results from multiple schemas (probably your use-case), you can either build the statement in your client ...


0

If your table structures are the same, you could use table inheritance then create a master schema with all the table structures and have the others inherit table from that one: Here is an article we wrote describing the technique: http://www.postgresonline.com/journal/archives/59-How-to-Inherit,-Unherit-and-Merge-Inherit.html


2

You can use Vertabelo. Vertabelo is an online database designer working under Chrome developed by company I work for. Vertabelo focuses on online collaboration in the visual database schema creation area. The most important feature of this tool is that it allow to share database models across the team and collaborate on them via web browser. It also allow ...


0

You can use Vertabelo. Vertabelo is an online database designer working under Chrome developed by company I work for. The most important feature of this tool is that it allow to share database models across the team and collaborate on them via web browser. Others Vertabelo features include: Support for PosgreSql, MySQL, Oracle, MS SQL Server, DB2, ...



Top 50 recent answers are included