Viewing 15 posts - 781 through 795 (of 7,597 total)
The main thing is:
Do not get bogged down futzing about with specific data types during the design process!
Those details are best left until later anyway.
What is vital is to get...
June 21, 2022 at 6:06 pm
Create another Attributes document that has additional info about each attribute, including its valid range of values. This will end up being one of the most valuable documents created during...
June 21, 2022 at 6:01 pm
One thing someone said to me was that there cannot be two primary keys in a table. Is this true? if so, how can I adjust my data model...
June 21, 2022 at 5:55 pm
I would strongly recommend sticking with "integer" as the type. Add a domain (or range_of_values) column to limit the size rather than a data type name. Remember, the...
June 21, 2022 at 3:19 pm
SELECT *
FROM (
SELECT TOP (1) vacationhours AS 'Max_VacationHours', *
FROM [HumanResources].[Employee]
ORDER BY vacationhours DESC
) AS q1
UNION...
June 21, 2022 at 2:35 pm
My earlier comment on the model got lost (this site seems to do that sometimes with posts that go to a new page).
Overall I think you did an excellent job...
June 21, 2022 at 2:30 pm
No, unfortunately you can't use WITH TRUNCATEONLY to free the space.
Fragmentation is possible from the SHRINK, so you'll have to check if any tables need rebuilt after you've shrunk the...
June 21, 2022 at 2:23 pm
That should reclaim space from that table back to the database itself.
I think you'll still need to run SHRINKFILE to free the space the database itself back to the disk.
June 21, 2022 at 2:13 pm
Does the system need to prevent duplicate responses to a Ticket? That would be complex to do at the very least.
June 20, 2022 at 10:03 pm
Remember, too, that the logical data model should be easily understood and use by business people. In fact, if possible, keep all developers out of the...
June 20, 2022 at 4:41 pm
You could just use the 1st for the day, which would mean it was still a valid date:
CONVERT(varchar(10), DATEADD(MONTH, DATEDIFF(MONTH, 0, Tab.date), 0), 120)
June 20, 2022 at 3:31 pm
This link gives a few reasons for choosing shorter varchar lengths.
In terms of storage, CHAR(n) columns are always n characters long.
VARCHAR(n) columns are anything between 2...
June 20, 2022 at 3:18 pm
Remember, too, that the logical data model should be easily understood and use by business people. In fact, if possible, keep all developers out of the first one...
June 20, 2022 at 3:14 pm
Thank you for your reply.
I took a look at your spreadsheet and immediately found a pretty nasty issue... about 2/3rds of the rows have duplicated Ticket Numbers.
Scott...
June 20, 2022 at 3:10 pm
Ticket response - can you have more than one response per ticket?
If Yes then its PK should be TicketResponseID and the Ticket Number should be a FK to Ticket
No,...
June 20, 2022 at 4:35 am
Viewing 15 posts - 781 through 795 (of 7,597 total)