Diferents tables in the informatic presentation

31
ELIZABETH DIAZ ADAME 5ATPS THEME: TABLES IN PROGRAMATION

Transcript of Diferents tables in the informatic presentation

Page 1: Diferents tables in the informatic presentation

ELIZABETH DIAZ ADAME5ATPS

THEME:TABLES IN PROGRAMATION

Page 2: Diferents tables in the informatic presentation

Tables or entitiesA table is an abstract space of information sorted according to a criterion.

This table is based on a single or shared index that provides access to data in the best and quickest way.

The table is composed of fields or attributes. These fields can be specified in different types, numeric, text fields, date, time, etc..??

The traditional way of representing a table is through a list in which his head would be the attributes and the rows would be stored data.

Page 3: Diferents tables in the informatic presentation

TRUTH TABLES

Page 4: Diferents tables in the informatic presentation

can take the values true and false.

THE FORMULA

The semantics is the set of rules that give meaning to a formula.

The value of a formula is given by traders as truth tables.

From now, we will assign the false value 0, and the true 1.

Page 5: Diferents tables in the informatic presentation

NEGATION

Page 6: Diferents tables in the informatic presentation

p not p0 11 0

The negation of a value is its opposite.

Page 7: Diferents tables in the informatic presentation

CONJUNCTION

Page 8: Diferents tables in the informatic presentation

The conjunction of two values is only true if both are true.

p q p and q0 0 00 1 01 0 01 1 1

Page 9: Diferents tables in the informatic presentation

DISJUNCTION

Page 10: Diferents tables in the informatic presentation

The disjunction of two values only false if both are false.

p q p or q0 0 00 1 11 0 11 1 1

Page 11: Diferents tables in the informatic presentation

CONDITIONAL

Page 12: Diferents tables in the informatic presentation

The only possibility that a condition or implication is false is false if true implies (1 -> 0).

p q p -> q0 0 10 1 11 0 01 1 1

Page 13: Diferents tables in the informatic presentation

EXCLUSIVEDISJUNCTION

Page 14: Diferents tables in the informatic presentation

The exclusive disjunction is true if two values are different, and false if the two values are equal.

p q p xor q0 0 00 1 11 0 11 1 0

Page 15: Diferents tables in the informatic presentation

Then we will see how to use truth tables.

We want to know if formulas not (p and q) and (not p) or (not q) are equivalent.

We will use truth tables to get the result of the formula, and if both give the same result for any combination of values (their truth tables are the same), are equivalent:

Page 16: Diferents tables in the informatic presentation

p q not p not q p and q not (p and q) (not p) or (not q)0 0 1 1 0 1 10 1 1 0 0 1 11 0 0 1 0 1 11 1 0 0 1 0 0

As can be seen, the two formulas return the same result are equivalent.

Page 17: Diferents tables in the informatic presentation

TABLES IN

MYSQL

Page 18: Diferents tables in the informatic presentation

RELATIONSHIPS

A relationship is the form in which they will interact or entities. These relationships are accompanied by cardinalities, which serve to give a sense of worthiness to MER. (Entity Relationship Model)Relationships can generate tables or not. A relationship between two tables stores data common to both.

Page 19: Diferents tables in the informatic presentation

DATABASE MANAGERSA database manager or DBM, is a software engine which is responsible for the management and operation of the database. This can be of many types and run on different operating systems. Some of the most popular are MySQL (Linux OS), Oracle (Unix OS) or Microsft SQL Server (for Windows OS)Many applications are distributed independently of DBM that serves to manage the database. Create tables, delete, modify, build queries etc. One of these is phpMyAdmnin managed MySQL and other Linux servers.

Page 20: Diferents tables in the informatic presentation

HOW CREATE A TABLE

IN MYSQL???

Page 21: Diferents tables in the informatic presentation

to create a table in MySQL, we must first declare it with the command: CREATE TABLE followed by the name we want to have our table, after we open parenthesis and declare variables and the variable type that are close parenthesis & finally we add a semicolon.

Page 22: Diferents tables in the informatic presentation

Then with the command: INSERT INTO VALUES assign a value to each variable and so we fill our table. The variables that change box are separated by commas and quotation marks.Finally, close the parentheses and semicolons added.

Page 23: Diferents tables in the informatic presentation

To display the table, use the command: SELECT * FROM followed by the name of the table and ended with a semicolon.

After that, our table below shows the values that we add, already full.

Page 24: Diferents tables in the informatic presentation

SQL / QueriesSQL is the language used to interact with the DBM (database manager). It is a scripting language, which interviews the DBM and get answers. No matter what programming language you're using, and they all use SQL to query clauses. A query is sent by the software program to the database and then the database returns a response.

Page 25: Diferents tables in the informatic presentation

Ex;I wanna know what are the details of users who are over 30 years old.SELECT * FROM users WHERE age> 30; It returns all rows comprendients users that meet that condition. The rows are ordered according to the attributes of the table.Ex: Id, Age, Name, Last Name, etc..This is indicated by the asterisk.

Page 26: Diferents tables in the informatic presentation

If only the name of the user would like to be as follows.SELECT NAME FROM USERS WHERE AGE> 30;Restrict the data returned by the database helps streamline the consultation and not spend so many server resources.The more resources are saved, will be faster query response to other users that they are using the same data base.

Page 27: Diferents tables in the informatic presentation

TABLES IN

HTML

Page 28: Diferents tables in the informatic presentation

<TABLE ALIGN="center" BGCOLOR=CC0066 BORDER="10" CELLPADDING="10" CELLSPACING="10">

In ALIGN we put the type of alignment you want, in this case is centered and is enclosed in quotes in English: "center"BGCOLOR is that after the "same" color code say that we want the background, or his name in capital letters.then declare the size BORDER is wide

First, declare the table like this:

Page 29: Diferents tables in the informatic presentation

THE CODE:

Page 30: Diferents tables in the informatic presentation

Then, open a <TR> and then a <TD>The <TR> is to add information into cells in the first row.Its closed form, is putting </ TR> and if volcemos to open, it creates a second row in our table to which we insert data.Data is the insert with <TD>.After putting it, put the data we want to be in the box.Then, to close we </ TD>.If we open another <TD> creates another cell in the same row with the data that we put in, until you return to close the box.So after each cell we add the </ TD> and as we close all our boxes, close the row with the </ TR>.

Page 31: Diferents tables in the informatic presentation

FOR YOUR ATTENTION