Sie sind auf Seite 1von 1

1. What is cardinality?

Thinking mathematically, it is the number of elements in a set. Thinking in the database


world, cardinality has to do with the counts in a relationship, one-to-one, one-to-many, or
many-to-many.
2. What are the elements of an ERD?
The three elements include the entities for which someone is seeking information, the
attributes of those entities, and the relationships between the entities.
3) Which SQL command is used to add a row?
INSERT

4) How do you maintain database integrity where deletions from one table
will automatically cause deletions in another table?
You create a trigger that will automatically delete elements in the second table when
elements from the first table are removed.
5) What port does SQL server run on?
1433 is the standard port for SQL server.
4) What is the SQL CASE statement used for and give an example?
It allows you to embed an if-else like clause in the SELECT clause.
SELECT Employee_Name, CASE Location

WHEN 'Boston' THEN Bonus * 2

WHEN 'Austin' THEN Bonus * ,5

ELSE Bonus

END

"New Bonus"

FROM Employee;

Das könnte Ihnen auch gefallen