You’re a billion dollar company. How do you store passwords?

Last month, Facebook admitted to storing million of Facebook passwords in plaintext.
The Verge Apr 18, 2019

We see students being taught login systems here and a recurring mistake is passwords being stored in databases. It appears that CompSci courses teach bad practices early and as we know it's hard to unlearn what you learn earlier.

Further reading seems to indicate these passwords may have collected via logging.
"But as Krebs on Security first reported, various errors seem to have caused Facebook’s systems to log some passwords in plain text since as early as 2012."

I'm been chided for pointing this out from time to time but the mistake happens over and over and in very big companies.

Visual Studio 2019 with a database

Hi group,

I've just installed Visual Studio 2019 and have started my first app using this. Within the program I created a database using the tools provided in Visual Studio. I now want to begin writing to the tables I've created. But I'm stumped on how to do this. Hopefully you can help.

This database is installed on my laptop and is called DATAWHOUSE. Will I need some kind of connection string to write to the data table (and to read from it and/or make changes to it in the future)?

Fun With SQL: Text and System Functions

SQL by itself is great and powerful, and Postgres supports a broad array of more modern SQL including things like window functions and common table expressions. But rarely do I write a query where I don't want to tweak or format the data I'm getting back out of the database. Thankfully, Postgres has a rich array of functions to help with converting or formatting data. These built-in functions save me from having to do the logic elsewhere or write my own functions. In other words, I do less work because Postgres has already done it for me, which I'm always happy about.

We've covered a set of functions earlier, and today we're going to look at some different categories of functions to dive deeper.Image title

MySql GROUP BY on script

Hello i have a problem with a Sql script

SELECT col1_id, col1_name, col2 FROM table GROUP BY ?????

col1_id col1_name col2
A john bear
A john dog
A john cat
A john bear
A john dog
A john cat
A john dog
A john cat
A john bear
A john dog
A john cat
A john bear
A john dog
A john cat
A john dog
A john cat

I want to return all results. It has to return like this: echo col1_id . col1_name (A john) and then col2 (bear,dog, cat)

Mobile Experiences at Scale: 5-Minute Interview with James Gray [Video]

"Literally within minutes or seconds, customers generate mobile device audiences at scale," said James Gray, Director of Product for Big Data at Phunware.

Phunware's mobile applications platform allows some of the biggest brands in the world to deliver great mobile experiences and reach mobile app users with relevant content. To achieve this at scale, Phunware uses Neo4j as the engine to power a knowledge graph connecting more than a billion nodes.

UNION SQL call original rows

Hello i want to UNION three tables from the same database.

SELECT DISTINCT * 
        FROM
    (SELECT uid as id, name as name, username as username,bio as aboutme, '' as text, 'user' as type, profile_pic as profile_pic, '' as media_pic, '' as group_pic, 'U' as mediatype, '' as image_path FROM users ORDER BY rand() LIMIT 5) AS T

            UNION ALL
            (SELECT group_id as id, group_name as name,'' as username, group_desc as aboutme, '' as text, 'group' as type, '' as profile_pic, '' as media_pic, group_pic as group_pic, 'G' as mediatype, '' as image_path FROM groups ORDER BY rand() LIMIT 5)
        UNION ALL
            (SELECT M.msg_id as id, M.title as name, '' as username,M.description as aboutme, M.message as text, 'media' as type, '' as profile_pic,  M.media_pic as media_pic, '' as group_pic, M.type as mediatype, P.image_path as image_path FROM messages M, user_uploads P ORDER BY rand() LIMIT 5) 

It works but i want to return the original names of the rows for example not id but uid or msg_id or group_id separately. But i still need to UNION Thanks in advance

Cost Savings With DynamoDB On-Demand: Lessons Learned

One of my favorite features that was announced during re:Invent 2018 was DynamoDB On-Demand. With DynamoDB On-Demand, we can use DynamoDB without provisioning capacity. Instead, we pay per request. Sounds amazing, huh? I was excited and re-configured all DynamoDB tables of our SaaS product marbot: cloud-native alerting for CloudWatch via Slack. The result is stunning but misleading.

I shared my excitement on Twitter, and today, I add what we learned in the following weeks.

Financial Regulations: Neo4j Risk Management Platform [Infographic]

Financial regulation in the U.S. has become a complicated and fragmented system, but why?

Various authorities creating compliance laws include a cast of six federal regulating agencies: The Federal Reserve, the Office of the Comptroller of the Currency, the National Credit Union Administration, the Federal Deposit Insurance Corp., the Securities and Exchange Commission, and the Office of Thrift Supervision. There are also state bank regulators, adding even more agencies (and regulations) into the swirling, whirling mix you so desperately want (nay, need) control of.

On Evolution of Database Languages, Part 3

The article “Abstraction Tiers of Notations, Part 1” introduced abstraction tier concept, and in the article “Birth of New Generation of Programming Languages? Part 2,” I have tried to apply it to the evolution of the general-purpose programming languages. However, this framework is applicable to domain-specific languages as well. Let’s consider one of the most popular domains, where DSLs are widely used: data manipulation languages.

