Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
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 ...
Guillermo Subiran's user avatar
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) ...
MoonKnight's user avatar
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 ...
alaskanloops's user avatar
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 ...
Ismail's user avatar
  • 121
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 ...
Matthew Moisen's user avatar
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 ...
Devon Parsons's user avatar
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 ...
Juan Carlos Oropeza's user avatar
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 ...
Klamann's user avatar
  • 351