전체 글 보기
-
Simple selectattribute : specifies a column in the resulttable_reference : the name of the tablewhere_condition : the condition that selected rows must satisfyExampleSelect DistinctTo remove duplicate rows from the result, we can use SELECT DISTINCTWhere ClauseLogical connections AND , OR , NOT can be used to create a more complex where conditionIS [NOT] NULLIS NULLIS NOT NULL💡NEVER use NULL nor..
6. SQLSimple selectattribute : specifies a column in the resulttable_reference : the name of the tablewhere_condition : the condition that selected rows must satisfyExampleSelect DistinctTo remove duplicate rows from the result, we can use SELECT DISTINCTWhere ClauseLogical connections AND , OR , NOT can be used to create a more complex where conditionIS [NOT] NULLIS NULLIS NOT NULL💡NEVER use NULL nor..
2024.01.26 -
Issues with DBMS DesignData integrity failure : e.g. key doesn’t exists💡앞 장에서 다룬 integrity constraint의 경우에는 위의 data integrity가 깨지지 않는 것을 보장하는 것이고, normalization은 data integrity가 보존되게끔 data base를 design한다는 의미라고 이해하면 된다.NormalizationThe process of breaking bad relations/tables smaller good relations→ leads to a better DB designAvoids updating, deleting, and inserting anomaliesThe normalization pro..
5. NormalizationIssues with DBMS DesignData integrity failure : e.g. key doesn’t exists💡앞 장에서 다룬 integrity constraint의 경우에는 위의 data integrity가 깨지지 않는 것을 보장하는 것이고, normalization은 data integrity가 보존되게끔 data base를 design한다는 의미라고 이해하면 된다.NormalizationThe process of breaking bad relations/tables smaller good relations→ leads to a better DB designAvoids updating, deleting, and inserting anomaliesThe normalization pro..
2024.01.26 -
Regular Entity MappingMap each Regular Entity to a Relation with all simple attributesUnpack composite attribute💡즉 다시 말해서 name를 따로 column으로 만드는 것이 아니라 나머지만 취급하면 된다는 것이다.A primary key can also be a composite keyex : country code, car number💡아직 multivalued attribute를 어떻게 다룰 지에 대해서는 논의하지 않음Mapping of one-one Relation3 possible waysForeign key : Better to choose an entity with total participation→ 위..
4. ER to Relational Database DesignRegular Entity MappingMap each Regular Entity to a Relation with all simple attributesUnpack composite attribute💡즉 다시 말해서 name를 따로 column으로 만드는 것이 아니라 나머지만 취급하면 된다는 것이다.A primary key can also be a composite keyex : country code, car number💡아직 multivalued attribute를 어떻게 다룰 지에 대해서는 논의하지 않음Mapping of one-one Relation3 possible waysForeign key : Better to choose an entity with total participation→ 위..
2024.01.26 -
Converting ER to DBMS TablesProblem: This entity relationship does not have 1-1 direct mapping. So we can’t convert it directly💡예를 들어서 relationship같은 경우 어떻게 처리하고 저장할 것인지에 대해서는 ER model이 답하지 않는다. 따라서 DBMS table과 ER이 direct mapping되지 않는다는 것이다.그래서 Relational Data model 이 등장하게 된 것이다.💡Relational Model은 DBMS와 direct mapping할 수 있다.A Relation주의할 점은 Relationship와 relation은 구분해야한다는 것이다.Relationship: Entit..
3. The Relational Data ModelConverting ER to DBMS TablesProblem: This entity relationship does not have 1-1 direct mapping. So we can’t convert it directly💡예를 들어서 relationship같은 경우 어떻게 처리하고 저장할 것인지에 대해서는 ER model이 답하지 않는다. 따라서 DBMS table과 ER이 direct mapping되지 않는다는 것이다.그래서 Relational Data model 이 등장하게 된 것이다.💡Relational Model은 DBMS와 direct mapping할 수 있다.A Relation주의할 점은 Relationship와 relation은 구분해야한다는 것이다.Relationship: Entit..
2024.01.26 -
Subclasses and Superclasses SpecializationMay have several specializations of the same superclass💡subclass notation : ⊂\subset⊂💡OOP에서 Inheritance 개념과 유사하게 이해할 수 있다. subclass가 추가적인 attribute를 가지는 것이다. 💡만약 superclass가 특정 entity와 relationship을 가지고 있다면 subclass 또한 해당 entity와 relationship을 가지고 있음을 내재하고 있다 : OOP 개념으로 이해하면 자명하다.💡specialization은 결과적으로 subclass만이 가지는 일종의 member variable로 이해할 수 있다. 즉 이를 ..
2. Enhanced Entity-Relationship (EER) modelSubclasses and Superclasses SpecializationMay have several specializations of the same superclass💡subclass notation : ⊂\subset⊂💡OOP에서 Inheritance 개념과 유사하게 이해할 수 있다. subclass가 추가적인 attribute를 가지는 것이다. 💡만약 superclass가 특정 entity와 relationship을 가지고 있다면 subclass 또한 해당 entity와 relationship을 가지고 있음을 내재하고 있다 : OOP 개념으로 이해하면 자명하다.💡specialization은 결과적으로 subclass만이 가지는 일종의 member variable로 이해할 수 있다. 즉 이를 ..
2024.01.26 -
ER Model ConceptsEntitiesSpecific things or objects (e.g. student, course)Analogous to class of OOPHolds Set/Collection of objects : Entity setSame as table in DBMSWeak EntityAn entity without a key. But has partial key💡즉 key를 가지고 있기는 하지만 그 자체만으로는 안되는 것을 의미한다. 위의 예시의 경우에는 loan이라는 entity는 반드시 customer entity를 요구하는 케이스이다.Dependent on other entity (owner entity)Participation: mandatory/total-partic..
1. Data Modeling Using the Entity Relationship (ER) ModelER Model ConceptsEntitiesSpecific things or objects (e.g. student, course)Analogous to class of OOPHolds Set/Collection of objects : Entity setSame as table in DBMSWeak EntityAn entity without a key. But has partial key💡즉 key를 가지고 있기는 하지만 그 자체만으로는 안되는 것을 의미한다. 위의 예시의 경우에는 loan이라는 entity는 반드시 customer entity를 요구하는 케이스이다.Dependent on other entity (owner entity)Participation: mandatory/total-partic..
2024.01.26 -
Summary 2024.01.05
-
IntroductionA baker with two types of cakes: simple and fancyBoth types require some basic ingredients; the fancy type requires fancier ingredients and more labor but generates more profit.Popular bakery: No upper limit on the quantity that can be soldBaker’s problem: How many simple and fancy cakes to produce?max24x1+14x2\max 24x_1 + 14x_2max24x1+14x2subject to\text{subject to}subject to3x1..
14. DualityIntroductionA baker with two types of cakes: simple and fancyBoth types require some basic ingredients; the fancy type requires fancier ingredients and more labor but generates more profit.Popular bakery: No upper limit on the quantity that can be soldBaker’s problem: How many simple and fancy cakes to produce?max24x1+14x2\max 24x_1 + 14x_2max24x1+14x2subject to\text{subject to}subject to3x1..
2023.12.19