Diferents tables in the informatic presentation

Preview:

Citation preview

ELIZABETH DIAZ ADAME5ATPS

THEME:TABLES IN PROGRAMATION

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.

TRUTH TABLES

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.

NEGATION

p not p0 11 0

The negation of a value is its opposite.

CONJUNCTION

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

DISJUNCTION

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

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

CONDITIONAL

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

EXCLUSIVEDISJUNCTION

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

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:

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.

TABLES IN

MYSQL

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.

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.

HOW CREATE A TABLE

IN MYSQL???

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.

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.

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.

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.

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.

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.

TABLES IN

HTML

<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:

THE CODE:

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>.

FOR YOUR ATTENTION

Recommended