Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
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 ( ...
deadwards's user avatar
  • 113
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'...
J.D.'s user avatar
  • 39.5k
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 ...
JustBeingHelpful's user avatar
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 ...
Petros Apotsos's user avatar
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 ...
LiranBo's user avatar
  • 123
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 ...
MVC Newbie's user avatar
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 ...
Zalom's user avatar
  • 143
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: ----------------- ...
Saeed Neamati's user avatar
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 ...
m4rc's user avatar
  • 235
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 ...
user2759920's user avatar