Vue1
sdfsd
by charmis
HTML
<div id="app">
<h2>Todos:</h2>
<ol>
<li v-for="todo in todos">
<label>
<input type="checkbox"
v-on:change="toggle(todo)"
v-bind:checked="todo.done">
<del v-if="todo.done">
{{ todo.text }}
</del>
<span v-else>
{{ todo.text }}
</span>
</label>
<div>
A tuple is a finite number of elements A relation is a set of tuples 1NF is a property of a relation in RDBMS - A relation is in 1NF if and only if each attribute contains atomic values, and each value contains only single value Constraints - rules Foriegn
Key - A field/attribute/column in a table which is a key in another table. Simple Key - A key made up of only one attribute Compound Key - At least two Simple keys Composite Key - At last one Simple Key and at least one Compound Key Candiate Key
- A key that is a candidate for Primary Key Primary Key - The key that is selected as Primary Key; It is one of the candidate key. It may be a Simple Key, Compound key or Composite Key; migrated Primary Keys -------------------- PerformanceDBA
- https://stackoverflow.com/questions/30639562/how-to-set-up-primary-keys-in-a-relation/30803947#30803947 While we are on Keys, please note: In the Relational Model, we have Primary Keys, Alternate Keys, and Foreign Keys (migrated Primary Keys).
We do not have "candidate keys", no such thing is defined in the RM. It is something manufactured outside the RM. It is therefore non-relational. Worse, they are used by people who implement surrogates as "primary keys" a. A physical consideration
b, but one that should be understood and applied throughout the exercise. When the data is understood and known, the columns will be fixed length. When they are unknown, they might be variable. For Keys, given that they will be indexed, at least
on the Primary side, they should never be variable, because that requires unpacking on every...
CSS
body {
background: #20262E;
padding: 20px;
font-family: Helvetica;
}
#app {
background: #fff;
border-radius: 4px;
padding: 20px;
transition: all 0.2s;
}
li {
margin: 8px 0;
}
h2 {
font-weight: bold;
margin-bottom: 15px;
}
del {
color: rgba(0, 0, 0, 0.3);
}
Vue
new Vue({
el: "#app",
data: {
todos: [
{ text: "Learn JavaScript", done: false },
{ text: "Learn Vue", done: false },
{ text: "Play around in JSFiddle", done: true },
{ text: "Build something awesome", done: true }
]
},
methods: {
toggle: function(todo){
todo.done = !todo.done
}
}
})