All Questions
Tagged with inheritance sql-server
10 questions
1
vote
1
answer
223
views
Class Table Inheritance combined with running searches and paging
Assume we have tables similar to the following:
CREATE TABLE Base
(
ID int,
Type varchar(20),
Col1 varchar(255),
Col2 varchar(255),
AddedAt datetime2
);
CREATE TABLE Sub1
(
...
8
votes
1
answer
10k
views
What is the purpose of "Schema Owner"?
If I create a new schema and set the schema owner to another schema, for example dbo, what is the meaning of that in regards to my new schema?
Does my new schema inherit the same permissions from it'...
1
vote
1
answer
1k
views
user security inheritance in SQL Server 2016
I'd like to build a bunch of new databases (several dozen) in SQL Server 2016. However, I'd like all users to access a single database (called SECURITY for now), and apply security to that one ...
4
votes
2
answers
4k
views
Abstract classes in SQL Server. Are they even possible?
I have a very specific question that I am surprised no one has yet asked. It involves a concrete class model and SQL Server 2016 DDL. The main point is:
In my model, some classes inherit from a base ...
2
votes
1
answer
101
views
Finding a good DB design for my project
I've posted this on stackOverflow but this might be a more suitable place.
I'm really struggling to find a good DB design for my project using SQL server.
I've already implemented a few models which ...
11
votes
2
answers
3k
views
Conceptual ERD Multi-table many to many, or possibly recursive?
I'm creating a conceptual diagram [yes, I know I've included attributes and keys - but this is just for me to consolidate what I'm doing whilst learning] -- so please treat it as Conceptual with the ...
4
votes
1
answer
2k
views
Enhanced ER Model Supertype / Subtype modeling issue with inheritance and recursion
Before posting, I have looked for a good solution on internet and I have coined this post for 3 days in row and trying to think through it prior this post. So if I have missed something or got it ...
4
votes
2
answers
1k
views
How to enforce data consistency across one-to-one relationship in an inheritance hierarchy
Consider this design for a typical school database:
Person:
-----------------
FirstName
LastName
SocialSecurityNumber
Phone
Email
Student:
-----------------
Grade
Teacher:
-----------------
...
11
votes
5
answers
56k
views
Insert into select into multiple related tables using INSERT_IDENTITY
Okay setting the scene. I have three tables, (Table1, Table2 and DataTable) and I want to insert into Table1 and Table2 using DataTable as source.
So for every row in DataTable I want a row in Table1 ...
2
votes
1
answer
543
views
Is this a step in the right direction for normalization? SQL 'inheritance' and Many-to-Many relationships
Context:
So, this is kind of a compound question, but they go together, and definitely wouldn't make sense split up into separate questions.
I've been working on a new database for what will end up ...