New answers tagged

2

If I have understood what you need is: TASK TABLE: ID, NAME, DESCR and other attributes ROUTING TABLE: *ID, IDTASK, INFO and other attributes** ANALYSER TABLE: ID, IDROUTING and other attributes SUBCONTRACTOR TABLE: ID, IDROUTING and other attributes INTERNE USER TALBE: ID, IDROUTING and other attributes if you want to trace better the relations, you ...


0

You could programmatically build queries to test which combinations of columns look like they might be keys. In order to test a given relationship you'd run a query of the form: SELECT 1 AS [IsPossibleKey: ChildTable.KeyColumn => ParentTable.PrimaryKeyColumn] WHERE NOT EXISTS ( SELECT * FROM ChildTable c WHERE NOT EXISTS ( SELECT * FROM ...


1

A proper Postgres schema for your example could look like this: CREATE TABLE selected_task( selected_task_id serial PRIMARY KEY -- surrogate PK , user_id int REFERENCES users(user_id) , task_number int , name text , jobsite_id int REFERENCES site(jobsite_id) ); CREATE TABLE sub_task( sub_task_id serial PRIMARY KEY ...


2

The theory is you should isolate elements of diferent purpose, function or character, in this case fields like invoiceNum, make, model, location and type are normal candidates to live in their own tables, and have only a reference to their id numbers in this table, but it depends a lot on the application itself. What you are asking for it's called ...


1

You are asking: I have a question, how did we know that R1 was not in BCNF and needs to be decomposed? In the BCNF Decomposition Algorithm, when a relation is decomposed, one should find the dependencies of the subschemas, in this case R1(ACDE) and R2(BCD). Let’s start from R1. To find the dependencies that hold in R1, one should actually project the ...


2

The algorithm that decomposes a relation schema R to produce the BCNF operates in the following way: at each step, a dependency is searched that violates the Normal Form. If one if found (as A -> B C D E in the example), the schema is decomposed in two subschemas, one with the attributes of A+, and the other one with the attributes of the relation R minus ...


0

I work in an organisation that has implemented RDBMS and NoSQL databases (Hadoop). We're looking at getting rid of the RDBMS as it is not as flexible as it needs to be for constantly changing data. So NoSQL would be the way to go. And we use OOP. With OOP you can use a mixture of both databases as we are doing now. It does not have to stop at the RDBMS. ...



Top 50 recent answers are included