Summary (continued) Things are what user deals with and system remembers, such as customer placing an order Traditional approach uses entity-relationship diagrams (ERD) for data entities, attributes of data entities, and relationships between entities Things are shown as data entities Object-oriented approach uses class diagrams for...
9 trang | Chia sẻ: vutrong32 | Ngày: 19/10/2018 | Lượt xem: 1140 | Lượt tải: 0
Control structure Example: SELECT ProductID, Quantity, UnitPrice, [discount%]= CASE WHEN Quantity <=5 THEN 0.05 WHEN Quantity BETWEEN 6 and 10 THEN 0.07 WHEN Quantity BETWEEN 11 and 20 THEN 0.09 ELSE 0.1 END FROM [Order Details] ORDER BY Quantity, ProductId
40 trang | Chia sẻ: vutrong32 | Ngày: 19/10/2018 | Lượt xem: 1220 | Lượt tải: 0
Insert, delete, and update The UPDATE Command: to modify attribute values of one or more selected tuples. a WHERE clause in the UPDATE command selects the tuples to be modified from a single relation. However, updating a primary key value may propagate to the foreign key values of tuples in other relations if such a referential triggere...
58 trang | Chia sẻ: vutrong32 | Ngày: 19/10/2018 | Lượt xem: 1199 | Lượt tải: 2
Mapping EER Model Constructs to Relations Step 9: Mapping of Union Types (Categories). For mapping a category whose defining superclass have different keys, it is customary to specify a new key attribute, called a surrogate key, when creating a relation to correspond to the category. In the example below we can create a relation OWNER t...
39 trang | Chia sẻ: vutrong32 | Ngày: 19/10/2018 | Lượt xem: 1313 | Lượt tải: 0
Tuple Relational Calculus The tuple relational calculus is based on specifying a number of tuple variables. Each tuple variable usually ranges over a particular database relation, meaning that the variable may take as its value any individual tuple from that relation. A simple tuple relational calculus query is of the form {t | COND(t)} w...
51 trang | Chia sẻ: vutrong32 | Ngày: 19/10/2018 | Lượt xem: 1224 | Lượt tải: 0
In-Class Exercise Consider the following relations for a database that keeps track of student enrollment in courses and the books adopted for each course: STUDENT(SSN, Name, Major, Bdate) COURSE(Course#, Cname, Dept) ENROLL(SSN, Course#, Quarter, Grade) BOOK_ADOPTION(Course#, Quarter, Book_ISBN) TEXT(Book_ISBN, Book_Title, Publisher, ...
31 trang | Chia sẻ: vutrong32 | Ngày: 19/10/2018 | Lượt xem: 1495 | Lượt tải: 0
Cardinality Constraints Cardinality Constraint: Quantification of the relationship between two concepts or classes (a constraint on aggregation) MINIMUM (A,B) = n: At a minimum, one instance of A is related to at least n instances of B. n = 0 MIN(A,B) = 0 MIN(Person, Car) = 0 n = 1 MIN(A,B) = 1 MIN(Cust, Ship-address) = 1 n = inf. MIN(A,B...
33 trang | Chia sẻ: vutrong32 | Ngày: 19/10/2018 | Lượt xem: 1237 | Lượt tải: 0
Cây 2‐3 Thực hiện thêm lần lượt các nút sau vào cây 2‐3 ban đầu rỗng: 34, 65, 45, 23, 25, 76, 12, 9, 6, 48, 65, 5, 80, 7 Với cây tạo được ở trên hãy xóa lần lượt các nút: 7, 9, 80, 23
22 trang | Chia sẻ: vutrong32 | Ngày: 19/10/2018 | Lượt xem: 1179 | Lượt tải: 0
Loại bỏ nút khỏi cây Nhận xét: Thực hiện tìm kiếm để xem khóa cần xóa có trên cây Nếu nút có khóa cần xóa là nút lá: ngắt bỏ kết nối với nút cha của nó, giải phóng bộ nhớ cấp phát cho nút đó Nếu nút cần xóa là nút trong không đầy đủ (khuyết con trái hoặc phải): Thay thế bằng cây con không khuyết Nếu nút cần xóa là nút trong đầy đủ ...
14 trang | Chia sẻ: vutrong32 | Ngày: 19/10/2018 | Lượt xem: 1233 | Lượt tải: 0
Summary (continued) Primary information gathering techniques Review existing reports, forms, and procedure descriptions Conduct interviews and discussions with users Observe and document business processes Build prototype working models Distribute and collect questionnaires Conduct JAD sessions Research vendor solutions
7 trang | Chia sẻ: vutrong32 | Ngày: 19/10/2018 | Lượt xem: 1126 | Lượt tải: 0