Current State

Firstly, let’s briefly examine current technologies available on the market. We will consider only employed abstraction tiers of data manipulation language for the database technologies while ignoring other aspects like distribution models, transaction support, or performance. While these aspects are very important for technology selection, they are orthogonal to the supported abstraction tiers.

DevOps and Automation Will Eliminate the DBA

I’ve been reading about the death of the DBA ever since I first made the jump from full-time developer to full-time data professional. The first time I heard it was when SQL Server 7.0 was released. Did you know that SQL Server 7.0 was self-tuning? In fact, it was so self-tuning that the DBA is a relic of the past and no one will be paid for that kind of work anymore.

Right.

Social Power, Operational Ease: 5-Minute Interview

“We were able to go from 48 Cassandra instances to three Neo4j instances. Going into the project, we weren’t sure whether that was going to be possible,” said David Fox, Software Engineer at Adobe.

Adobe runs Behance, a social network where digital artists share portfolios, learn from one another, and showcase their work. The activity feed is a key feature of the site and part of the home page. When long-time Neo4j community member David Fox joined Adobe, he saw how a graph database could make this feature sing.

Pushing Database Versioning to Its Limits

As most, current database systems still simply store current state or past states within one big relational table. We investigated what the performance drivers are and how to improve on the current state-of-the-art. We implemented an open-source storage system called Sirix(.io) from scratch, which stores small sized snapshots as well as supports sophisticated time-travel queries while competing with the efficiency of non-temporal database systems.

What Is a Temporal Database System?

It is a term used to describe that a system is capable of retrieving past states of your data. Typically, a temporal database stores both valid time, how long a fact is true in the real world, as well as transaction time when the data actually is committed to the database.

CASE WHEN THEN error

Hello i am getting an error on a CASE WHEN THEN syntax on my mySql

         SELECT  DISTINCT u.uid,c.c_id,u.name,u.profile_pic,u.username,u.email,c.time
                FROM conversation c, users u, conversation_reply r
                CASE
                WHEN c.user_one = '99'
                THEN c.user_two = u.uid
                WHEN c.user_two = '99'
                THEN c.user_one= u.uid
                END
                AND (
                c.user_one ='99'
                OR c.user_two ='99'
                ) AND u.status='1' AND c.c_id=r.c_id_fk AND u.uid<>'1'ORDER BY c.time DESC LIMIT 15

 #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'CASE
            WHEN c.user_one = '99'
            THEN c.user_two = u.uid
            WHEN c.user_t' at line 3

Join tables to display activity

Hello i have a database which users make groups or send messages to other registered, in our project, users. So you have messages as M,users as U, groups as G. So you want to show all updates that happen in these tables WHERE (uid - thats the user id column on U table.). All tables have CREATED as datetime column. Users yable is uid on messages is uid_fk and to groups uid_fk. Can i do that with a single statement or do i need to do anything else?

How to update one element in column chose with Select in VB.NET

Hi guys,

This is my first post and so glad to start sharing the knowledge.

I am using Mysql database with VB.NET and I have this code :

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click

        Dim str As String = "Server=localhost;Port=3306;Database=testdb;Uid=root;Pwd=password"

        Using con As New MySqlConnection(str)

            Dim query As String = "select * from testdata where rfid_tag='" & TextBox3.Text & "' and Date_serve<= '" & Date.Now.ToString("yyyy-MM-dd ") & "' and Start_Time<= '" & Date.Now.ToString("HH:mm:ss ") & "' and End_Time>= '" & Date.Now.ToString("HH:mm:ss ") & "' or amount_serve='' "
            Dim cm As New MySqlCommand(query, con)

            con.Open()

            Dim rd As MySqlDataReader = cm.ExecuteReader()

            ' Check if any rows exist
            If rd.Read() Then
                If rd.GetString(3) = "small" Then

                    MessageBox.Show("small")

                ElseIf rd.GetString(3) = "Big" Then

                    MessageBox.Show("big")

                ElseIf rd.GetString(3) = "Midium" Then

                    MessageBox.Show("Mid")

                End If

            End If
        End Using

    End Sub

what I want after take action after any of If function like

If rd.GetString(3) = "small" Then

                        MessageBox.Show("small")

need to update End_Time to be 00:00:00 in the element which chose in select with rfid_tag number in the table.

this my database table: for example if in "select" command choose RFID_TAG for John then I need to update the End_Time in table to be 00:00:00 with "update" command!

How can I achieve this?

  ID   First_Name      Date_Serve     Start_Time      End_Time             RFID_Tag           Amount_Serve
---------------------------------------------------------------------------------------------------------------------------------
    1     John           17-11-2018       10:00:00      10:15:00          hdgdYun8JH      Small
    2     George         18-11-2018      11:00:00       11:15:00           kdjfHluhHB        Big

Thanks for all

MySQL transactions

I need help with implementing MySQL transactions with PHP. Specifically, I'm confused between the flags WITH CONSISTENT SNAPSHOT, READ WRITE, and READ ONLY, what their differences are, and how they relate to table locking. I already read the MySQL reference manual but I'm still confused.