All Questions
8 questions
7
votes
0
answers
178
views
Modeling tabular structure in MSSQL to store data like Excel sheet applying Column inheritance
I've created this database structure to store tabular information (it's a simplification of my real structure but enough to show the point). In it I have Sheets and ...
0
votes
2
answers
92
views
CTE Query and DateTime Matching
I have two tables (they are defined below and you can use the SQL below to build them)
...
2
votes
3
answers
4k
views
Saving complex business objects with reflection and recursion
In our application we have complex objects with many nesting levels, each with various properties that are important to the business. We currently serialize and persist these objects along with their ...
2
votes
0
answers
51
views
Generalizing work orders
I am working on designing tables for work orders.
The problem:
There is different work order models (from now on called WOM)
The WOMs share some attributes (Num, Date, Description, ... etc)
The WOMs ...
3
votes
1
answer
920
views
Printing the hierarchical representation, and finding all ascendants for a node, in a self-referential table in Python with recursion
I have a self referential database table:
CREATE TABLE category (
id INT PRIMARY KEY,
name VARCHAR,
parent_id INT REFERENCES category (id)
);
And ...
0
votes
1
answer
181
views
Get properties from all children in a recursive SQL structure
In our product, Company is a model that can have many Companies belonging to it; so some Companies are parents, some are children, and many are both.
We have a ...
3
votes
1
answer
546
views
Find all the countries I can visit by just crossing direct borders
I was helping on this question. There you have a table border to indicate countryA and countryB have a common border. And want ...
7
votes
1
answer
9k
views
Get all recursive dependencies of a single database object
I've written a SELECT statement that creates a List of all objects that depend on a single object, so that if I wanted to DROP that object I could DROP all referenced objects first without using ...