1/17
Looks like no tags are added yet.
Which composite key fits LineItems table?
(InvoiceID, LineNumber)
Best primary key for Countries table?
CountryCode (ISO-2)
Which adds UNIQUE constraint on Users?
ALTER TABLE Users ADD CONSTRAINT UQ_Users_Username UNIQUE (Username);
True or False: A surrogate key has no business meaning.
True
Third Normal Form (3NF) removes:
Transitive dependencies between non-key attributes
Valid foreign key in library schema?
Loans.MemberID → Members.MemberID
Match normal form to its rule: 1NF
Attributes are atomic
In Crow's Foot ERD, correct mapping?
Forked "crow's foot" = Many
Best data type for emails up to 320 characters?
VARCHAR(320)
Best reason to create view vActiveSubscriptions:
Hide complex joins/filters and expose limited columns
Which executes stored procedure with named parameter?
EXEC dbo.uspFindOrder @OrderID = 42;
True or False: A view stores SELECT definition only.
True
Which usually makes a view non-updatable?
Includes GROUP BY
How to drop a view called vRecentSales?
DROP VIEW dbo.vRecentSales;
Which command switches context to AnalyticsDb?
USE AnalyticsDb;
Which are valid T-SQL comment styles?
-- single line and /* multi-line */
True or False: GO is executed by SQL Server.
False
Safest pattern for all-or-nothing changes:
BEGIN TRAN; …; COMMIT;